html.intro-pending { background: var(--bg); }
.intro-pending body > :not(#game-intro) { visibility: hidden; }
#game-intro {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
  box-shadow: none;
}
#game-intro::backdrop { background: var(--bg); }
#game-intro[open] { display: block; animation: none; }
.intro-stage {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 76px;
}
.intro-title { text-align: center; flex: 0 0 auto; }
.intro-title > span { font: 600 13px "Barlow Condensed", var(--font); letter-spacing: 0; color: #697163; }
#intro-title { margin: 10px 0 0; font-size: 52px; line-height: 1.2; font-weight: 800; letter-spacing: 0; }
#intro-title span { color: #6e9c3e; }
#intro-canvas { display: block; width: min(640px, 100%); height: auto; max-height: 55dvh; object-fit: contain; aspect-ratio: 640 / 460; }
#intro-skip {
  position: absolute;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  min-width: 88px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: #555f4f;
}
#intro-skip:hover { background: #e8eddf; }
#game-intro.is-leaving { animation: intro-exit 320ms ease-out both; pointer-events: none; }
#game-intro.is-leaving::backdrop { animation: intro-exit 320ms ease-out both; }
@keyframes intro-exit { to { opacity: 0; } }
@media (max-width: 600px) {
  #intro-title { font-size: 40px; }
  .intro-stage { padding-right: 12px; padding-left: 12px; }
}
@media (max-height: 450px) {
  .intro-stage { flex-direction: row; gap: 16px; padding: 16px 24px 60px; }
  #intro-title { font-size: 32px; }
  #intro-canvas { width: 52%; max-height: 75dvh; }
}
@media (prefers-reduced-motion: reduce) {
  #game-intro.is-leaving, #game-intro.is-leaving::backdrop { animation: none; }
}
