/* B98: compact reading and menu surfaces on a landscape phone. All existing
   owners, links, save actions, chapter buttons, and keyboard routes remain. */
@media (orientation:landscape) and (max-width:1100px) and (max-height:620px) and (pointer:coarse){
  /* The modern full-screen hubs provide their own scrollport. Never make the
     window/body the scrollport: the close/back controls stay visible. */
  html[data-sejm-interface] body :is(#r25CharacterEncyclopedia,#r54-experience-hub,#b37HelpHub,#pack185SettingsHub,#pack182GfxPanel){
    max-height:100dvh!important;overflow:hidden!important;
  }
  html[data-sejm-interface] body :is(#r25CharacterEncyclopedia,#r54-experience-hub,#b37HelpHub){
    width:100vw!important;height:100dvh!important;min-height:0!important;padding:0!important;
  }
  html[data-sejm-interface] body :is(#r25CharacterEncyclopedia,#r54-experience-hub,#b37HelpHub) :is(.r25-encyclopedia-window,.r54-hub-window,.b37-card){
    height:100%!important;min-height:0!important;max-height:100%!important;overflow:hidden!important;
  }
  html[data-sejm-interface] body :is(#r25CharacterEncyclopedia,#r54-experience-hub,#b37HelpHub) :is(.r25-encyclopedia-header,.r54-hub-window>header,.b37-head){
    flex:0 0 auto;min-height:54px;padding:4px max(12px,env(safe-area-inset-right)) 4px max(12px,env(safe-area-inset-left))!important;
  }
  html[data-sejm-interface] body :is(#r25CharacterEncyclopedia,#r54-experience-hub,#b37HelpHub) :is(.r25-encyclopedia-close,.b37-close,header>[data-r54-action="close"]){
    width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;
  }

  /* Encyclopedia: a one-line index and an independently scrollable character
     card. The list/detail owner still determines which pane is visible. */
  html[data-sejm-interface] body #r25CharacterEncyclopedia{
    --b97-reading:clamp(14px,calc(12px * var(--sk-r45-text-scale,1.25)),19px);
  }
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-header{
    grid-template-columns:minmax(0,1fr) minmax(164px,34vw) 44px!important;gap:8px!important;
  }
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-heading :is(.sk-b55-kicker,p){display:none!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-heading h2{font-size:clamp(20px,3vw,26px)!important;line-height:1.12!important;margin:0!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-search input{height:44px!important;min-height:44px!important;padding:6px 10px!important;font-size:16px!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-filters{min-height:44px!important;max-height:48px!important;gap:3px!important;padding:0 max(12px,env(safe-area-inset-left))!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-filters button{min-height:44px!important;max-height:48px!important;padding:6px 10px!important;font-size:14px!important;white-space:nowrap!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .b95-style-filters{min-height:44px;max-height:52px;padding:2px max(12px,env(safe-area-inset-left))!important;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .b95-style-filters :is(button,select){min-height:44px!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-body{min-height:0!important;flex:1 1 auto!important;padding:4px max(8px,env(safe-area-inset-right)) 4px max(8px,env(safe-area-inset-left))!important;overflow:hidden!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-roster{min-height:0!important;overflow:hidden!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-grid{min-height:0!important;grid-template-columns:repeat(auto-fill,minmax(188px,1fr))!important;grid-auto-rows:minmax(92px,max-content)!important;gap:6px!important;padding:2px 3px 8px!important;overflow-y:auto!important;touch-action:pan-y}
  html[data-sejm-interface] body #r25CharacterEncyclopedia button.r25-encyclopedia-card{min-height:92px!important;height:auto!important;display:grid!important;grid-template-columns:66px minmax(0,1fr)!important;align-items:center!important;padding:4px!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-card-media{width:66px!important;height:82px!important;min-height:82px!important;flex:0 0 82px!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-card-copy{min-width:0!important;padding:4px 5px 4px 8px!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-card-copy strong{font-size:16px!important;line-height:1.15!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-detail{min-height:0!important;padding:5px 9px!important;overflow-y:auto!important;scroll-padding-top:106px!important;touch-action:pan-y!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-mobile-nav{position:sticky!important;top:-5px!important;z-index:8!important;min-height:44px!important;gap:8px!important;margin:-5px -9px 0!important;padding:0 9px!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-mobile-nav button{height:44px!important;min-height:44px!important;padding:4px 10px!important;white-space:nowrap}
  html[data-sejm-interface] body #r25CharacterEncyclopedia [data-r25-encyclopedia-detail]{display:flex;flex-direction:column;min-width:0}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r72-fighter-guide-jumps{order:-1;position:sticky!important;top:44px!important;z-index:7!important;display:flex;flex:0 0 auto;flex-wrap:nowrap!important;min-height:44px!important;gap:4px!important;margin:0 -9px 6px!important;padding:0 9px!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none;background:var(--b97-bg,#141716)!important;border-bottom:1px solid var(--b97-line,#ffffff1c)!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r72-fighter-guide-jumps button{flex:1 0 max-content!important;min-height:44px!important;padding:4px 9px!important;font-size:13px!important;white-space:nowrap!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia :is(#r72-guide-plan,#r72-guide-combos,#r72-guide-mechanics,#r72-guide-story){scroll-margin-top:106px}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-hero{grid-template-columns:92px minmax(0,1fr)!important;gap:10px!important;margin:3px 0 8px!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-detail-media{height:132px!important;min-height:132px!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-intro h3{font-size:22px!important;margin:2px 0!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-intro :is(.r25-encyclopedia-nick,.r25-encyclopedia-archetype-summary){margin:2px 0 5px!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-stats{grid-template-columns:1fr 1fr!important;gap:2px 8px!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-stat{min-height:24px!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-kit-grid{grid-template-columns:1fr 1fr!important;gap:6px!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-kit-section{padding:8px!important}

  /* My game: three independent editorial columns already produced by B97,
     with compact actions. No text, action, or disabled state is removed. */
  html[data-sejm-interface] body #r54-experience-hub .r54-hub-window{display:flex!important;flex-direction:column!important}
  html[data-sejm-interface] body #r54-experience-hub .r54-hub-scroll{min-height:0!important;flex:1 1 auto!important;padding:7px max(12px,env(safe-area-inset-right)) 10px max(12px,env(safe-area-inset-left))!important;overflow-y:auto!important;touch-action:pan-y}
  html[data-sejm-interface] body #r54-experience-hub .r54-hub-lead{margin:0 0 7px!important;font-size:13px!important;line-height:1.3!important;max-width:none}
  html[data-sejm-interface] body #r54-experience-hub .r54-hub-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;align-items:start!important}
  html[data-sejm-interface] body #r54-experience-hub .r70-hub-section{font-size:12px!important;line-height:1.25!important;padding:2px 0 5px!important;margin:0 0 3px!important}
  html[data-sejm-interface] body #r54-experience-hub .b97-hub-chapter>button{min-width:0!important;min-height:58px!important;padding:7px 8px!important;gap:5px!important}
  html[data-sejm-interface] body #r54-experience-hub .r54-hub-grid strong{font-size:clamp(15px,2.1vw,20px)!important;line-height:1.15!important;overflow-wrap:anywhere}
  html[data-sejm-interface] body #r54-experience-hub .r54-hub-grid small{font-size:12px!important;line-height:1.22!important;margin-top:3px!important;overflow-wrap:anywhere}
  html[data-sejm-interface] body #r54-experience-hub .r54-hub-window>footer{flex:0 0 auto;min-height:44px;padding:2px max(12px,env(safe-area-inset-right)) 2px max(12px,env(safe-area-inset-left))!important}

  /* Settings: tabs remain visible; only the active settings pane scrolls.
     This also keeps the persistent Back button clear of the home indicator. */
  html[data-sejm-interface] body #pack185SettingsHub{padding:0!important}
  html[data-sejm-interface] body #pack185SettingsHub .sk-b55-modal-window{width:100%!important;height:100dvh!important;max-height:100dvh!important;min-height:0!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:54px 48px minmax(0,1fr) 52px!important;overflow:hidden!important}
  html[data-sejm-interface] body #pack185SettingsHub .sk-b55-modal-window>header{grid-area:1/1!important;padding:3px max(12px,env(safe-area-inset-right)) 3px max(12px,env(safe-area-inset-left))!important;min-height:54px!important}
  html[data-sejm-interface] body #pack185SettingsHub .sk-b55-modal-window>header :is(.sk-b55-kicker,[data-b89-version]){display:none!important}
  html[data-sejm-interface] body #pack185SettingsHub .sk-b55-modal-window>header h2{font-size:24px!important;margin:0!important}
  html[data-sejm-interface] body #pack185SettingsHub .r70-settings-nav{grid-area:2/1!important;display:flex!important;flex-direction:row!important;align-items:stretch!important;gap:2px!important;overflow-x:auto!important;overflow-y:hidden!important;min-height:48px!important;padding:0 max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left))!important;border-right:0!important;border-bottom:1px solid var(--b97-line,#ffffff1c)!important;scrollbar-width:none}
  html[data-sejm-interface] body #pack185SettingsHub .r70-settings-nav button{flex:0 0 auto!important;min-height:44px!important;padding:5px 11px!important;font-size:15px!important;white-space:nowrap!important}
  html[data-sejm-interface] body #pack185SettingsHub .sk-b55-settings-scroll{grid-area:3/1!important;min-height:0!important;display:block!important;overflow-y:auto!important;padding:8px max(12px,env(safe-area-inset-right)) 12px max(12px,env(safe-area-inset-left))!important;touch-action:pan-y}
  html[data-sejm-interface] body #pack185SettingsHub .sk-b55-setting-card{max-width:none!important;padding:2px 0 12px!important;margin:0 0 12px!important}
  html[data-sejm-interface] body #pack185SettingsHub .sk-b55-setting-card h3{font-size:20px!important;margin:0 0 5px!important}
  html[data-sejm-interface] body #pack185SettingsHub .sk-b55-setting-card p{font-size:clamp(13px,calc(11px * var(--sk-r45-text-scale,1.25)),17px)!important;line-height:1.3!important;margin:2px 0 8px!important}
  html[data-sejm-interface] body #pack185SettingsHub .sk-b55-difficulty-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important;margin-top:5px!important}
  html[data-sejm-interface] body #pack185SettingsHub .sk-b55-difficulty-grid button{min-width:0!important;min-height:56px!important;padding:6px!important;font-size:14px!important}
  html[data-sejm-interface] body #pack185SettingsHub .sk-b55-difficulty-grid button small{font-size:11px!important;line-height:1.18!important;margin-top:2px!important}
  html[data-sejm-interface] body #pack185SettingsHub .sk-b55-action-row{display:flex;gap:5px!important;flex-wrap:wrap}
  html[data-sejm-interface] body #pack185SettingsHub .sk-b55-action-row button{min-height:44px!important;min-width:0!important;padding:6px 9px!important;font-size:14px!important}
  html[data-sejm-interface] body #pack185SettingsHub .sk-b55-modal-window>footer{grid-area:4/1!important;min-height:52px!important;padding:2px max(12px,env(safe-area-inset-right)) max(2px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important}
  html[data-sejm-interface] body #pack185SettingsHub .sk-b55-modal-window>footer button{min-height:44px!important}

  /* Current and legacy graphics subtabs retain every field in a dedicated
     center scrollport, while Apply/Back remain in the bottom command row. */
  html[data-sejm-interface] body #pack182GfxPanel{inset:0!important;padding:0!important}
  html[data-sejm-interface] body #pack182GfxPanel .p182-window{position:fixed!important;inset:0!important;left:0!important;top:0!important;transform:none!important;width:100%!important;height:100dvh!important;max-height:100dvh!important;min-height:0!important;display:grid!important;grid-template-rows:auto auto minmax(0,1fr) auto auto!important;gap:0!important;padding:6px max(12px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important;overflow:hidden!important}
  html[data-sejm-interface] body #pack182GfxPanel .p182-title{font-size:23px!important;line-height:1.2!important;margin:0!important}
  html[data-sejm-interface] body #pack182GfxPanel .p182-sub{font-size:12px!important;line-height:1.2!important;margin:0 0 4px!important}
  html[data-sejm-interface] body #pack182GfxPanel .p182-grid{min-height:0!important;display:grid!important;grid-template-columns:minmax(130px,.65fr) minmax(0,1.35fr)!important;gap:4px 8px!important;align-items:center;overflow-y:auto!important;overscroll-behavior:contain;touch-action:pan-y;padding:2px 3px!important}
  html[data-sejm-interface] body #pack182GfxPanel .p182-grid>.p182-label{font-size:13px!important;line-height:1.2!important;min-height:44px!important;display:flex!important;align-items:center!important}
  html[data-sejm-interface] body #pack182GfxPanel .p182-rowbox{padding:4px 6px!important;min-width:0!important}
  html[data-sejm-interface] body #pack182GfxPanel .p182-rowbox :is(select,button){min-height:44px!important;font-size:16px!important}
  html[data-sejm-interface] body #pack182GfxPanel .p182-value{font-size:11px!important;line-height:1.2!important;margin:2px 0!important}
  html[data-sejm-interface] body #pack182GfxPanel .p182-summary{max-height:40px;overflow-y:auto;min-height:0;margin:2px 0;padding:2px 0;font-size:12px!important;line-height:1.2!important}
  html[data-sejm-interface] body #pack182GfxPanel .p182-summary:empty{display:none!important}
  html[data-sejm-interface] body #pack182GfxPanel .p182-buttons{display:flex!important;flex:0 0 auto;gap:5px!important;flex-wrap:nowrap!important;margin:0!important;padding:3px 0 0!important}
  html[data-sejm-interface] body #pack182GfxPanel .p182-buttons button{flex:1 1 0;min-width:0!important;min-height:44px!important;padding:5px 7px!important;font-size:13px!important}
  html[data-sejm-interface] body #pack152GfxPanel .window{width:100%!important;height:100dvh!important;max-height:100dvh!important;inset:0!important;left:0!important;top:0!important;transform:none!important;border:0!important;padding:8px max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important;overflow-y:auto!important}
  html[data-sejm-interface] body #pack152GfxPanel .grid{grid-template-columns:minmax(115px,.7fr) minmax(0,1.3fr)!important;gap:5px 9px!important}
  html[data-sejm-interface] body #pack152GfxPanel .buttons button{min-height:44px!important}

  /* Fallback help hub: its four tabs and footer stay on screen; a section is
     the only scrolling element, with text large enough to read in landscape. */
  html[data-sejm-interface] body #b37HelpHub .b37-card{grid-template-rows:54px 44px minmax(0,1fr) 52px!important}
  html[data-sejm-interface] body #b37HelpHub .b37-head{min-height:54px!important}
  html[data-sejm-interface] body #b37HelpHub .b37-title{font-size:22px!important;line-height:1.1!important}
  html[data-sejm-interface] body #b37HelpHub .b37-sub{display:none!important}
  html[data-sejm-interface] body #b37HelpHub .b37-tabs{min-height:44px!important;max-height:44px!important;display:flex!important;gap:4px!important;padding:0 max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left))!important;overflow-x:auto!important;overflow-y:hidden!important}
  html[data-sejm-interface] body #b37HelpHub .b37-tabs button{min-height:44px!important;min-width:max(104px,20vw)!important;padding:3px 8px!important;font-size:14px!important;flex:1 0 auto!important}
  html[data-sejm-interface] body #b37HelpHub .b37-body{min-height:0!important;overflow-y:auto!important;padding:8px max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left))!important;touch-action:pan-y}
  html[data-sejm-interface] body #b37HelpHub .b37-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  html[data-sejm-interface] body #b37HelpHub .b37-box{min-height:0!important;padding:6px 8px!important}
  html[data-sejm-interface] body #b37HelpHub .b37-k{font-size:13px!important;margin:0 0 2px!important}
  html[data-sejm-interface] body #b37HelpHub .b37-v{font-size:14px!important;line-height:1.27!important}
  html[data-sejm-interface] body #b37HelpHub .b37-foot{min-height:52px!important;padding:2px max(12px,env(safe-area-inset-right)) max(2px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important}
  html[data-sejm-interface] body #b37HelpHub .b37-actions button{min-height:44px!important}

  /* Actual Help path: B97 chapter switches already exist. Convert its modal
     into a fixed reader with a pinned chapter rail and an inner scrollport. */
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="first-run"]{height:100dvh!important;max-height:100dvh!important;min-height:0!important;display:flex!important;align-items:stretch!important;overflow:hidden!important;padding:0!important;touch-action:none!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="first-run"] .sk-r40r42-panel{display:flex!important;flex-direction:column!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important;margin:0!important;padding:6px max(12px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important;overflow:hidden!important;font-size:clamp(14px,calc(11px * var(--r47-onboarding-scale,1.25)),18px)!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="first-run"] .r47-onboarding-masthead{flex:0 0 auto;margin:0 0 5px!important;padding:0 0 5px!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="first-run"] .r47-onboarding-intro{flex:0 0 auto}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="first-run"] .sk-r40r42-title{font-size:clamp(21px,4.5vw,28px)!important;margin:0 0 2px!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="first-run"] .sk-r40r42-subtitle{font-size:clamp(14px,calc(11px * var(--r47-onboarding-scale,1.25)),19px)!important;line-height:1.3!important;max-width:none!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="first-run"] .r47-onboarding-devices{flex:0 0 auto;display:flex!important;gap:4px!important;margin:5px 0!important;overflow-x:auto!important;overflow-y:hidden!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="first-run"] .r47-onboarding-device{flex:1 0 auto!important;min-height:44px!important;padding:4px 10px!important;font-size:clamp(14px,calc(11px * var(--r47-onboarding-scale,1.25)),19px)!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="first-run"] .r47-onboarding-basics{flex:1 1 auto;min-height:0;overflow-y:auto!important;overscroll-behavior:contain;touch-action:pan-y!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;align-content:start;margin:0!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="first-run"] .r47-onboarding-basics li{padding:7px 10px!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="first-run"] .r47-onboarding-basics h2{font-size:19px!important;margin:0 0 4px!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="first-run"] .r47-onboarding-basics p{font-size:clamp(14px,calc(11px * var(--r47-onboarding-scale,1.25)),19px)!important;line-height:1.35!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="first-run"] .r47-onboarding-footer{flex:0 0 auto;padding:4px 0 0;border-top:1px solid var(--b97-line);background:var(--b97-bg,#141716)}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="first-run"] .sk-r40r42-actions{display:flex!important;flex-wrap:nowrap!important;gap:6px!important;margin:0!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="first-run"] .sk-r40r42-actions button{flex:1 1 0!important;min-width:0!important;min-height:44px!important;padding:5px 8px!important;font-size:clamp(14px,calc(11px * var(--r47-onboarding-scale,1.25)),19px)!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="first-run"] .r47-onboarding-note{display:none!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="controls"]{height:100dvh!important;max-height:100dvh!important;min-height:0!important;display:flex!important;align-items:stretch!important;justify-content:stretch!important;overflow:hidden!important;padding:0!important;touch-action:none!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="controls"] .sk-r40r42-panel{height:100%!important;max-height:100%!important;min-height:0!important;width:100%!important;max-width:none!important;margin:0!important;padding:4px max(12px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important;overflow:hidden!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="controls"] .r55-controls-guide{display:flex!important;flex-direction:column!important;height:100%!important;min-height:0!important;overflow:hidden!important;font-size:clamp(14px,calc(11px * var(--r47-onboarding-scale,1.25)),18px)!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="controls"] .r55-controls-header{flex:0 0 auto!important;min-height:43px!important;padding:2px 0!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="controls"] .r55-controls-header .sk-r40r42-title{font-size:24px!important;margin:0!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="controls"] .r55-controls-devices{flex:0 0 auto!important;flex-wrap:nowrap!important;min-height:44px!important;gap:3px!important;margin:0!important;padding:0!important;overflow-x:auto!important;overflow-y:hidden!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="controls"] .r55-controls-devices button{min-width:0!important;min-height:44px!important;padding:4px 9px!important;white-space:nowrap!important;font-size:14px!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="controls"] .b97-controls-chapters{flex:0 0 auto!important;min-height:44px!important;gap:3px!important;margin:0!important;overflow-x:auto!important;overflow-y:hidden!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="controls"] .b97-controls-chapters button{min-height:44px!important;min-width:104px!important;padding:4px 10px!important;font-size:14px!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="controls"] .r55-controls-content{flex:1 1 auto!important;min-height:0!important;display:block!important;overflow-y:auto!important;overscroll-behavior:contain;touch-action:pan-y;padding:5px 0!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="controls"] .b97-controls-pane{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="controls"] .r55-controls-section{padding:7px 8px!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="controls"] .r55-controls-section h2{font-size:19px!important;margin:0 0 4px!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="controls"] .r55-controls-guide .r55-controls-return-note{display:none!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="controls"] .r55-controls-footer{position:static!important;flex:0 0 auto!important;min-height:52px!important;margin:0!important;padding:2px 0!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="controls"] .r55-controls-footer button{min-height:44px!important}
}

/* Even the shortest supported landscape displays keep two readable sections
   of My game in the inner scrollport. At standard laptop sizes none apply. */
@media (orientation:landscape) and (max-width:690px) and (max-height:380px) and (pointer:coarse){
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="first-run"] .r47-onboarding-basics{grid-template-columns:1fr!important}
  html body #sk-r40r42-root #sk-r40r42-modal[data-r47-onboarding="first-run"] .r47-onboarding-basics li{border-left:0!important;border-top:1px solid var(--b97-line)!important}
  html[data-sejm-interface] body #r54-experience-hub .r54-hub-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html[data-sejm-interface] body #pack185SettingsHub .sk-b55-difficulty-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* On larger phones the native encyclopedia keeps its simultaneous roster and
   card panes, so the back-to-roster bar is absent. The jumps start at row 0. */
@media (orientation:landscape) and (min-width:781px) and (min-height:521px) and (max-width:1100px) and (max-height:620px) and (pointer:coarse){
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r25-encyclopedia-detail{scroll-padding-top:56px!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia .r72-fighter-guide-jumps{top:0!important}
  html[data-sejm-interface] body #r25CharacterEncyclopedia :is(#r72-guide-plan,#r72-guide-combos,#r72-guide-mechanics,#r72-guide-story){scroll-margin-top:56px}
}
