/* P1300 — tela "Escolha seu personagem" no celular: uma coluna rolável, lista de personagens
   visível em grade no topo, detalhes logo abaixo e o botão Criar sempre à vista no rodapé. */
@media (max-width: 760px), (max-height: 520px) and (pointer: coarse) {
  html body #characterSelect.character-select-backdrop { padding: 0 !important; align-items: stretch !important; justify-items: stretch !important; }
  html body #characterSelect .character-select-window {
    position: fixed !important; inset: env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px) !important;
    width: auto !important; height: auto !important; max-width: none !important; max-height: none !important;
    display: flex !important; flex-direction: column !important; overflow: hidden !important; transform: none !important; margin: 0 !important; border-radius: 0 !important;
  }
  html body #characterSelect .character-select-head { width: auto !important; flex: none !important; flex-wrap: wrap !important; gap: 6px !important; padding: 10px 12px 6px !important; height: auto !important; }
  html body #characterSelect .character-select-head > div:first-child { width: auto !important; flex: 1 1 100% !important; min-width: 0 !important; }
  html body #characterSelect #characterSelectTitle { font-size: 20px !important; line-height: 1.15 !important; height: auto !important; white-space: normal !important; }
  html body #characterSelect #characterSelectSubtitle { white-space: normal !important; overflow: visible !important; height: auto !important; font-size: 12px !important; }
  html body #characterSelect #characterSelectStep { width: auto !important; }
  html body #characterSelect .character-select-body {
    position: static !important; flex: 1 1 auto !important; min-height: 0 !important; width: auto !important; height: auto !important;
    display: flex !important; flex-direction: column !important; gap: 10px !important; overflow-y: auto !important; overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch; padding: 8px 12px 12px !important;
  }
  html body #characterSelect #characterIdentitySetup { width: auto !important; height: auto !important; display: grid !important; grid-template-columns: 1fr !important; gap: 8px !important; padding: 0 !important; }
  html body #characterSelect #characterIdentitySetup > * { width: auto !important; min-width: 0 !important; }
  html body #characterSelect #characterRoster {
    width: auto !important; height: auto !important; max-height: none !important; overflow: visible !important; flex: none !important;
    display: grid !important; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; grid-template-rows: none !important; grid-auto-rows: auto !important; gap: 8px !important; padding: 0 !important;
  }
  html body #characterSelect #characterRoster .character-roster-section { grid-column: 1 / -1 !important; width: auto !important; }
  html body #characterSelect #characterRoster .character-roster-card { width: auto !important; min-width: 0 !important; height: auto !important; min-height: 64px !important; }
  html body #characterSelect #characterDetail { width: auto !important; height: auto !important; max-height: none !important; overflow: visible !important; flex: none !important; padding: 10px !important; }
  html body #characterSelect #characterDetail > * { width: auto !important; max-width: 100% !important; }
  html body #characterSelect #characterDetail .character-hero { display: grid !important; grid-template-columns: 72px 1fr !important; grid-template-rows: none !important; gap: 10px !important; height: auto !important; align-items: start !important; }
  html body #characterSelect #characterDetail .character-hero > * { min-width: 0 !important; height: auto !important; }
  html body #characterSelect #characterDetail .character-info-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 8px !important; height: auto !important; }
  html body #characterSelect #characterDetail .character-info-grid > * { min-width: 0 !important; }
  html body #characterSelect .starter-weapon-choice { height: auto !important; }
  html body #characterSelect .starter-weapon-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important; gap: 8px !important; }
  html body #characterSelect .starter-weapon-grid > * { min-width: 0 !important; width: auto !important; }
  html body #characterSelect #characterConfirm {
    position: static !important; flex: none !important; width: auto !important; height: auto !important; display: flex !important; align-items: center !important; gap: 10px !important;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom,0px)) !important; border-top: 1px solid rgba(255,255,255,.12) !important;
  }
  html body #characterSelect #characterConfirm .character-confirm-copy { flex: 1 1 auto !important; min-width: 0 !important; width: auto !important; }
  html body #characterSelect #createCharacterSummary, html body #characterSelect #createCharacterHint { white-space: normal !important; height: auto !important; font-size: 12px !important; }
  html body #characterSelect #confirmCharacterPick { flex: none !important; width: auto !important; min-width: 120px !important; height: 44px !important; }
  html body #characterSelect * { word-break: normal !important; overflow-wrap: anywhere; }
}
