html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #17191b; color: #f2e8d5; }
#unity-container {
  --web-safe-top: env(safe-area-inset-top, 0px);
  --web-safe-bottom: env(safe-area-inset-bottom, 0px);
  --web-safe-left: env(safe-area-inset-left, 0px);
  --web-safe-right: env(safe-area-inset-right, 0px);
  position: fixed; inset: 0; box-sizing: border-box;
  width: 100%; height: 100vh; height: 100dvh;
  padding: var(--web-safe-top) var(--web-safe-right) var(--web-safe-bottom) var(--web-safe-left);
}
#unity-canvas { display: block; width: 100%; height: 100%; outline: none; touch-action: none; }
#unity-loading-bar, #unity-warning {
  position: absolute; inset: 0; padding: 24px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; background: #17191b;
  font: 20px/1.5 system-ui, sans-serif; text-align: center;
}
#unity-warning[hidden] { display: none; }
#unity-progress { width: min(300px, 80vw); height: 18px; }
#unity-fullscreen {
  position: absolute; right: max(8px, env(safe-area-inset-right, 0px));
  bottom: max(8px, env(safe-area-inset-bottom, 0px)); z-index: 2;
  min-width: 44px; min-height: 44px; padding: 8px;
  font: 16px system-ui, sans-serif; color: #f2e8d5;
  border: 1px solid #9b825f; border-radius: 4px; background: #302922;
}
#unity-fullscreen[hidden], #unity-display-status[hidden] { display: none; }
#unity-display-status {
  position: absolute; bottom: 60px; right: 8px; max-width: min(320px, 80%);
  padding: 8px; z-index: 2; font: 16px/1.4 system-ui, sans-serif;
  color: #f2e8d5; background: #302922; pointer-events: none;
}
button, select { font: 16px/1.4 system-ui, sans-serif; }
#web-tools, #web-tools-panel button, #web-density {
  min-height: 44px; padding: 8px 12px; color: #f2e8d5;
  background: #302922; border: 1px solid #9b825f; border-radius: 6px;
}
#web-tools {
  position: absolute; left: max(8px, env(safe-area-inset-left, 0px));
  bottom: max(8px, env(safe-area-inset-bottom, 0px)); z-index: 4;
  width: 44px; height: 44px; min-height: 44px; padding: 0;
  font-size: 24px; line-height: 1; border-color: transparent;
  background: rgba(48, 41, 34, .3); opacity: .55;
}
#web-tools:hover, #web-tools:focus-visible { opacity: 1; background: #302922; border-color: #9b825f; }
#web-tools-panel {
  position: absolute; inset: 0; z-index: 5; box-sizing: border-box;
  padding: max(20px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) max(20px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  overflow-y: auto; background: #17191b; font: 16px/1.5 system-ui, sans-serif;
}
#web-tools-panel > * { max-width: 640px; margin-left: auto; margin-right: auto; }
#web-tools-panel button { display: block; margin-top: 12px; }
#web-density-label { display: block; } #web-density { display: block; width: 100%; margin-top: 8px; }
#web-test-details { margin-top: 20px; } #web-test-summary { cursor: pointer; min-height: 44px; }
#web-diagnostic { white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; font: 13px/1.5 monospace; }
#web-rotation {
  position: absolute; top: max(64px, env(safe-area-inset-top, 0px)); left: 12px; right: 12px;
  text-align: center; padding: 12px; z-index: 3; pointer-events: none; font: 16px/1.5 system-ui, sans-serif;
}
#web-tools-panel[hidden], #web-rotation[hidden] { display: none; }
#web-loading-status { font-size: 14px; }
