/* Dedicated rows keep portal navigation outside the game's viewport. */
html:has(body.border-layout-v3) { overflow: hidden; }
body.embedded-game.border-layout-v3 {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
}
body.border-layout-v3 > .game-nav-overlay {
  position: static;
  grid-row: 1;
  width: 100%;
  height: auto;
  min-height: 56px;
  padding: calc(6px + env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) 6px max(10px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  border-bottom: 1px solid #dce0e4;
  z-index: auto;
}
body.border-layout-v3 > .game-nav-overlay > .game-list-link {
  flex: 0 0 auto;
  width: auto;
  min-width: 104px;
  min-height: 44px;
  padding: 8px 14px;
  font-size: 15px;
  line-height: 1.2;
}
body.border-layout-v3 > iframe {
  grid-row: 2;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border: 0;
}
body.border-layout-v3 > .game-follow {
  position: static;
  grid-row: 3;
  width: 100%;
  height: auto;
  min-height: 40px;
  padding: 2px max(8px, env(safe-area-inset-right, 0px)) calc(2px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  flex-wrap: wrap;
  gap: 0 8px;
  z-index: auto;
}
body.border-layout-v3 > noscript { display: none; }
