/* Owner-requested full browser viewport, 2 October 2026.
   Keep this after the historical unity80 stylesheet. No Unity runtime changes. */
html.unity-open,
html.unity-open body {
  overflow: hidden;
  overscroll-behavior: none;
}

.unity-shell {
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  padding: 0;
  overflow: hidden;
  background: #12b6ef;
  backdrop-filter: none;
  overscroll-behavior: none;
}

.unity-shell iframe,
.unity-shell .unity-host-loading {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.unity-shell .unity-host-loading {
  padding: max(80px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
  overflow-y: auto;
}

.unity-host-loading > strong,
.unity-host-loading > span {
  max-width: 42rem;
}

.unity-close {
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  height: 44px;
  min-width: 44px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  color: #00516b;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(0, 39, 57, 0.16);
}

.unity-close [aria-hidden] {
  font-size: 28px;
  line-height: 1;
}

.unity-close:hover { background: #fff; }
.unity-close:focus-visible {
  outline: 3px solid #00516b;
  outline-offset: 3px;
}

.unity-orientation { display: none; }

@media (orientation: portrait) {
  /* A dispatched Unity54 camera crops the board in portrait. Keep the host's
     loading/recovery UI visible until dispatch, then explain how to play. */
  .unity-shell:not(.preloading) .unity-host-loading[hidden] ~ .unity-orientation {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: grid;
    align-content: center;
    justify-items: center;
    padding: max(80px, env(safe-area-inset-top))
      max(28px, env(safe-area-inset-right))
      max(28px, env(safe-area-inset-bottom))
      max(28px, env(safe-area-inset-left));
    overflow-y: auto;
    background: #00516b;
    color: #fff;
    text-align: center;
  }
  .unity-shell:not(.preloading) .unity-host-loading[hidden] ~ iframe {
    visibility: hidden;
  }
  .unity-orientation svg { width: 72px; height: 72px; margin-bottom: 20px; }
  .unity-orientation h2 { max-width: 24rem; margin: 0 0 14px; font-size: 28px; line-height: 1.2; }
  .unity-orientation p { max-width: 24rem; margin: 0; font-size: 17px; line-height: 1.5; }
  .unity-orientation .unity-orientation-note { margin-top: 20px; font-size: 15px; color: #dcf47f; }
}

@media (max-height: 420px) {
  .unity-shell .unity-host-loading { gap: 8px; }
  .unity-host-loading img { width: 48px; height: 48px; }
  .unity-host-loading strong { font-size: 24px; }
}
