/* A stable game viewport avoids a layout jump between download and Unity's splash. */
body.unity-page {
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  background: #171020;
  color: #fffaf5;
}
body.unity-page[class] .unity-host-shell,
body.unity-page[class] .unity-host-panel {
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  backdrop-filter: none;
  place-items: center;
}
body.unity-page[class] .unity-canvas-mount {
  width: min(100vw, calc(100dvh * 16 / 9));
  height: min(100dvh, calc(100vw * 9 / 16));
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #171020;
  box-shadow: none;
}
body.unity-page[class] .unity-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.unity-loading-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 24px 80px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 38%, #30203e 0, #171020 65%);
}
.unity-loading-brand {
  width: 144px;
  height: auto;
  margin-bottom: 12px;
  filter: brightness(0) invert(1);
  opacity: .9;
}
.unity-loading-screen h1 {
  margin: 0;
  color: #fffaf5;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  font-weight: 800;
  text-shadow: none;
}
.unity-loading-screen #unityHostStatus {
  max-width: 420px;
  color: #c8bacf;
  font-size: 15px;
  line-height: 1.5;
}
body.unity-page[class] .unity-progress {
  width: min(280px, 75vw);
  height: 5px;
  margin: 6px 0 0;
  border: 0;
  border-radius: 8px;
  background: #4a3c56;
}
body.unity-page[class] .unity-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e93283, #a47ae3);
  transition: width .2s ease;
}
body.unity-page[class] .unity-back-link {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 11;
  min-height: 44px;
  padding: 12px 18px;
  color: #d9cde3;
  font-size: 14px;
}
.unity-page.is-unity-starting .unity-loading-screen,
.unity-page.is-unity-ready .unity-loading-screen,
.unity-page.is-unity-starting .unity-back-link,
.unity-page.is-unity-ready .unity-back-link {
  display: none;
}
.unity-page.is-unity-error .unity-progress,
.unity-page.is-unity-locked .unity-progress {
  display: none;
}
@media (max-height: 450px) and (orientation: landscape) {
  .unity-loading-screen { gap: 8px; padding-block: 20px 60px; }
  .unity-loading-brand { width: 100px; margin-bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  body.unity-page[class] .unity-progress i { transition: none; }
}

.unity-fullscreen-button {
  position: fixed;
  z-index: 20;
  bottom: max(12px, env(safe-area-inset-bottom));
  right: max(12px, env(safe-area-inset-right));
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid #fff;
  border-radius: 12px;
  background: #ad2673;
  color: #fff;
  box-shadow: 0 4px 0 #341e54;
  cursor: pointer;
}
.unity-fullscreen-button[hidden], .unity-fullscreen-status[hidden] { display: none; }
.unity-fullscreen-button svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.unity-fullscreen-button:hover { background: #863cb0; }
.unity-fullscreen-button:focus-visible { outline: 3px solid #ffe46d; outline-offset: 3px; }
.unity-fullscreen-button[aria-pressed="true"] svg { transform: scale(.8); }
.unity-fullscreen-status { position: fixed; z-index: 20; bottom: 70px; right: 12px; max-width: min(320px, calc(100vw - 24px)); padding: 12px; border-radius: 12px; color: #fff; background: #241532; font-size: .85rem; }
@media (max-width: 900px) and (orientation: portrait) {
  .unity-fullscreen-button, .unity-fullscreen-status { visibility: hidden; }
}
