/* Pon Pon Park — the park entrance: a little street of stalls (loaded after style.css) */
html:has(.park-page), .park-page { height: auto; }
.park-page { overflow-x: hidden; overflow-y: auto; min-height: 100dvh; background-attachment: fixed; }

.park {
  max-width: 560px; margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; min-height: 100dvh;
}
.park-head { text-align: center; }
/* music on/off, small, top-right corner */
.park-music {
  position: absolute; z-index: 2;
  top: calc(8px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right));
  width: 36px; height: 36px;
  background: rgba(255, 255, 255, .78); color: var(--logo);
  box-shadow: 0 3px 0 #ffd6e4, 0 6px 14px rgba(110, 95, 170, .12);
}
.park-music svg { width: 19px; height: 19px; }
.park-music:active { box-shadow: 0 1px 0 #ffd6e4; }
@media (max-width: 350px) { /* keep the title clear of the music button */
  .park .park-head .logo { font-size: 31px; }
  .park .park-head .logo-dot { width: 25px; height: 25px; }
  .park-music { width: 34px; height: 34px; top: calc(6px + env(safe-area-inset-top)); right: calc(6px + env(safe-area-inset-right)); }
}
.park-head .logo { justify-content: center; font-size: 34px; }
.park-head .logo-dot { width: 28px; height: 28px; }
.park-tag { margin: 6px 0 0; font-size: 16px; color: var(--ink-soft); }

/* string of little flags over the street */
.bunting {
  position: relative; height: 34px; margin: 14px -16px 4px; overflow: hidden;
  display: flex; justify-content: space-between; padding: 0 6px;
}
.bunting::before { /* the string */
  content: ''; position: absolute; left: 0; right: 0; top: 4px; height: 2px; border-radius: 2px;
  background: rgba(150, 135, 200, .35);
}
.bunting i {
  flex: none; width: 22px; height: 24px; margin-top: 5px;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: #ffc8d6;
  transform-origin: 50% 0;
  animation: flag 2.6s ease-in-out infinite;
  animation-delay: calc(var(--n, 0) * -.3s);
}
.bunting i:nth-child(4n+2) { background: #bfe2ff; }
.bunting i:nth-child(4n+3) { background: #fff0a6; }
.bunting i:nth-child(4n) { background: #c4f0d8; }
@keyframes flag { 0%, 100% { rotate: -6deg; } 50% { rotate: 6deg; } }

.street {
  flex: 1;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px;
  align-content: start;
  padding-top: 8px;
}

/* ---------- a stall ---------- */
.stall {
  position: relative; display: flex; flex-direction: column; align-items: center;
  padding: 0 8px 14px; min-height: 236px;
  border-radius: 20px 20px 18px 18px;
  background: #fffdf8;
  box-shadow: 0 5px 0 var(--s-deep), 0 14px 26px rgba(110, 95, 170, .14);
  color: var(--s-ink); text-decoration: none; text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s cubic-bezier(.3, 1.5, .5, 1), box-shadow .18s;
}
a.stall { cursor: pointer; }
a.stall:hover { transform: translateY(-4px) rotate(-1deg); }
a.stall:nth-child(even):hover { transform: translateY(-4px) rotate(1deg); }
a.stall:active { transform: translateY(3px) scale(.98); box-shadow: 0 2px 0 var(--s-deep), 0 6px 14px rgba(110, 95, 170, .12); }
a.stall:focus-visible { outline-offset: 4px; border-radius: 22px; }

/* striped, scalloped awning */
.awning {
  display: block; width: calc(100% + 16px); height: 40px; margin: 0 -8px;
  border-radius: 18px 18px 0 0;
  background: repeating-linear-gradient(90deg, var(--s-main) 0 22px, var(--s-alt) 22px 44px);
  position: relative;
  box-shadow: inset 0 -3px 0 rgba(74, 69, 96, .06);
}
.awning::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -10px; height: 12px;
  background:
    radial-gradient(circle at 11px 0, var(--s-main) 10px, transparent 10.5px) 0 0 / 44px 12px repeat-x,
    radial-gradient(circle at 11px 0, var(--s-alt) 10px, transparent 10.5px) 22px 0 / 44px 12px repeat-x;
}
.stall-sign {
  position: relative; z-index: 1; margin-top: 16px;
  padding: 4px 14px; border-radius: 999px;
  background: var(--s-main); color: var(--s-ink);
  font-size: 18px; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
  box-shadow: 0 2px 0 var(--s-deep);
}
.stall-window {
  display: grid; place-items: center; width: 100%; margin-top: 10px; flex: 1;
  min-height: 92px; border-radius: 14px;
  background: linear-gradient(180deg, #fff, var(--bg-top));
  box-shadow: inset 0 0 0 2px #f1ecfb;
  padding: 8px 6px 4px;
}
.mini { width: 100%; max-width: 170px; height: auto; overflow: visible; }
a.stall .mini { transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
a.stall:hover .mini { transform: scale(1.05); }
.stall-blurb { margin-top: 10px; font-size: 13.5px; line-height: 1.3; font-weight: 500; color: var(--ink); min-height: 2.6em; }
.stall-go {
  margin-top: 8px; padding: 6px 18px; border-radius: 999px;
  background: var(--s-deep); color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .04em;
  box-shadow: 0 3px 0 rgba(74, 69, 96, .12);
}

/* closed stalls */
.stall.closed { box-shadow: 0 5px 0 #e9e4f5, 0 10px 20px rgba(110, 95, 170, .08); }
.stall.closed .awning, .stall.closed .stall-sign { filter: saturate(.55) opacity(.75); }
.stall.closed .stall-blurb { color: var(--ink-soft); }
.shutter {
  position: relative;
  background: repeating-linear-gradient(180deg, #f3f0fa 0 9px, #e8e3f4 9px 11px);
  box-shadow: inset 0 0 0 2px #ebe6f6;
}
.soon-sign {
  position: relative; padding: 6px 12px; border-radius: 10px;
  background: #fffdf8; color: var(--s-ink); font-size: 14px; font-weight: 700;
  box-shadow: 0 3px 0 var(--s-deep), 0 6px 12px rgba(110, 95, 170, .12);
  rotate: -5deg; transform-origin: 50% -16px;
  animation: soonSwing 3.2s ease-in-out infinite;
}
.soon-sign::before { /* the string it hangs from */
  content: ''; position: absolute; left: 50%; top: -22px; width: 2px; height: 22px; translate: -50% 0;
  background: rgba(120, 105, 170, .4); border-radius: 2px;
}
@keyframes soonSwing { 0%, 100% { rotate: -6deg; } 50% { rotate: 5deg; } }

.pavement {
  height: 26px; margin: 26px -16px 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(255, 255, 255, .7) 34px 58px) 0 11px / 100% 4px no-repeat,
    linear-gradient(180deg, #ece6fb, #e4ddf8);
  border-radius: 14px 14px 0 0;
}

/* tip link under the pavement */
.park-foot { display: flex; justify-content: center; padding: 18px 0 4px; }
.matcha {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px 9px 14px; border-radius: 999px;
  background: #d9f0d6; color: #3f6f52; text-decoration: none;
  font-size: 15px; font-weight: 700;
  box-shadow: 0 3px 0 #b9dcc0;
  transition: transform .15s, box-shadow .15s;
}
.matcha svg { width: 28px; height: 24px; flex: none; }
.matcha:hover { transform: translateY(-2px); box-shadow: 0 5px 0 #b9dcc0; }
.matcha:active { transform: translateY(2px); box-shadow: 0 1px 0 #b9dcc0; }
.matcha:focus-visible { outline: 3px solid #9fdcc3; outline-offset: 3px; }

/* the narrowest phones: "Tokyo Day Out" must stay inside its stall */
@media (max-width: 360px) {
  .stall-sign { font-size: 15.5px; padding: 4px 10px; }
}
@media (min-width: 700px) {
  .park { padding-top: 40px; }
  .park-head .logo { font-size: 44px; }
  .street { gap: 28px 22px; }
  .stall { min-height: 270px; }
}
@media (prefers-reduced-motion: reduce) {
  .soon-sign, .bunting i { animation: none; }
  .stall, a.stall .mini { transition: none; }
}
