body.whimsy {
  background: #3f8fb0;
  --hand: "Gaegu", "Mukta", cursive;
  color: #2a1d14;
}

.w-top {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.w-top a {
  white-space: nowrap;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 99px;
  background: rgba(255, 248, 234, 0.85);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s;
}
.w-top a:hover {
  transform: rotate(-3deg) scale(1.05);
}

.w-main {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 80px;
}

/* ---------- hero ---------- */
.w-hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(16px, 5vw, 70px);
  padding-top: max(80px, 13vh);
  flex-wrap: wrap;
}
.w-hero__text {
  max-width: 520px;
  padding: 22px 26px;
  border-radius: 28px 34px 26px 38px;
  background: rgba(255, 248, 234, 0.9);
  box-shadow: 0 14px 40px rgba(20, 60, 80, 0.25);
  transform: rotate(-1.5deg);
}
.w-kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #2f7f99;
}
.w-hero h1 {
  margin: 4px 0 8px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
}
.w-hero h1 span {
  display: inline-block;
  color: #c2412d;
  transform: rotate(-4deg);
  animation: wobble 2.4s ease-in-out infinite;
}
.w-intro {
  margin: 0;
  font-family: var(--hand);
  font-size: 24px;
  line-height: 1.25;
}
.w-hint {
  margin: 8px 0 0;
  font-family: var(--hand);
  font-size: 20px;
  color: #2f7f99;
}

/* Sagun strolling the pavement; positioned by js/whimsy.js */
.w-sagun {
  position: fixed;
  z-index: 6;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.25));
}
.w-sagun__fig {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}
.w-sagun .sagun__arm-wave {
  animation-duration: 0.6s;
}
.w-sagun:active .w-sagun__fig,
.w-sagun.is-poked .w-sagun__fig {
  animation: squish 0.4s;
}
.w-bubble {
  position: absolute;
  bottom: 96%;
  left: 50%;
  width: max-content;
  max-width: min(280px, 70vw);
  transform: translateX(-50%) rotate(-2deg);
  transform-origin: 50% 100%;
  padding: 10px 16px;
  border-radius: 18px;
  background: #fff;
  font-family: var(--hand);
  font-size: 21px;
  line-height: 1.2;
  color: #2a1d14;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.w-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -9px;
  border: 9px solid transparent;
  border-top-color: #fff;
}

