/* Post-release mobile orientation control: only the runtime-resolved
   stik-phone-landscape class activates the compact landscape composition.
   Portrait Locked never receives that class, even if the host rotates. */

.pocket-orientation-panel[hidden]{display:none!important}
.pocket-orientation-panel{
  grid-column:1/-1;
  display:grid;
  gap:9px;
  padding:10px;
  border:1px solid rgba(113,180,224,.2);
  border-radius:14px;
  background:rgba(5,15,27,.48);
}
.pocket-orientation-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.pocket-orientation-options button{
  min-width:0;
  min-height:54px;
  display:grid;
  grid-template-columns:16px minmax(0,1fr);
  align-items:center;
  gap:5px;
  padding:7px;
  border:1px solid rgba(116,169,208,.2);
  border-radius:11px;
  background:rgba(8,20,34,.72);
  color:var(--v004-text,var(--text));
  font:inherit;
  text-align:left;
}
.pocket-orientation-options button>span{font-size:14px;color:var(--v004-muted,var(--muted))}
.pocket-orientation-options button>strong{font-size:11px;line-height:1.25}
.pocket-orientation-options button.selected{border-color:rgba(84,202,255,.62);background:rgba(31,131,184,.18)}
.pocket-orientation-options button.selected>span{color:#69d2ff}
.pocket-orientation-options button.selected>span::before{content:"●";font-size:11px}
.pocket-orientation-options button.selected>span{font-size:0}
.pocket-orientation-options button:focus-visible{outline:3px solid rgba(105,210,255,.42);outline-offset:2px}
.pocket-orientation-panel p{margin:0;color:var(--v004-muted,var(--muted));font-size:10px;line-height:1.45}

html[data-stik-theme="light"] .pocket-orientation-panel{background:rgba(238,244,248,.68)}
html[data-stik-theme="light"] .pocket-orientation-options button{background:rgba(255,255,255,.68)}

@media (pointer:coarse) and (min-width:761px) and (max-width:960px) and (max-height:600px){
  html.stik-phone-landscape{--pocket-nav-height:56px}

  html.stik-phone-landscape,html.stik-phone-landscape.pocket-home-active{
    height:auto!important;
    min-height:100%!important;
    max-height:none!important;
    overflow-x:clip!important;
    overflow-y:auto!important;
  }
  html.stik-phone-landscape body,html.stik-phone-landscape body.pocket-home-active{
    height:auto!important;
    min-height:100dvh!important;
    max-height:none!important;
    overflow-x:clip!important;
    overflow-y:visible!important;
  }
  html.stik-phone-landscape body.pocket-home-active .app{
    height:auto!important;
    min-height:100dvh!important;
    max-height:none!important;
    overflow:visible!important;
  }
  html.stik-phone-landscape body.pocket-home-active:not(.view-only):not(.trial-mode):not(.play-mode) .topbar{display:none!important}
  html.stik-phone-landscape .nav,html.stik-phone-landscape .mobile-nav-backdrop,html.stik-phone-landscape .journey-bar,html.stik-phone-landscape .quick-nav-shell{display:none!important}

  html.stik-phone-landscape #dashboardView.active{
    position:relative!important;
    isolation:isolate;
    height:auto!important;
    min-height:100dvh!important;
    max-height:none!important;
    overflow:visible!important;
    padding:max(8px,var(--v004-safe-top)) max(10px,var(--v004-safe-right)) calc(14px + var(--pocket-nav-height) + var(--pocket-browser-bottom,0px) + var(--v004-safe-bottom)) max(10px,var(--v004-safe-left))!important;
    background:var(--v004-bg)!important;
  }
  html.stik-phone-landscape #dashboardView .pocket-home-dashboard{
    width:min(100%,920px)!important;
    height:auto!important;
    min-height:0!important;
    display:grid!important;
    grid-template-columns:minmax(270px,.86fr) minmax(390px,1.14fr)!important;
    grid-template-rows:auto auto auto!important;
    align-items:start!important;
    gap:8px 10px!important;
    margin:0 auto!important;
    overflow:visible!important;
  }
  html.stik-phone-landscape .pocket-home-overview{
    grid-column:1!important;
    grid-row:1!important;
    min-height:96px!important;
    grid-template-columns:minmax(104px,1fr) auto!important;
    gap:6px 10px!important;
    padding:9px 11px 10px!important;
  }
  html.stik-phone-landscape .pocket-home-logo{width:min(132px,100%)!important;height:52px!important}
  html.stik-phone-landscape .pocket-home-completion{min-width:96px!important}
  html.stik-phone-landscape .pocket-home-completion strong{font-size:clamp(32px,6vw,43px)!important}
  html.stik-phone-landscape .pocket-home-main-progress{height:8px!important}

  html.stik-phone-landscape .pocket-home-deal-search{grid-column:1!important;grid-row:2!important}
  html.stik-phone-landscape #dashboardView .pocket-home-deal-search .deal-quick-input{min-height:46px!important;height:46px!important}
  html.stik-phone-landscape .pocket-home-status-grid{grid-column:1!important;grid-row:3!important;gap:6px!important}
  html.stik-phone-landscape .pocket-home-status-grid button,html.stik-phone-landscape .pocket-home-status-grid>div{min-height:60px!important;padding:6px 4px!important}
  html.stik-phone-landscape .pocket-home-status-grid strong{font-size:clamp(17px,3.2vw,23px)!important}

  html.stik-phone-landscape .pocket-home-generations{
    grid-column:2!important;
    grid-row:1 / span 3!important;
    gap:6px!important;
    padding:9px!important;
  }
  html.stik-phone-landscape .pocket-home-generation-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}
  html.stik-phone-landscape .pocket-home-generation-grid button{min-height:82px!important;padding:7px!important}
  html.stik-phone-landscape .pocket-home-generation-art{width:68%!important;height:76%!important}
  html.stik-phone-landscape .pocket-home-generation-copy b{font-size:9px!important}
  html.stik-phone-landscape .pocket-home-generation-copy strong{font-size:16px!important}

  html.stik-phone-landscape .pocket-nav{
    display:grid!important;
    min-height:calc(var(--pocket-nav-height) + var(--v004-safe-bottom))!important;
    gap:4px!important;
    padding:3px max(8px,var(--v004-safe-right)) calc(3px + var(--v004-safe-bottom)) max(8px,var(--v004-safe-left))!important;
  }
  html.stik-phone-landscape .pocket-nav button{min-height:48px!important;border-radius:14px!important}
  html.stik-phone-landscape .pocket-nav-icon{width:25px!important;height:25px!important}
  html.stik-phone-landscape .pocket-nav-icon svg{width:22px!important;height:22px!important}
  html.stik-phone-landscape .pocket-nav-badge{top:1px!important}
  html.stik-phone-landscape .pocket-sheet{max-height:calc(100dvh - var(--pocket-nav-height) - var(--pocket-browser-bottom,0px) - 12px)!important}

  html.stik-orientation-portrait-locked,html.stik-orientation-portrait-locked.pocket-home-active{
    height:auto!important;
    min-height:100%!important;
    max-height:none!important;
    overflow-x:clip!important;
    overflow-y:auto!important;
  }
  html.stik-orientation-portrait-locked body,html.stik-orientation-portrait-locked body.pocket-home-active{
    height:auto!important;
    min-height:100dvh!important;
    max-height:none!important;
    overflow-x:clip!important;
    overflow-y:visible!important;
  }
  html.stik-orientation-portrait-locked body .app{
    width:min(100%,480px)!important;
    height:auto!important;
    min-height:100dvh!important;
    max-height:none!important;
    margin:0 auto!important;
    overflow:visible!important;
  }
  html.stik-orientation-portrait-locked #dashboardView.active{
    height:auto!important;
    min-height:100dvh!important;
    max-height:none!important;
    overflow:visible!important;
  }
  html.stik-orientation-portrait-locked #dashboardView .pocket-home-dashboard{
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    grid-template-columns:1fr!important;
    overflow:visible!important;
  }
  html.stik-orientation-portrait-locked .pocket-nav{
    left:50%!important;
    right:auto!important;
    width:min(100%,480px)!important;
    transform:translateX(-50%)!important;
  }
  html.stik-orientation-portrait-locked .pocket-sheet{
    left:50%!important;
    right:auto!important;
    width:min(calc(100% - 16px),464px)!important;
    transform:translate(-50%,24px) scale(.98)!important;
  }
  html.stik-orientation-portrait-locked .pocket-sheet.show{transform:translateX(-50%)!important}
}

@media (pointer:coarse) and (min-width:761px) and (max-width:820px) and (max-height:600px){
  html.stik-phone-landscape #dashboardView .pocket-home-dashboard{grid-template-columns:minmax(250px,.84fr) minmax(360px,1.16fr)!important}
  html.stik-phone-landscape .pocket-home-generation-grid button{min-height:78px!important}
}

@media (prefers-reduced-motion:reduce){
  .mobile-home-pokeball{will-change:auto!important}
}
