:root {
  --cream: #fff6ec; --peach: #ffd9c7; --pink: #ff6f9c; --pink-deep: #ef5f8e;
  --mint: #cdefe3; --sky: #cfe6ff; --lilac: #e6d9ff;
  --ink: #3a2e4d; --ink-soft: rgba(58, 46, 77, 0.66);
  --font: "Fredoka", -apple-system, "SF Pro Rounded", "Avenir Next", "Helvetica Neue", Segoe UI, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); line-height: 1.4;
  background: var(--cream);
  background-image:
    radial-gradient(520px 420px at 8% 4%, var(--mint) 0%, transparent 70%),
    radial-gradient(560px 460px at 94% 10%, var(--sky) 0%, transparent 70%),
    radial-gradient(640px 520px at 92% 85%, var(--lilac) 0%, transparent 70%),
    radial-gradient(540px 480px at 6% 80%, var(--peach) 0%, transparent 70%);
  -webkit-font-smoothing: antialiased;
}
body.playing { overflow: hidden; }
body.playing .page { display: none; }

/* ---- demo overlay ---------------------------------------------------- */
#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: none; z-index: 10; touch-action: none; -webkit-user-select: none; user-select: none; }
body.playing #stage { display: block; }
.info {
  position: fixed; right: 14px; bottom: 14px; z-index: 12; width: 44px; height: 44px; border-radius: 50%; border: 0;
  font: 700 18px var(--font); color: var(--ink); background: rgba(255,255,255,0.85); box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  cursor: pointer; opacity: 0; transform: scale(0.8); pointer-events: none; transition: opacity 0.3s ease, transform 0.3s ease;
}
.info.shown { opacity: 1; transform: scale(1); pointer-events: auto; }
.banner, .hint {
  position: fixed; left: 50%; z-index: 11; transform: translateX(-50%) translateY(8px); border-radius: 999px; font-weight: 700;
  opacity: 0; pointer-events: none; white-space: nowrap; transition: opacity 0.4s ease, transform 0.4s ease;
  max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis;
}
.banner { top: 6vh; padding: 10px 22px; background: rgba(0,0,0,0.45); color: #fff; font-size: clamp(16px, 2.4vw, 26px); }
.hint { bottom: 5vh; padding: 8px 16px; background: rgba(255,255,255,0.88); color: var(--ink); font-size: 14px; font-weight: 600; }
.banner.shown, .hint.shown { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- the one screen ------------------------------------------------- */
.page {
  min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-columns: minmax(300px, 5fr) 6fr; grid-template-rows: 1fr auto;
  align-items: center; gap: 0 48px;
  max-width: 1320px; margin: 0 auto; padding: 24px 40px 16px;
}
.words { grid-row: 1; }
.wordmark { display: inline-block; font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; margin-bottom: 18px; }
h1 { margin: 0 0 14px; font-weight: 700; font-size: clamp(36px, 4.6vw, 64px); line-height: 0.98; letter-spacing: -0.02em; text-wrap: balance; }
.subhead { margin: 0 0 26px; font-size: clamp(17px, 1.8vw, 23px); font-weight: 500; color: var(--ink-soft); max-width: 34ch; }
.button {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; appearance: none; border: 0; cursor: pointer;
  text-decoration: none; font: 700 23px/1.1 var(--font); color: #fff; padding: 20px 40px; border-radius: 999px;
  background: linear-gradient(135deg, var(--pink), var(--pink-deep)); box-shadow: 0 14px 30px rgba(239,95,142,0.35);
  transition: transform 0.15s cubic-bezier(.34,1.56,.64,1), box-shadow 0.15s ease;
}
.button:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 18px 36px rgba(239,95,142,0.42); }
.button:active { transform: translateY(1px) scale(0.99); }
.button small { font-size: 12px; font-weight: 500; opacity: 0.9; margin-top: 3px; }
.button small:empty { display: none; }
.exit { margin: 22px 0 0; font-size: 16px; font-weight: 600; color: var(--ink-soft); }
kbd { font: 700 13px var(--font); color: var(--ink); padding: 4px 8px; margin: 0 1px; border-radius: 8px; background: #fff; box-shadow: 0 2px 0 rgba(58,46,77,0.18); }
.fine { margin: 10px 0 0; font-size: 13px; color: var(--ink-soft); }
.link { appearance: none; border: 0; background: none; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }

.shot { grid-row: 1; margin: 0; border-radius: 18px; padding: 8px; background: #2d2438; box-shadow: 0 30px 70px rgba(58,46,77,0.28); }
.shot img { display: block; width: 100%; height: auto; border-radius: 12px; }

.foot { grid-column: 1 / -1; grid-row: 2; text-align: center; font-size: 12px; color: var(--ink-soft); padding-top: 12px; }
.foot a { color: inherit; }

@media (max-width: 820px) {
  .page { grid-template-columns: 1fr; grid-template-rows: auto auto auto; align-content: center; gap: 22px; padding: 20px 20px 14px; }
  .words { text-align: center; }
  .subhead { margin-left: auto; margin-right: auto; }
  .shot { grid-row: 2; max-width: 520px; width: 100%; margin: 0 auto; }
  .foot { grid-row: 3; }
}
@media (prefers-reduced-motion: reduce) { .button, .info, .banner, .hint { transition: none; } }