/* ---------- sections ---------- */
.w-section {
  margin: 14vh 0;
  text-align: center;
}
.w-section h2 {
  display: inline-block;
  margin: 0 0 8px;
  padding: 6px 22px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 4.5vw, 44px);
  background: #fff8ea;
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--bangs);
  transform: rotate(-1deg);
}
.w-note {
  margin: 4px 0 24px;
  font-family: var(--hand);
  font-size: 22px;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

/* prayer-flag line with polaroids */
.w-line {
  height: 20px;
  margin: 26px -16px -8px;
  background:
    repeating-linear-gradient(90deg,
      #2f6fd0 0 26px, transparent 26px 30px,
      #f7f3ea 30px 56px, transparent 56px 60px,
      #d4302b 60px 86px, transparent 86px 90px,
      #2f9a4b 90px 116px, transparent 116px 120px,
      #f2c230 120px 146px, transparent 146px 150px);
  border-top: 2px solid rgba(60, 50, 40, 0.7);
}
.polaroids {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 26px 22px;
  padding-top: 8px;
}
.polaroid {
  width: 190px;
  padding: 12px 12px 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  transform-origin: 50% -14px;
  transform: rotate(var(--r, 0deg));
  transition: transform 0.4s cubic-bezier(0.3, 1.8, 0.5, 1);
  position: relative;
}
.polaroid::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 14px;
  height: 22px;
  margin-left: -7px;
  border-radius: 3px;
  background: #b98b55;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2);
}
.polaroid:hover,
.polaroid:focus-within {
  transform: rotate(calc(var(--r, 0deg) * -2)) scale(1.05);
}
.polaroid__pic {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  font-size: 64px;
  background: linear-gradient(135deg, #ffe6c2, #c8e8f2);
}
.polaroid h3 {
  margin: 10px 0 0;
  font-family: var(--hand);
  font-size: 24px;
  line-height: 1.1;
}
.polaroid p {
  margin: 4px 0 0;
  font-family: var(--hand);
  font-size: 18px;
  line-height: 1.15;
  color: #5b4636;
}

/* stats */
.stats {
  display: grid;
  gap: 14px;
  max-width: 560px;
  margin: 0 auto;
  padding: 22px 24px;
  text-align: left;
  border-radius: 20px;
  background: rgba(255, 248, 234, 0.92);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}
.stat__row {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
}
.stat__bar {
  height: 14px;
  margin-top: 4px;
  border-radius: 99px;
  background: #e9dab8;
  overflow: hidden;
}
.stat__bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--dhaka);
  background-size: 14px 14px;
  transition: width 1.4s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

/* boats */
.boats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px 18px;
  padding-top: 26px;
}
.boat {
  position: relative;
  padding: 0 0 18px;
  animation: bob 2.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
.boat__word {
  display: inline-block;
  padding: 6px 18px;
  font-family: var(--hand);
  font-size: 26px;
  background: #fff8ea;
  border-radius: 10px 10px 4px 4px;
}
.boat::after {
  content: "";
  position: absolute;
  left: -12px;
  right: -12px;
  bottom: 0;
  height: 20px;
  background: var(--c, #c2412d);
  clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%);
  border-radius: 0 0 40% 40%;
}

/* momo */
.momo {
  border: 0;
  background: radial-gradient(circle, #fff 55%, #e7e0d2 56% 62%, #fff 63%);
  width: 150px;
  height: 150px;
  border-radius: 50%;
  font-size: 70px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s;
}
.momo:active {
  transform: scale(0.92) rotate(-6deg);
}
.momo__count {
  margin: 14px 0 0;
  font-family: var(--hand);
  font-size: 26px;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}
.momo__msg {
  min-height: 1.4em;
  margin: 0;
  font-family: var(--hand);
  font-size: 22px;
  color: #fff8ea;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}
.crumb {
  position: fixed;
  z-index: 20;
  pointer-events: none;
  font-size: 26px;
  animation: crumb 0.9s ease-out forwards;
}

.w-foot {
  text-align: center;
  font-family: var(--hand);
  font-size: 24px;
}
.w-foot p {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 99px;
  background: #fff8ea;
}

.todo {
  background: repeating-linear-gradient(-45deg, rgba(227, 165, 38, 0.2) 0 8px, transparent 8px 16px);
  outline: 1px dashed rgba(179, 32, 42, 0.45);
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(1.5deg); }
}
@keyframes wobble {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(3deg) scale(1.05); }
}
@keyframes squish {
  40% { transform: scale(1.12, 0.86); }
  70% { transform: scale(0.95, 1.06); }
}
@keyframes crumb {
  to {
    transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(0.4);
    opacity: 0;
  }
}

/* ---------- the walk ---------- */
.w-walk {
  position: relative;
}
.w-sagun {
  transition: opacity 0.5s;
}
.w-sagun.is-away {
  opacity: 0;
  pointer-events: none;
}
.w-sagun.is-quiet .w-bubble {
  visibility: hidden;
}
.w-bubble {
  min-width: 120px;
  max-width: min(330px, 72vw);
}
.w-bubble.is-new {
  animation: bubble-pop 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.w-bubble.todo {
  outline-offset: -4px;
}
@keyframes bubble-pop {
  from { transform: translateX(-50%) scale(0.6) rotate(-6deg); opacity: 0.4; }
  to { transform: translateX(-50%) rotate(-2deg); opacity: 1; }
}

/* ---------- momo meter: drains as she walks ---------- */
.momo-meter {
  position: fixed;
  z-index: 7;
  left: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px 12px;
  border-radius: 16px;
  background: rgba(255, 248, 234, 0.94);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  font-family: var(--hand);
  font-size: 20px;
  line-height: 1;
}
.momo-meter__bar {
  display: block;
  width: 150px;
  height: 14px;
  border-radius: 99px;
  background: #e9dab8;
  overflow: hidden;
}
.momo-meter__fill {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 99px;
  background: var(--fill, #2f9a4b);
  transition: width 0.4s ease, background 0.4s;
}
.momo-meter.is-full {
  animation: bubble-pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1);
}
@media (max-width: 520px) {
  .momo-meter {
    left: 12px;
    bottom: 12px;
    font-size: 17px;
  }
  .momo-meter__bar {
    width: 110px;
  }
}

/* ---------- popups hug the sides so the promenade stays clear ---------- */
@media (min-width: 900px) {
  .w-main {
    max-width: none;
  }
  .w-hero {
    justify-content: flex-start;
    padding-left: 2vw;
  }
  .w-hero__text {
    max-width: 440px;
  }
  .w-section {
    max-width: 460px;
    margin-left: 2vw;
    text-align: left;
  }
  .w-section.w-momo {
    max-width: 340px;
    margin-left: auto;
    margin-right: 2vw;
    text-align: center;
  }
}
