html,
body {
  margin: 0;
  width: 100%;
  height: var(--hexwing-play-height, 100dvh);
  min-height: var(--hexwing-play-height, 100dvh);
  overflow: hidden;
  background: #07182c;
  color: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.play-shell {
  height: var(--hexwing-play-height, 100dvh);
  min-height: var(--hexwing-play-height, 100dvh);
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.play-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: max(8px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 8px max(14px, env(safe-area-inset-left));
  background: linear-gradient(90deg, rgba(8, 24, 44, 0.94), rgba(19, 65, 105, 0.84));
  border-bottom: 1px solid rgba(255,255,255,0.12);
  box-sizing: border-box;
}

.play-topbar a {
  color: #dff5ff;
  text-decoration: none;
  font-weight: 800;
}

.play-topbar strong {
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.game-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  display: block;
  background: #7dccff;
}


@media (hover: none) and (pointer: coarse) and (orientation: landscape) {
  html,
  body {
    height: var(--hexwing-play-height, 100dvh);
    min-height: var(--hexwing-play-height, 100dvh);
  }

  .play-shell {
    height: var(--hexwing-play-height, 100dvh);
    min-height: 0;
    grid-template-rows: 34px minmax(0, 1fr);
  }

  .play-topbar {
    min-height: 34px;
    height: 34px;
    padding: 4px calc(10px + env(safe-area-inset-right)) 4px calc(10px + env(safe-area-inset-left));
    gap: 8px;
    font-size: 12px;
    line-height: 1;
  }

  .play-topbar a {
    font-size: 12px;
    font-weight: 850;
  }

  .play-topbar strong {
    font-size: 12px;
    letter-spacing: 0.04em;
  }

  .game-frame {
    width: 100%;
    height: 100%;
    min-height: 0;
  }
}

@media (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .play-shell {
    height: var(--hexwing-play-height, 100dvh);
    display: block;
    position: fixed;
    inset: 0;
  }

  .play-topbar {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 2;
    min-height: 28px;
    padding: calc(4px + env(safe-area-inset-top)) calc(8px + env(safe-area-inset-right)) 4px calc(8px + env(safe-area-inset-left));
    font-size: 10.5px;
    background: linear-gradient(90deg, rgba(8, 24, 44, 0.38), rgba(19, 65, 105, 0.26));
    border-bottom: 0;
    opacity: 0.72;
  }

  .play-topbar strong {
    display: none;
  }

  .game-frame {
    position: fixed;
    inset: 0;
    width: 100%;
    height: var(--hexwing-play-height, 100dvh);
  }
}
