:root {
  color-scheme: light;
  --page: #e7edf4;
  --ink: #1c2740;
  --muted: #52627a;
  --court: #1e2a44;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--page);
  color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  user-select: none;
}

main {
  width: min(960px, 100%, calc((100vh - 124px) * 960 / 600));
  display: flex;
  flex-direction: column;
  gap: 12px;
}

header {
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: 0.12em;
}

header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: clamp(13px, 1.8vw, 16px);
}

#stage {
  position: relative;
  width: 100%;
  aspect-ratio: 960 / 600;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  background: var(--court);
  box-shadow: 0 14px 36px rgba(28, 39, 64, 0.18);
}

#overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 40%;
  pointer-events: none;
}

#overlay[hidden] {
  display: none;
}

.card {
  min-width: min(280px, 80%);
  padding: 22px 28px;
  border-radius: 14px;
  background: rgba(12, 18, 32, 0.82);
  color: #fff;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

#overlay-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: 0.08em;
}

#overlay-text {
  margin: 10px 0 0;
  font-size: clamp(14px, 2vw, 18px);
  line-height: 1.5;
}
