/* MiyaTube Explorer — Explore overview responsive hotfix v1
   Corrige overflow horizontal observado no iPhone sem alterar dados ou navegação. */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.app-shell,
.main-content,
.view,
.explore-view,
#exploreContent,
.explore-panel,
.overview-premium {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.explore-view,
#exploreContent,
.explore-panel,
.overview-premium {
  overflow-x: clip;
}

/* Grid tracks must be allowed to shrink below their min-content width. */
.overview-intro-card {
  grid-template-columns: 46px minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
}

.overview-intro-card > *,
.overview-panel-title > *,
.map-stat > *,
.overview-topic-row > *,
.video-compact > *,
.dimension-section-head > *,
.card-topline > * {
  min-width: 0;
}

.map-stat {
  grid-template-columns: 38px minmax(0, 1fr);
  min-width: 0;
}

.overview-topic-row {
  grid-template-columns: 31px minmax(0, 1fr) auto;
  min-width: 0;
}

/* Themes wrap inside the card instead of expanding the page width. */
.overview-themes {
  width: 100%;
  max-width: 100%;
  flex-wrap: wrap;
  overflow-x: visible;
}

.overview-themes .theme-chip {
  flex: 0 1 auto;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
}

.map-panel,
.overview-highlight-panel,
.overview-topic-panel,
.intent-overview-grid,
.intent-overview-card,
.knowledge-card,
.video-compact {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.intent-overview-card strong,
.intent-overview-card small,
.overview-intro-card h3,
.overview-intro-card p,
.overview-panel-title h3,
.overview-panel-title p,
.overview-topic-row strong,
.card-main-title,
.card-main-copy,
.video-title,
.video-meta {
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Prevent nested flex/grid children from forcing the Explore canvas wider. */
.video-compact .video-copy,
.dimension-section-title,
.card-kind,
.topic-card-body,
.learning-step-text {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 420px) {
  .explore-heading h2 {
    font-size: clamp(32px, 10.2vw, 39px);
  }

  .overview-intro-card,
  .map-panel,
  .overview-highlight-panel,
  .overview-topic-panel {
    padding-left: 15px;
    padding-right: 15px;
  }

  .intent-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .intent-overview-card {
    padding: 11px;
  }
}

@media (max-width: 350px) {
  .intent-overview-grid {
    grid-template-columns: 1fr;
  }
}
