html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #1f1f20;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Portrait game: fill the height, never wider than a 9:16 column (centred on desktop). */
#unity-canvas {
  display: block;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: min(100vw, calc(100vh * 9 / 16));
  width: min(100vw, calc(100dvh * 9 / 16));
  margin: 0;
  padding: 0;
  border: 0;
  background: #1f1f20;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#unity-loading {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 24px;
  color: #f0e6d2;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  pointer-events: none;
}

#unity-loading[hidden] {
  display: none;
}

#unity-loading-error {
  max-width: 100%;
  margin-top: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
