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;
}

.play-shell:fullscreen,
.play-shell:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  grid-template-rows: minmax(0, 1fr);
  background: #7dccff;
}

.play-shell:fullscreen .play-topbar,
.play-shell:-webkit-full-screen .play-topbar {
  display: none;
}

.play-shell:fullscreen .game-frame,
.play-shell:-webkit-full-screen .game-frame {
  width: 100vw;
  height: 100vh;
}


.play-orientation-lock {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: calc(22px + env(safe-area-inset-top)) calc(22px + env(safe-area-inset-right)) calc(22px + env(safe-area-inset-bottom)) calc(22px + env(safe-area-inset-left));
  color: #17344d;
  text-align: center;
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,0.72), rgba(255,255,255,0.20) 36%, rgba(108,191,255,0.42) 100%),
    linear-gradient(180deg, rgba(112,201,255,0.94), rgba(238,249,255,0.95));
  backdrop-filter: blur(12px) saturate(1.16);
  -webkit-backdrop-filter: blur(12px) saturate(1.16);
}

.play-rotate-card {
  width: min(86vw, 400px);
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 24px 22px 22px;
  border: 1px solid rgba(255,255,255,0.70);
  border-radius: 26px;
  background: rgba(255,255,255,0.48);
  box-shadow: 0 24px 60px rgba(37,110,170,0.24), inset 0 1px 0 rgba(255,255,255,0.50);
}

.play-rotate-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: rgba(23,52,77,0.78);
  font-size: 42px;
  font-weight: 950;
  line-height: 1;
}

.play-rotate-card strong {
  font-size: clamp(24px, 8vw, 38px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.play-rotate-card p {
  max-width: 29ch;
  margin: 0;
  color: rgba(23,52,77,0.72);
  font-size: clamp(14px, 4vw, 17px);
  font-weight: 750;
  line-height: 1.35;
}


@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: minmax(0, 1fr);
  }

  .play-topbar {
    display: none;
  }

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

@media (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .play-orientation-lock {
    display: grid;
  }

  .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);
  }
}


/* 20260502-mobile-range-v8: phone landscape fallback that does not rely on pointer/coarse media queries. */
@media (orientation: landscape) and (max-height: 760px), (max-width: 980px) and (orientation: landscape) {
  html,
  body {
    height: var(--hexwing-play-height, 100dvh);
    min-height: var(--hexwing-play-height, 100dvh);
  }

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

  .play-topbar {
    display: none !important;
  }

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

  .play-orientation-lock {
    display: none !important;
  }
}

html[data-hexwing-mobile-landscape="true"] body {
  height: var(--hexwing-play-height, 100dvh);
  min-height: var(--hexwing-play-height, 100dvh);
}

html[data-hexwing-mobile-landscape="true"] .play-shell {
  position: fixed;
  inset: 0;
  height: var(--hexwing-play-height, 100dvh);
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

html[data-hexwing-mobile-landscape="true"] .play-topbar,
html[data-hexwing-mobile-landscape="true"] .play-orientation-lock {
  display: none !important;
}

html[data-hexwing-mobile-landscape="true"] .game-frame {
  position: fixed;
  inset: 0;
  width: 100%;
  height: var(--hexwing-play-height, 100dvh);
  min-height: 0;
}
