/* B96: position only. Fullscreen and information retain their original owners. */
html[data-b96-mobile-toolbar] #b93-page-info-link {
  left:var(--b96-info-left,calc(50% - 22px));
  top:var(--b96-info-top,max(8px,env(safe-area-inset-top)));
  right:auto;bottom:auto;width:44px;min-width:44px;height:44px;min-height:44px;
  padding:0;gap:0;transform:none;touch-action:manipulation;
}
html[data-b96-mobile-toolbar] #b93-page-info-link .b93-info-label {display:none;}
html[data-b96-mobile-toolbar] #b93-page-info-link[data-b96-space="none"] {visibility:hidden;pointer-events:none;}

@media (orientation:landscape) and (max-height:520px) {
  /* Keep these after the desktop theme, which otherwise re-expands the header. */
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-header {
    grid-template-columns:minmax(0,1fr) minmax(150px,210px) 44px!important;
    gap:8px;padding:5px 10px!important;min-height:44px;
  }
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-header h2 {
    font-size:22px!important;line-height:1.15!important;margin:0!important;
  }
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-search input {
    min-height:44px!important;height:44px;font-size:16px!important;
  }
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-filters {
    min-height:44px;flex:0 0 auto;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior:contain;
  }
  html[data-sejm-interface] body #r25CharacterEncyclopedia .b95-style-filters {
    flex:0 0 auto;flex-wrap:nowrap;overflow-x:auto;max-width:100%;box-sizing:border-box;
  }
  html[data-sejm-interface] body #r25CharacterEncyclopedia .b95-style-filters label {flex:0 0 auto;}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-body {
    min-height:0!important;flex:1 1 0%;
  }
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-detail {
    min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;
  }
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-grid {
    grid-template-columns:repeat(auto-fill,minmax(min(220px,100%),1fr));
    grid-auto-rows:minmax(124px,max-content);overscroll-behavior:contain;touch-action:pan-y;
  }
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-card-copy strong {font-size:16px!important;}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-card-archetype {font-size:13px!important;}
  html[data-sejm-interface] body #r25CharacterEncyclopedia :is(.r25-encyclopedia-kit-section p,.r25-encyclopedia-combo p,.r25-encyclopedia-input-help p,.r25-encyclopedia-system-card p,.r25-encyclopedia-bio p) {
    font-size:16px!important;line-height:1.45!important;
  }
  html[data-sejm-interface] body :is(#r25CharacterEncyclopedia,#pack185SettingsHub,#b37HelpHub,#r54-training-chooser,#r54-experience-hub,#r70-result-screen) :is(button,summary) {
    min-height:44px!important;touch-action:manipulation;
  }
  html[data-sejm-interface] body :is(#r25CharacterEncyclopedia,#pack185SettingsHub,#r54-training-chooser,#r54-experience-hub) :is(input,select) {
    font-size:16px!important;
  }
}
@media (orientation:landscape) and (max-height:420px) {
  /* In a character card, return-to-list restores all roster filters. Keep the
     body usable on short phones rather than spending half of it on filters. */
  html[data-sejm-interface] body #r25CharacterEncyclopedia.r25-encyclopedia-view-detail :is(.r25-encyclopedia-filters,.b95-style-filters) {display:none;}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-mobile-nav {min-height:44px;padding:2px 0;margin-bottom:6px;}
}
