/* Fit the actual visible viewport; court projection shares the measured inset. */
.picnic-game-shell {
  min-height: 0;
  height: var(--picnic-viewport-height, 100dvh);
  overflow: hidden;
}
.picnic-game-shell > .dual-page {
  min-height: 0;
  height: calc(var(--picnic-viewport-height, 100dvh) - var(--game-settings-space) - env(safe-area-inset-bottom));
}
.picnic-game-shell .orientation-hint { display: none; }
.picnic-game-shell.needs-portrait .dual-page > :not(.orientation-hint) { visibility: hidden; }
.picnic-game-shell.needs-portrait .orientation-hint {
  position: absolute;
  inset: 8px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: auto;
  padding: 18px;
  background: #fffbedf5;
  color: #466e55;
  border: 2px solid #d5dfb0;
  border-radius: 24px;
  text-align: center;
  pointer-events: auto;
}
.orientation-hint > span { font-size: 44px; line-height: 1; }
.orientation-hint strong { font-size: 22px; }
.orientation-hint small { font-size: 14px; line-height: 1.5; }

/* Narrow portrait screens keep every hit target in separate edge bands. */
.dual-page.is-compact .player-hud { display: flex; height: 66px; padding: 5px 6px; gap: 7px; align-items: center; }
.dual-page.is-compact .player-hud.bottom,
.dual-page.is-compact .player-hud.top { align-items: center; }
.dual-page.is-compact .dual-person { flex: 1; flex-direction: row; width: auto; min-width: 0; gap: 5px; padding: 4px; border-radius: 16px; text-align: left; }
.dual-page.is-compact .dual-person .avatar { width: 30px; height: 30px; border-width: 2px; }
.dual-page.is-compact .dual-person h2 { font-size: 15px; line-height: 1.2; }
.dual-page.is-compact .dual-person .role { margin-top: 2px; font-size: 10px; line-height: 1.25; word-break: keep-all; }
.dual-page.is-compact .score-pill { flex: none; width: auto; min-width: 46px; padding: 3px 5px; border-radius: 13px; }
.dual-page.is-compact .score-pill b { font-size: 21px; line-height: 1.1; }
.dual-page.is-compact .score-pill span,
.dual-page.is-compact .score-pill small { font-size: 9px; line-height: 1.25; }
.dual-page.is-compact .item-button { flex: none; align-self: center; width: auto; min-width: 66px; min-height: 52px; max-width: 72px; padding: 3px 4px; border-radius: 13px; font-size: 10px; line-height: 1.25; }
.dual-page.is-compact .item-button strong { margin-bottom: 1px; }
.dual-page.is-compact .item-button strong .game-action-icon { width: 25px; height: 25px; }
.dual-page.is-compact .dual-tip { display: none; }
.dual-page.is-compact .launch-button,
.dual-page.is-compact .orchard-weather { width: min(60%, 240px); min-width: 0; height: 44px; min-height: 44px; max-width: calc(100% - 120px); padding: 3px 8px; font-size: 12px; border-radius: 14px; }
.dual-page.is-compact .launch-button.bottom,
.dual-page.is-compact .orchard-weather.bottom { top: auto; bottom: 70px; }
.dual-page.is-compact .launch-button.top,
.dual-page.is-compact .orchard-weather.top { bottom: auto; top: 70px; }
.dual-page.is-compact .orchard-weather .orchard-obstacle-art { width: 30px; height: 30px; }
.dual-page.is-compact .orchard-weather b { font-size: 11px; line-height: 1.2; }
.dual-page.is-compact .orchard-weather small { font-size: 9px; line-height: 1.2; }
.dual-page.is-compact .dual-middle { inset: 0; height: 100%; transform: none; display: block; padding: 0; }
.dual-page.is-compact .dual-middle > .iconbtn { position: absolute; top: calc(50% - 22px); width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 9px; }
.dual-page.is-compact .dual-middle > .iconbtn:first-child { left: 3px; }
.dual-page.is-compact .dual-middle > .iconbtn:last-child { right: 3px; }
.dual-page.is-compact .dual-timer { left: 5px; top: 70px; width: 49px; height: 44px; padding: 3px 1px; border-radius: 11px; }
.dual-page.is-compact .picnic-match-label,
.dual-page.is-compact .picnic-settings-label { display: none; }
.dual-page.is-compact .dual-timer #turn-label { font-size: 8px; line-height: 1; white-space: nowrap; }
.dual-page.is-compact .dual-timer strong { font-size: 17px; line-height: 1.2; }
.dual-page.is-compact .farmer-hud { top: 4px; min-height: 0; height: calc(var(--picnic-court-inset) - 8px); grid-template-columns: minmax(0,1fr) calc((var(--picnic-court-inset) - 8px)*.667) minmax(0,1fr); }
.dual-page.is-compact .farmer-stage { width: calc((var(--picnic-court-inset) - 8px)*.667); height: calc(var(--picnic-court-inset) - 8px); }
.dual-page.is-compact .farmer-hud-copy { margin-left: 0; padding: 6px 4px; border-radius: 14px; }
.dual-page.is-compact .farmer-hud h2 { font-size: 15px; line-height: 1.3; }
.dual-page.is-compact .farmer-hud p { display: none; }
.dual-page.is-compact .farmer-skill-tag { padding: 2px 3px; margin-bottom: 3px; font-size: 9px; }
.dual-page.is-compact .farmer-action { left: -73px; top: 13px; min-width: 66px; padding: 5px; font-size: 11px; }
.dual-page.is-compact .farmer-hand-fruit,
.dual-page.is-compact .farmer-release-fruit { width: 23px; height: 23px; }
.dual-page.is-compact .farmer-release-fruit,
.dual-page.is-compact .farmer-release-arc { display: none; }
.dual-page.is-compact .round-banner { left: 56px; width: calc(100% - 112px); top: calc(50% - 104px); padding: 10px; font-size: 17px; line-height: 1.35; border-radius: 18px; }
.dual-page.is-compact .round-banner.bottom { top: auto; bottom: calc(50% - 104px); }
.dual-page.is-compact .round-banner small { margin-top: 4px; font-size: 11px; }
.dual-page.is-compact.farmer-game .round-banner.bottom { top: 50%; bottom: auto; transform: translateY(-50%); }
.dual-page.is-compact .duel-toast { display: none; }

/* Tall narrow phones still need compact horizontal HUD sizing. */
@media (max-width: 650px) {
  .picnic-game-shell > .game-settings-bar { margin-inline: 6px; }
}
