.demo-mode,
.demo-mode body,
.demo-mode .app-root,
.demo-mode .app-shell {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.demo-mode .app-shell {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
}

.demo-mode .shell-region--top,
.demo-mode .shell-region--bottom {
  display: none;
}

.demo-mode .game-stage {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
}

.demo-mode canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
  touch-action: auto;
  cursor: inherit;
}

.demo-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: clamp(8px, 2.5vmin, 16px);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  touch-action: pan-x pan-y;
}

.demo-overlay:focus-visible {
  outline: 2px solid #81e6b3;
  outline-offset: -4px;
}

.demo-overlay__label {
  border: 1px solid rgba(98, 176, 232, .34);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(15, 52, 96, .74);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .2);
  color: #d8e9f6;
  font: 700 clamp(9px, 2.7vmin, 11px) ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .035em;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .demo-overlay { scroll-behavior: auto; }
}
