:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei", sans-serif;
  color: #fff4f3;
  background: #18101e;
}

* { box-sizing: border-box; }
body { margin: 0; }
main { position: relative; min-height: 100svh; overflow: hidden; isolation: isolate; }
header, footer { position: absolute; z-index: 1; }
header { inset: clamp(24px, 5vw, 72px) auto auto clamp(24px, 5vw, 72px); pointer-events: none; }
h1 { margin: 0; font-size: clamp(2rem, 5.5vw, 4.25rem); letter-spacing: .05em; }
header p { margin: 12px 0 0; max-width: min(26rem, calc(100vw - 48px)); color: #f7d3df; font-size: 1rem; }
footer {
  inset: auto clamp(24px, 5vw, 72px) 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #f3cdd8;
  font-size: .875rem;
  pointer-events: none;
}
button {
  font: inherit;
  color: #fff4f3;
  background: #422a43;
  border: 1px solid #94647e;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  pointer-events: auto;
}
button:disabled { opacity: .45; cursor: default; }
button:focus-visible { outline: 2px solid #ffd9a9; outline-offset: 4px; }
#stage { position: absolute; inset: 0; background: radial-gradient(ellipse at 58% 48%, #694055, #302033 60%, #18101e); }
canvas { display: block; width: 100%; height: 100%; touch-action: none; }
#status { position: absolute; z-index: 1; top: 47%; left: 50%; transform: translateX(-50%); text-align: center; margin: 0; }

@media (max-width: 580px) {
  footer { bottom: 16px; }
}
