/* Keep the next line within a comfortable thumb target, clear of screen edges. */
@media (max-width: 1024px), (pointer: coarse) {
  .game-view .dialogue-panel {
    bottom: max(28px, calc(env(safe-area-inset-bottom) + 20px));
  }
  .game-view .dialogue-footer {
    gap: 12px;
    padding-right: clamp(24px, 4vw, 48px);
    padding-bottom: 16px;
  }
  .game-view #dialogue-next {
    min-width: 144px;
    min-height: 56px;
    padding: 13px 24px;
    flex-shrink: 0;
    justify-content: center;
    font-size: 16px;
    line-height: 1.4;
    gap: 14px;
    border-radius: 5px;
  }
  .game-view #dialogue-next svg { width: 18px; height: 18px; }
}

@media (max-width: 600px) and (orientation: portrait) {
  .game-view .dialogue-footer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding-right: 4px;
    padding-bottom: 14px;
  }
  .game-view #dialogue-next {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(220px, 100%);
  }
}

@media (max-height: 360px) and (orientation: landscape) {
  .game-view .dialogue-panel {
    bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px));
  }
  .game-view .dialogue-footer { padding-bottom: 12px; }
  .game-view #dialogue-next { min-height: 52px; padding-top: 11px; padding-bottom: 11px; }
}
