/* REAL PLAY — layout responsivo por classe de dispositivo.
   A classe é definida no <head>, antes do primeiro desenho, e reajustada em resize/orientação. */
html[data-device-class="phone"] {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html[data-device-class="phone"],
html[data-device-class="phone"] body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
html[data-device-class="phone"] body {
  min-width: 320px;
  margin: 0;
}
html[data-device-class="phone"] .layout,
html[data-device-class="phone"] .main,
html[data-device-class="phone"] #page-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
html[data-device-class="phone"] .main {
  margin-left: 0 !important;
  padding-inline: 12px !important;
  min-height: 100svh;
  height: auto !important;
  max-height: none !important;
}
html[data-device-class="phone"] body.public-entry-mode .main {
  margin-left: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 12px 12px calc(92px + env(safe-area-inset-bottom)) !important;
  min-height: 100svh;
  height: auto !important;
  max-height: none !important;
}
html[data-device-class="phone"] .sidebar {
  width: min(280px, 86vw) !important;
  max-width: 86vw;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  transform: translateX(-105%);
}
html[data-device-class="phone"] .sidebar.open {
  transform: translateX(0);
}
html[data-device-class="phone"] .sidebar nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
html[data-device-class="phone"] .mobile-menu {
  display: grid;
  place-items: center;
}
html[data-device-class="phone"] .mobile-bottom-nav {
  display: grid !important;
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  min-height: 62px;
  padding: 5px 4px calc(5px + env(safe-area-inset-bottom)) !important;
  border-top: 2px solid var(--rp-gold, #F4BD38);
  background: #061B35;
}
html[data-device-class="phone"] .mobile-bottom-nav button {
  min-width: 0;
  min-height: 52px;
  padding: 5px 2px !important;
  font-size: 11px;
  line-height: 1.2;
  white-space: normal;
}
html[data-device-class="phone"] .mobile-bottom-nav button span {
  font-size: 20px;
  line-height: 1.1;
}
html[data-device-class="phone"] body {
  padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important;
}
html[data-device-class="phone"] body.public-entry-mode .main {
  padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important;
}
html[data-device-class="phone"] body.public-entry-mode .public-welcome-hero {
  margin: 0 0 18px !important;
  padding: 22px 16px !important;
  border-radius: 16px !important;
}
html[data-device-class="phone"] .public-welcome-hero h1 {
  font-size: clamp(25px, 6vw, 34px);
  line-height: 1.14;
  overflow-wrap: anywhere;
}
html[data-device-class="phone"] .public-welcome-hero p {
  font-size: 14px;
  line-height: 1.55;
}
html[data-device-class="phone"] .public-welcome-hero .hero-buttons {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 9px;
}
html[data-device-class="phone"] .public-welcome-hero .hero-buttons .button {
  width: 100%;
  min-height: 42px;
  justify-content: center;
  white-space: normal;
}
html[data-device-class="phone"] .public-home-section {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 20px 0 24px !important;
}
html[data-device-class="phone"] .public-home-section .section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start !important;
  gap: 8px 10px;
}
html[data-device-class="phone"] .public-home-section .section-head > div {
  flex: 1 1 190px;
  min-width: 0;
}
html[data-device-class="phone"] .public-home-section .section-head h2 {
  font-size: 18px;
  line-height: 1.25;
}
html[data-device-class="phone"] .public-home-section .section-head p {
  font-size: 12px;
}
html[data-device-class="phone"] .public-home-section .section-head > .button {
  flex: 0 0 auto;
  min-height: 36px;
  font-size: 11px;
}
html[data-device-class="phone"] .public-ticker,
html[data-device-class="phone"] .ticker-viewport {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
html[data-device-class="phone"] .ticker-match-card {
  width: min(278px, calc(100vw - 32px)) !important;
  flex: 0 0 min(278px, calc(100vw - 32px)) !important;
  min-width: 0;
  padding: 13px !important;
  font-size: 12px;
}
html[data-device-class="phone"] .ticker-track {
  width: max-content !important;
  gap: 10px;
}
html[data-device-class="phone"] .ticker-team b {
  font-size: 11px;
  line-height: 1.25;
}
html[data-device-class="phone"] .public-competition-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100%;
  min-width: 0;
}
html[data-device-class="phone"] .public-competition-card {
  min-width: 0;
  overflow-wrap: anywhere;
}
html[data-device-class="phone"] body.public-entry-mode .main > footer {
  width: 100%;
  max-width: 100%;
  margin: 22px 0 12px !important;
  font-size: 11px;
  line-height: 1.45;
}
html[data-device-class="phone"] .main > footer span {
  overflow-wrap: anywhere;
}

/* Tablets: use the full canvas, keep navigation touch-friendly and use two-column cards. */
html[data-device-class="tablet"],
html[data-device-class="tablet"] body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
html[data-device-class="tablet"] .main {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-left: 0 !important;
  padding: 0 clamp(18px, 3vw, 30px) !important;
  min-height: 100svh;
}
html[data-device-class="tablet"] .sidebar {
  width: min(300px, 78vw);
  max-width: 78vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  transform: translateX(-105%);
}
html[data-device-class="tablet"] .sidebar.open {
  transform: translateX(0);
}
html[data-device-class="tablet"] .sidebar nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
html[data-device-class="tablet"] .mobile-menu {
  display: grid;
  place-items: center;
}
html[data-device-class="tablet"] .mobile-bottom-nav {
  display: grid !important;
  position: fixed !important;
  inset-inline: 0;
  bottom: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom)) !important;
  min-height: 64px;
  background: #061B35;
  border-top: 2px solid var(--rp-gold, #F4BD38);
}
html[data-device-class="tablet"] body {
  padding-bottom: calc(78px + env(safe-area-inset-bottom)) !important;
}
html[data-device-class="tablet"] .public-home-section,
html[data-device-class="tablet"] #page-content {
  width: 100%;
  max-width: 1440px;
  min-width: 0;
  margin-inline: auto;
}
html[data-device-class="tablet"] .public-welcome-hero {
  padding: clamp(24px, 4vw, 38px);
}
html[data-device-class="tablet"] .public-competition-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
html[data-device-class="tablet"] .ticker-match-card {
  width: clamp(285px, 38vw, 340px);
  flex: 0 0 clamp(285px, 38vw, 340px);
}
html[data-device-class="tablet"] .public-home-section .section-head {
  flex-wrap: wrap;
  align-items: flex-start;
}
html[data-device-class="tablet"] body.public-entry-mode .main {
  padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important;
}

