:root {
  --ink: #1c1613;
  --muted: #4a3b34;
  --paper: #fff6ea;
  --card: #ffffff;
  --coral: #c4452e;
  --coral-bright: #e2573d;
  --teal: #187a6c;
  --grape: #5b4ed1;
  --sun: #c79212;
  --line: rgba(28, 22, 19, 0.16);
  --shadow: 0 18px 40px rgba(28, 22, 19, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  min-height: 100%;
}

#app {
  min-height: 100%;
  height: 100%;
}

body {
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #ffe1c4 0%, transparent 55%),
    radial-gradient(900px 480px at 100% 0%, #d9f5ef 0%, transparent 50%),
    var(--paper);
}

a {
  color: var(--coral);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  z-index: 20;
}

.skip-link:focus {
  top: 12px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.brand img {
  width: 48px;
  height: 48px;
}

.view {
  min-height: 100%;
}

.hidden {
  display: none !important;
}

.hero {
  max-width: 920px;
  margin: 0 auto;
  padding: 48px 24px 12px;
  text-align: center;
}

.eyebrow {
  font-family: "Fredoka", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--coral);
  font-weight: 600;
}

h1,
h2,
h3,
.play-bar h2 {
  font-family: "Fredoka", sans-serif;
}

h1 {
  font-size: clamp(40px, 7vw, 72px);
  margin: 8px 0 12px;
}

.lead {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
  max-width: 640px;
  margin: 0 auto;
}

.cards {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  appearance: none;
  border: 2px solid var(--line);
  background: var(--card);
  border-radius: 28px;
  padding: 16px 18px 22px;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-6px);
  border-color: var(--coral);
  outline: none;
}

.card-canvas {
  width: 100%;
  height: 150px;
  display: block;
  border-radius: 18px;
  background: linear-gradient(#ccefff, #f7ffe8);
  margin-bottom: 14px;
  pointer-events: none;
}

.play-cta {
  display: inline-block;
  margin-top: 14px;
  font-family: "Fredoka", sans-serif;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 15px;
}

.card-tag {
  font-family: "Fredoka", sans-serif;
  color: var(--teal);
  font-size: 13px;
}

.card h2 {
  font-size: 26px;
  margin: 4px 0 8px;
}

.card p {
  color: var(--muted);
  line-height: 1.45;
}

#view-play {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.play-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
}

#btn-back,
#overlay-btn {
  font-family: "Fredoka", sans-serif;
  border: 0;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  font-size: 16px;
}

#overlay-btn {
  background: var(--coral-bright);
  margin-top: 8px;
  padding: 12px 28px;
  font-size: 20px;
}

.play-copy h2 {
  font-size: 22px;
}

.play-copy p {
  color: var(--muted);
  font-size: 14px;
}

.stage {
  position: relative;
  flex: 1;
  margin: 0 12px 12px;
  border-radius: 24px;
  overflow: hidden;
  border: 2px solid var(--line);
  background: #111;
  min-height: 420px;
}

#game {
  width: 100%;
  height: 100%;
  display: block;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(36, 28, 24, 0.35);
  backdrop-filter: blur(4px);
}

.overlay.hidden {
  display: none !important;
}

.overlay-card {
  background: #fff;
  border-radius: 24px;
  padding: 28px 28px 24px;
  width: min(460px, calc(100% - 32px));
  text-align: center;
  box-shadow: var(--shadow);
}

.overlay-card h3 {
  font-size: 32px;
  margin: 8px 0;
}

.overlay-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

@media (max-width: 720px) {
  .play-bar {
    flex-wrap: wrap;
  }

  .hero {
    padding-top: 28px;
  }
}

.site-footer {
  max-width: 920px;
  margin: 0 auto;
  padding: 16px 24px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: center;
  margin-bottom: 8px;
}

.cookie-banner {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  max-width: 560px;
  margin: 0 auto;
  background: #1c1613;
  color: #fff8f2;
  border-radius: 18px;
  padding: 16px 18px;
  z-index: 40;
  box-shadow: var(--shadow);
}

.cookie-banner p {
  margin-bottom: 10px;
  line-height: 1.4;
}

.cookie-banner a {
  color: #ffd7c8;
}

.cookie-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.cookie-actions button {
  font-family: "Fredoka", sans-serif;
  border: 0;
  background: #ffd7c8;
  color: #1c1613;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
}

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.doc h1 {
  font-size: clamp(32px, 6vw, 48px);
}

.doc h2 {
  margin: 28px 0 10px;
}

.doc p,
.doc li {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.doc ul {
  padding-left: 20px;
}

.hero-404 {
  text-align: center;
  padding: 72px 24px;
}

.hero-404 a.play-cta {
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }
}
