/* UI 017.3C C.4.5.4 — keyboard continuity + seamless layer handoff visuals.
   Keeps Inventory itself full-height while the software keyboard overlays it. */

/* C.4.5.3 shield is no longer a painted substitute. The actual Inventory layer now
   remains behind the keyboard, so real item cards stay visible instead of a dark fill. */
#i173c-inventory-keyboard-backdrop{
  background:transparent !important;
  opacity:0 !important;
}

/* While the search keyboard is active, do not shrink the modal to visualViewport.height.
   Safari may shrink visualViewport by hundreds of pixels; the keyboard should overlay the
   Inventory, not expose Home underneath it. */
html.i173c-keyboard-continuity #i173c-inventory-layer,
body.i173c-keyboard-continuity #i173c-inventory-layer{
  top:0 !important;
  height:100vh !important;
  min-height:100vh !important;
  max-height:none !important;
}

@supports (height:100lvh){
  html.i173c-keyboard-continuity #i173c-inventory-layer,
  body.i173c-keyboard-continuity #i173c-inventory-layer{
    height:100lvh !important;
    min-height:100lvh !important;
  }
}

html.i173c-keyboard-continuity #i173c-inventory-layer .i173c-scroll,
body.i173c-keyboard-continuity #i173c-inventory-layer .i173c-scroll{
  height:100% !important;
  min-height:100% !important;
}

/* Keep the page beneath neutral; it should never be the visible transition surface. */
html.i173c-keyboard-continuity,
html.i173c-keyboard-continuity body{
  overflow:hidden !important;
}

/* During direct Character/Inventory handoff both isolated layers overlap briefly.
   Their own accepted opacity transitions create the crossfade; no Home frame is exposed. */
#i173a-character-layer.is-closing + #i173c-inventory-layer,
#i173c-inventory-layer.is-closing{
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
}
