:root {
  --cream-bg: #F5E4C6;
  --green: #1E5F2F;
  --gold: #E4A025;
  --terracotta: #B95827;
  --ink: #303030;
  --white: #FFFFFF;
  --black: #000000;
}

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

html, body {
  width: 100%;
  font-family: "Raleway", -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background-color: var(--cream-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M24 6l12 12-12 12-12-12z' fill='rgba(128,128,64,0.08)' /%3E%3C/svg%3E");
  background-size: 48px 48px;
  -webkit-text-size-adjust: 100%;
}

/* ---------- Mobile first: single readable column ---------- */

.stage {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: block;
  padding: 32px calc(16px + env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
}

.notes-container {
  position: static;
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.headline-block {
  position: static;
  width: auto;
  transform: none;
  z-index: 10;
  text-align: center;
  margin-bottom: 8px;
}

.headline {
  font-family: "Arima", serif;
  font-size: clamp(32px, 8.5vw, 64px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--green);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.headline p {
  margin: 0;
}

.subhead {
  font-family: "Raleway", sans-serif;
  font-size: clamp(16px, 4.2vw, 18px);
  font-weight: 500;
  line-height: 1.6;
  color: var(--ink);
  margin-top: 16px;
  text-wrap: balance;
}

/* Sticky notes */
.note {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  height: auto;
  min-height: 180px;
  padding: 24px 22px 22px;
  border-radius: 2px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.08),
    0 4px 8px rgba(0, 0, 0, 0.12),
    0 12px 24px rgba(0, 0, 0, 0.16),
    0 -2px 4px rgba(0, 0, 0, 0.04);
  font-family: "Baloo 2", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.45;
  overflow-wrap: break-word;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transform: rotateZ(var(--rotation));
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
  animation: pin-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: calc(var(--delay) * 50ms);
}

@keyframes pin-in {
  0% {
    opacity: 0;
    transform: scale(0.6) rotateZ(-20deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotateZ(var(--rotation));
  }
}

@media (hover: hover) {
  .note:hover {
    transform: translateY(-8px) rotateZ(var(--rotation));
    box-shadow:
      0 4px 8px rgba(0, 0, 0, 0.16),
      0 12px 24px rgba(0, 0, 0, 0.24),
      0 24px 48px rgba(0, 0, 0, 0.32),
      0 -2px 8px rgba(0, 0, 0, 0.12);
  }
}

.note.green {
  background-color: var(--green);
  color: var(--white);
}

.note.gold {
  background-color: var(--gold);
  color: var(--black);
}

.note.terracotta {
  background-color: var(--terracotta);
  color: var(--white);
}

.note p {
  margin: 0;
}

/* Pushpin */
.pin {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: inset -1px -1px 2px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.pin.red {
  background: radial-gradient(circle at 30% 30%, rgba(255, 100, 100, 0.8), #CC0000);
}

.pin.teal {
  background: radial-gradient(circle at 30% 30%, rgba(0, 180, 200, 0.8), #0066CC);
}

/* ---------- Desktop: original pinned collage ---------- */

@media (min-width: 900px) {
  html, body {
    height: 100%;
  }

  body {
    overflow: hidden;
  }

  .stage {
    width: 100vw;
    height: 100vh;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
  }

  .notes-container {
    position: relative;
    display: block;
    width: 1440px;
    height: 810px;
    max-width: 90vw;
    max-height: 90vh;
  }

  .headline-block {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 650px;
    margin-bottom: 0;
  }

  .headline {
    font-size: 64px;
  }

  .subhead {
    font-size: 18px;
    margin-top: 20px;
  }

  .note {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 235px;
    height: 235px;
    min-height: 0;
    padding: 20px;
    font-size: 15px;
    line-height: 1.4;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .note {
    animation: none;
    opacity: 1;
  }

  .note:hover {
    transform: rotateZ(var(--rotation));
  }
}
