:root {
  color-scheme: light;
  --ink: #1b1a17;
  --muted: #5f584f;
  --sand: #f3e2c4;
  --clay: #d8b389;
  --pine: #1f3f3a;
  --amber: #e59f3f;
  --cream: #fdf7ed;
  --card: rgba(255, 249, 236, 0.94);
  --shadow: 0 18px 40px rgba(14, 20, 17, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Futura", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.85), transparent 45%),
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.7), transparent 50%),
    linear-gradient(180deg, #7dc7f2, #a9dbf5 45%, #d9f0ff 100%);
  min-height: 100vh;
}

.page {
  padding: 32px 48px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  font-weight: 700;
  color: var(--pine);
  margin: 0 0 12px;
}

h1 {
  font-family: "Rockwell", "Avenir Next", sans-serif;
  font-size: clamp(2.2rem, 3vw, 3rem);
  margin: 0 0 8px;
}

.lede {
  margin: 0;
  color: var(--muted);
  max-width: 560px;
}

.ghost-button {
  border: 1px solid rgba(80, 66, 48, 0.3);
  background: transparent;
  color: var(--pine);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.win .ghost-button {
  background: #ffffff;
  color: #1b1a17;
  border-color: #ffffff;
}

.maze-wrap {
  margin-top: 32px;
  display: grid;
  gap: 16px;
}

.maze-shell {
  position: relative;
  background: #2f5f3b;
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  touch-action: none;
}

#maze {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  touch-action: none;
  background: #cfe7b8;
}

.avatar {
  position: absolute;
  width: 72px;
  height: 72px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.draggable {
  pointer-events: auto;
  cursor: grab;
}

.draggable:active {
  cursor: grabbing;
}

.helper {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.win {
  position: absolute;
  inset: 0;
  background: rgba(15, 13, 10, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  padding: 24px;
}

.win img {
  width: 360px;
  height: 360px;
  object-fit: contain;
}

.win h2 {
  color: #fff6e7;
  margin: 0;
}

.win.open {
  display: flex;
}

@media (max-width: 720px) {
  .page {
    padding: 20px;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .avatar {
    width: 56px;
    height: 56px;
  }
}
