/* Scoped reflow fixes; no game, camera or navigation logic. */
.lph-modal-layer .lph-modal {
  box-sizing: border-box;
  width: min(720px, 100%);
  min-width: 0;
  max-height: calc(100dvh - 36px);
  overscroll-behavior: contain;
}
.lph-modal-body,
.lph-modal-body > *,
.lph-detail-head > div,
.lph-field,
.lph-match > div { min-width: 0; }
.lph-modal-head h3,
.lph-detail-head h3,
.lph-detail-head p,
.lph-match strong { overflow-wrap: anywhere; }
.lph-match { grid-template-columns: auto minmax(0, 1fr) auto; }
.lph-field input { width: 100%; min-width: 0; max-width: 100%; }
.lph-upload { flex-wrap: wrap; }
.lph-upload > * { min-width: 0; max-width: 100%; }
.lph-modal-actions { flex-wrap: wrap; }
@media (max-width: 480px) {
  .lph-modal-body { padding: 16px; }
  .lph-modal-head { padding: 18px 16px; }
  .lph-modal-actions .lph-btn { min-height: 44px; white-space: normal; }
  .lph-detail-head { align-items: flex-start; }
}
.board-help-modal .board-help-dialog {
  box-sizing: border-box;
  min-width: 0;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.board-help-modal .board-help-title,
.board-help-modal .board-help-title > div,
.board-help-modal .board-help-warning > div,
.board-help-modal .board-help-live > div { min-width: 0; }
.board-help-modal .board-help-close { flex-shrink: 0; }
.board-help-modal #boardHelpError { overflow-wrap: anywhere; }
@media (max-width: 480px), (max-height: 480px) {
  .board-help-modal { padding: 12px; }
  .board-help-modal .board-help-dialog { max-height: calc(100dvh - 24px); }
  .board-help-modal .board-help-head { gap: 10px; padding: 18px 16px 14px; }
  .board-help-modal .board-help-body { padding: 16px; }
  .board-help-modal .board-help-title { gap: 10px; }
  .board-help-modal .board-help-title > span { width: 36px; height: 36px; }
  .board-help-modal .board-help-actions > button { min-height: 44px; white-space: normal; }
}
@media (max-width: 380px) {
  .board-help-modal .board-help-linkbox { grid-template-columns: minmax(0, 1fr); }
  .board-help-modal .board-help-actions > button { width: 100%; }
  .board-help-modal .board-help-live { flex-wrap: wrap; }
}