/* Desktop / notebook: no phone navigation; constrain content without shrinking typography. */
html[data-device-class="desktop"] .mobile-bottom-nav {
  display: none !important;
}
html[data-device-class="desktop"] .layout,
html[data-device-class="desktop"] .main,
html[data-device-class="desktop"] #page-content {
  min-width: 0;
  max-width: 100%;
}
html[data-device-class="desktop"] body.public-entry-mode #page-content {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
}
html[data-device-class="desktop"] body.public-entry-mode .main {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
html[data-device-class="desktop"] .public-competition-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
html[data-device-class="desktop"] .ticker-match-card {
  width: clamp(280px, 24vw, 340px);
  flex: 0 0 clamp(280px, 24vw, 340px);
}
@media (prefers-reduced-motion: reduce) {
  html[data-device-class="phone"] .ticker-track,
  html[data-device-class="tablet"] .ticker-track {
    animation: none !important;
    transform: none !important;
  }
}

/* REAL PLAY — corrigir contraste no dashboard público do campeonato.
   Os cartões claros herdam texto branco do hero escuro; defina cores explícitas por componente. */
.public-competition-stats > *,
.competition-metrics > * {
  color: #102f52 !important;
}
.public-competition-stats > * b,
.competition-metrics > * b,
.public-competition-stats > * strong,
.competition-metrics > * strong {
  display: block;
  color: #082b50 !important;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 900;
  line-height: 1.15;
}
.public-competition-stats > * small,
.competition-metrics > * small {
  display: block;
  margin-top: 5px;
  color: #405873 !important;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  opacity: 1 !important;
}
.public-competition-hero .eyebrow {
  color: #ffd15b !important;
  font-weight: 900;
}
.public-competition-hero > h2 {
  color: #ffffff !important;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.public-competition-hero > p {
  color: #f3f7fc !important;
  opacity: 1 !important;
}
.public-category-card {
  color: #12385f !important;
}
.public-category-card b {
  color: #12385f !important;
  font-weight: 850;
}
.public-category-card small {
  color: #526b86 !important;
  opacity: 1 !important;
  font-weight: 600;
  line-height: 1.4;
}
.public-category-card > strong {
  color: #0756a5 !important;
}
@media (max-width: 600px) {
  .public-competition-stats,
  .competition-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }
  .public-competition-stats > *,
  .competition-metrics > * {
    padding: 13px 10px !important;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  .public-competition-stats > * small,
  .competition-metrics > * small {
    font-size: 12px;
  }
  .public-category-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .public-category-card {
    min-height: 112px;
  }
}

