*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  z-index: 100;
  padding: 0.5rem 1rem;
}
.skip-link:focus { top: 0.5rem; }

.site-header, .site-footer { flex: none; }

.shell {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.toolbar { margin: 1rem 0; min-height: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: var(--canvas-ratio, 16 / 9);
  background: #000;
}

.unity-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
  overflow: auto;
  text-align: center;
}
.panel[hidden] { display: none; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

.stage:fullscreen { max-width: none; aspect-ratio: auto; }

body[data-chrome="pending"] .site-header,
body[data-chrome="pending"] .site-footer { visibility: hidden; }

body[data-chrome="themed"] #footer-fallback { display: none; }
body[data-header="themed"] #header-fallback { display: none; }

body[data-chrome="fallback"] #header-themed,
body[data-chrome="fallback"] #footer-themed { display: none; }

body[data-footer="off"] .site-footer { display: none; }
