/* DIVAR 360 v127: correções finais de layout para laptop, desktop e telas curtas. */

/* A pontuação pertence à rodada, não à capa de entrada do Deu Match. */
.fake-game-stage[data-game-state="match-intro"] .game-hud-row {
  display: none;
}

/* A arte 16:9 preenche a viewport; o recorte lateral é preferível a faixas vazias. */
.match-intro-panel.game-immersive-cover {
  width: 100%;
  min-height: 100dvh;
  margin: 0;
}

.match-intro-panel.game-immersive-cover::before {
  background-color: #ee3b86;
  background-position: center;
  background-size: cover;
}

/* Resultado DICA: a própria área rola quando a altura não comporta o relatório. */
.fake-game-stage[data-game-state="disc-result"] {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

.disc-result-panel {
  box-sizing: border-box;
  height: 100dvh;
  min-height: 0;
  max-height: 100dvh;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #ed3687 rgba(255, 255, 255, 0.2);
}

.disc-result-panel::-webkit-scrollbar {
  width: 9px;
}

.disc-result-panel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.16);
}

.disc-result-panel::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #ed3687;
  background-clip: padding-box;
}

/* Laptop: conteúdo DICA intrínseco, sem cartão esticado até o rodapé. */
@media (min-width: 861px) and (max-width: 1280px) and (max-height: 820px) and (orientation: landscape) {
  .disc-live-panel {
    width: min(820px, calc(100vw - 32px));
    height: 100dvh;
    min-height: 100dvh;
    grid-template-rows: auto auto 7px;
    align-content: start;
    gap: 12px;
    padding: 78px 16px 18px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
  }

  .disc-live-panel .game-question-banner,
  #discLivePanel .disc-question-banner {
    width: min(500px, calc(100vw - 500px));
    min-width: 420px;
    min-height: 58px;
    padding: 7px 12px;
  }

  .disc-live-panel .disc-arena {
    width: min(720px, 100%);
    height: auto;
    justify-self: center;
    overflow: visible;
  }

  .disc-live-panel .disc-question-card {
    width: 100%;
    max-width: 720px;
    height: auto;
    min-height: 0;
    padding: 18px 20px 20px;
    overflow: visible;
  }

  .disc-live-panel .disc-question-card small {
    margin-bottom: 7px;
    font-size: 0.68rem;
  }

  .disc-live-panel .disc-question-card h2 {
    margin-bottom: 14px;
    font-size: clamp(1.08rem, 2vw, 1.35rem);
  }

  .disc-live-panel .disc-scale-buttons {
    grid-template-rows: none;
    gap: 10px;
  }

  .disc-live-panel .disc-scale-buttons button {
    min-height: 52px;
    padding: 8px 12px;
  }

  .disc-live-panel .disc-scale-buttons button span {
    font-size: clamp(0.72rem, 1.35vw, 0.86rem);
  }

  .disc-result-panel {
    width: min(960px, calc(100vw - 32px));
    padding: 96px 18px 28px;
  }

  .disc-result-panel h2 {
    font-size: clamp(2.7rem, 7vh, 4.8rem);
  }

  .disc-result-panel > strong {
    font-size: clamp(1rem, 2vw, 1.3rem);
    line-height: 1.35;
  }

  .disc-result-panel .disc-score-grid {
    margin: 22px auto;
  }
}

/* Desktop/laptop: HUD compacto no topo e cartas na proporção original. */
@media (min-width: 961px) and (orientation: landscape) {
  .play-page.is-game-focused.is-match-playing .game-hud-row {
    top: 12px;
    left: 20px;
  }

  .play-page.is-game-focused.is-match-playing .game-score-card {
    width: 210px;
    min-height: 88px;
  }

  .match-live-panel {
    position: relative;
    display: block;
    width: min(1280px, calc(100vw - 24px));
    height: 100dvh;
    min-height: 100dvh;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
  }

  .match-live-panel .match-question-banner {
    position: absolute;
    top: 12px;
    right: clamp(224px, 23vw, 278px);
    left: clamp(236px, 24vw, 306px);
    width: auto;
    min-height: 54px;
    height: 54px;
    box-sizing: border-box;
    margin: 0;
    padding: 5px 12px;
  }

  .match-live-panel .match-question-banner span {
    font-size: clamp(0.62rem, 0.86vw, 0.72rem);
  }

  .match-live-panel .match-question-banner strong {
    display: block;
    overflow: hidden;
    font-size: clamp(0.82rem, 1.2vw, 1rem);
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .match-live-panel .memory-status-grid {
    position: absolute;
    top: 72px;
    right: clamp(224px, 23vw, 278px);
    left: clamp(236px, 24vw, 306px);
    width: auto;
    height: 34px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .match-live-panel .memory-status-grid > span,
  .match-live-panel #matchCountdownStat {
    display: flex;
    grid-column: auto;
    min-height: 34px;
    padding: 4px 8px;
    font-size: clamp(0.62rem, 0.8vw, 0.72rem);
    line-height: 1;
  }

  .match-live-panel .memory-status-grid > span strong,
  .match-live-panel #matchCountdownStat strong {
    font-size: clamp(0.9rem, 1.15vw, 1.08rem);
  }

  .match-live-panel .memory-card-grid {
    position: absolute;
    top: 122px;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    height: auto;
    min-height: 0;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-template-rows: repeat(2, auto);
    align-content: center;
    gap: clamp(6px, 0.75vw, 10px);
  }

  .match-live-panel .memory-card,
  .match-live-panel .memory-card:nth-child(13),
  .match-live-panel .memory-card:nth-child(14) {
    grid-column: auto;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 1190.25 / 1683.75;
    align-self: center;
  }
}

@media (max-height: 640px) {
  .disc-result-panel {
    padding-top: 82px;
  }

  .disc-result-panel .disc-score-grid {
    margin-block: 18px;
  }
}
/* O hall apresenta a sala; a pontuação só aparece dentro dos aprendizados. */
.fake-game-stage[data-game-state="lobby"] > .game-hud-row {
  display: none !important;
}
