/* W1C — Interface sem rolagem global em desktops com altura utilizável.
   A tela continua rolável em celulares, janelas pequenas e zoom elevado.
   Nenhuma regra de jogo é alterada. */

@media (min-width: 1001px) and (min-height: 680px) {
  html, body { min-height: 100%; }
  body { overflow: hidden; }

  .page-shell {
    width: min(1720px, 100%);
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    padding: 8px 11px 7px;
  }

  .masthead {
    flex: 0 0 59px;
    min-height: 59px;
    margin-bottom: 8px;
    padding: 7px 15px;
  }
  .masthead-mark { width: 36px; height: 36px; font-size: 18px; }
  .masthead-title h1 { font-size: clamp(20px, 1.85vw, 27px); }
  .masthead .eyebrow { font-size: 9px; }
  .build-label { padding: 6px 8px; font-size: 11px; }

  .game-shell {
    flex: 1 1 0;
    min-height: 0;
    gap: 8px;
    grid-template-columns: minmax(174px,.76fr) minmax(0,3.45fr) minmax(200px,.95fr);
  }
  .bottom-dock {
    flex: 0 0 clamp(130px,18.5dvh,168px);
    min-height: 0;
    margin-top: 8px;
    gap: 8px;
    grid-template-columns: minmax(174px,.76fr) minmax(0,3.45fr) minmax(200px,.95fr);
  }
  .footer {
    flex: 0 0 17px;
    min-height: 0;
    margin: 4px 0 0;
    padding: 1px 2px 0;
    font-size: 9px;
    line-height: 13px;
    overflow: hidden;
  }
  .panel { padding: 9px 10px; min-height: 0; }
  .panel-heading {
    margin-bottom: 8px;
    padding-bottom: 6px;
  }
  .panel-heading h2 { font-size: 15px; }
  .panel-heading.compact { margin-bottom: 5px; padding-bottom: 5px; }
  .panel-heading.compact h2 { font-size: 13px; }

  /* Ajudas de protótipo são dispensáveis na vista compacta. */
  .inventory-panel > .panel-help,
  .party-panel > .panel-help,
  .party-panel > .small-note,
  .vista-panel > .small-note { display: none; }

  .inventory-panel { overflow: hidden; }
  .inventory-group { margin-bottom: 8px; }
  .inventory-group h3 {
    font-size: 10px;
    padding-bottom: 3px;
    margin-bottom: 4px;
  }
  .item-grid { gap: 4px; }
  .item-slot { min-height: 0; padding: 3px; }
  .item-art { width: min(90%,35px); height: min(90%,35px); }
  .inventory-note {
    min-height: 31px;
    margin-top: auto;
    padding: 7px 8px;
    font-size: 10px;
    line-height: 1.3;
  }

  .vista-panel { display: flex; gap: 7px; }
  .vista-topline { flex: 0 0 37px; min-height: 0; padding: 0 2px; }
  .vista-topline h2 { font-size: clamp(17px,1.5vw,22px); margin-top: 2px; }
  .vista-topline .eyebrow { font-size: 9px; }
  .location-count { padding: 5px 8px; }
  .scene-window {
    flex: 1 1 0;
    min-height: 0;
    height: auto;
    aspect-ratio: auto;
    border-width: 3px;
  }
  .scene-stamp { top: 9px; left: 9px; padding: 5px 7px; font-size: 9px; }
  .scene-caption { padding: 28px 13px 10px; font-size: 14px; }
  .action-row { flex: 0 0 auto; margin-top: 0; gap: 6px; }
  .button { padding: 7px 11px; font-size: 12px; }
  .action-row .button { min-height: 34px; }

  .party-panel { overflow: hidden; }
  .party-card {
    min-height: 0;
    flex: 0 0 auto;
    padding: 5px;
    gap: 7px;
    margin-bottom: 6px;
  }
  .portrait { flex-basis: 51px; height: 60px; }
  .hero-summary { gap: 2px; }
  .hero-summary strong, .party-card .hero-summary strong { font-size: 15px; }
  .party-card .hero-summary small { font-size: 10px; }
  .party-card .hero-summary em { font-size: 9px; }
  .character-detail { margin: 5px 0 0; padding: 8px; }
  .character-detail strong { font-size: 12px; }
  .character-detail p { font-size: 11px; line-height: 1.3; margin-top: 5px; }
  .detail-label { font-size: 9px; margin-bottom: 3px; }

  .map-panel, .diary-panel, .controls-panel {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  .map-panel { display: flex; flex-direction: column; }
  .route-map { height: auto; min-height: 0; flex: 1 1 0; }
  .map-current { margin-top: 3px; font-size: 10px; }
  .diary-panel { display: flex; flex-direction: column; }
  .event-log {
    flex: 1 1 0;
    height: auto;
    min-height: 0;
    padding: 0 2px;
    font-size: 11px;
    line-height: 1.5;
    overflow-y: auto;
  }
  .event-log p { margin-bottom: 3px; padding-bottom: 2px; }
  .controls-panel .control-pad { max-width: 190px; gap: 4px; }
  .control-pad button { min-height: 34px; font-size: 15px; }
  .controls-panel p { margin-top: 5px; font-size: 9px; line-height: 1.3; }
}

@media (min-width: 1001px) and (min-height: 680px) and (max-height: 759px) {
  .masthead { flex-basis: 51px; min-height: 51px; }
  .masthead-mark { width: 30px; height: 30px; }
  .bottom-dock { flex-basis: 126px; }
  .panel { padding: 7px 8px; }
  .inventory-group { margin-bottom: 6px; }
  .inventory-group h3 { padding-bottom: 2px; margin-bottom: 3px; }
  .item-art { width: min(85%,31px); height: min(85%,31px); }
  .portrait { flex-basis: 46px; height: 54px; }
  .party-card { padding: 4px; margin-bottom: 4px; }
  .character-detail { padding: 6px; }
  .control-pad button { min-height: 30px; }
}

/* Em larguras reduzidas, alturas pequenas e grande zoom, rolagem normal e
   elementos empilhados são intencionais, evitando recortes de conteúdo. */
