.old-crowd img { object-position: center bottom; }
.old-crowd small { font-size: clamp(8px, .85vw, 13px); }
#courtSpotlight { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
#courtSpotlight[hidden] { display: none; }
#courtSpotlight .old-crowd {
  left: 10% !important;
  bottom: 26% !important;
  width: 17%;
  height: 24%;
  pointer-events: auto;
  display: block;
}
@media (max-width: 560px) {
  #courtSpotlight .old-crowd { left: 4% !important; bottom: 30% !important; width: 24%; height: 15%; }
}
#courtSpotlight[data-action=incense] .old-crowd {
  left: var(--court-x, 48%) !important;
  bottom: 44% !important;
  width: 12%;
  height: 17%;
}
#courtSpotlight[data-action=incense] .old-crowd:nth-child(2) { --court-x: 56%; bottom: 52% !important; }
#courtSpotlight[data-action=incense] .old-crowd:nth-child(3) { --court-x: 80%; }
#incense.lit i {
  display: block;
  position: absolute;
  left: 50% !important;
  bottom: 68%;
  width: 18px;
  height: 32px;
  background: radial-gradient(ellipse, #fff8debb, transparent 72%);
  pointer-events: none;
  animation: court-incense-smoke 3.4s ease-out infinite;
}
#incense.lit i:nth-of-type(2) { animation-delay: -1.1s; }
#incense.lit i:nth-of-type(3) { animation-delay: -2.2s; }
@keyframes court-incense-smoke {
  0% { transform: translate(-50%, 0) scale(.5); opacity: .15; }
  28% { opacity: .95; }
  100% { transform: translate(50%, -100px) scale(2.2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  #incense.lit i { animation: none; transform: translate(-50%, -12px); opacity: .8; }
}

#meditationWorld .seated-pet:has(img[src*="/fitted/"]):not(.seated-user) {
  height: 19% !important;
}

/* The incense group replaces the courtyard cast during the ritual. */
#experience[data-activity="incense"] #crowdLane {
  visibility: hidden;
}

#tree { left: -12%; bottom: 14%; width: max(55%, 76svh); height: 86%; }
#tree img { object-position: center bottom; }
@media (max-width: 560px) {
  #tree { left: -27%; bottom: 34%; width: max(85%, 54svh); height: 66%; }
}

.calligraphy-paper {
  position: absolute;
  z-index: 6;
  top: 38%;
  left: 50%;
  transform: translateX(-50%);
  width: min(54vw, 560px, 55svh);
  text-align: right;
  pointer-events: auto;
}
.calligraphy-paper canvas {
  display: block;
  width: 100%;
  border: 1px solid #bd9a6a;
  border-radius: 4px;
  background: #f6e5bf;
  box-shadow: 0 9px 26px #24191166;
  touch-action: none;
  cursor: crosshair;
}
.calligraphy-paper button {
  margin-top: 7px;
  padding: 6px 14px;
  border-radius: 20px;
  background: #fff0cf;
  color: #28382a;
}
@media (max-width: 560px) {
  .calligraphy-paper { top: 39%; width: min(86vw, 54svh); }
}

/* Keep the courtyard visible through dialogue and thought bubbles. */
#experience .speech,
#experience #prayerBubble,
#experience .thought-cloud,
#experience .meditation-voice {
  background: rgb(255 244 218 / 62%);
  backdrop-filter: blur(2px);
  border: 1px solid rgb(91 74 51 / 42%);
  box-shadow: 0 2px 8px #18352726;
  color: #252c23;
  padding: 7px 10px;
  max-width: min(255px, 72vw);
}
#experience :is(.speech, #prayerBubble, .thought-cloud, .meditation-voice) p {
  font-size: 12px;
  line-height: 1.4;
}
#experience .speech::after { border-top-color: rgb(255 244 218 / 62%); }
#experience #prayerBubble::after { border-top-color: rgb(91 74 51 / 42%); }
#experience .thought-cloud::before,
#experience .thought-cloud::after {
  background: rgb(255 244 218 / 62%);
  border-color: rgb(91 74 51 / 42%);
}

#wishWall { grid-template-columns: minmax(0, 1fr); gap: 22px; }
#wishWall h2 { max-width: none; }

#wishCards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 26px; padding-top: 24px; }
#wishCards .hanging-wish {
  position: relative;
  background: #e8c58d;
  color: #38271b;
  border: 1px solid #a87946;
  border-radius: 10px 10px 5px 5px;
  padding: 20px 14px 14px;
  box-shadow: inset 0 0 0 4px #fff3d638, 0 5px 10px #0c211966;
}
.hanging-wish::before {
  content: "";
  position: absolute;
  left: calc(50% - 9px);
  top: -23px;
  width: 18px;
  height: 29px;
  border: 2px solid #ad8150;
  border-radius: 50%;
}
.hanging-wish header { position: static; display: flex; align-items: center; gap: 8px; padding: 0; font-size: 12px; }
.hanging-wish img { width: 36px; height: 36px; object-fit: contain; }
#wishCards .hanging-wish small { display: block; color: #70452d; font-size: 8px; }
.hanging-wish h3 { margin: 7px 0; color: #743b2b; font: 24px var(--serif); }
#wishWall .hanging-wish p { margin: 0; color: #38271b; line-height: 1.5; }

#wishCards { gap: 28px; padding: 37px 4px 10px; }
#wishCards .hanging-wish {
  --wish-accent: #7b3d2e;
  background:
    repeating-linear-gradient(88deg, transparent 0 7px, #77421f0c 8px, transparent 12px),
    linear-gradient(125deg, #f5dfb3, #e7c390 62%, #d7ab74);
  border: 1px solid #ba8a53;
  border-radius: 18px 18px 8px 8px;
  padding: 26px 15px 15px;
  box-shadow: inset 0 0 0 4px #fff6de65, inset 0 0 0 5px #a06f4333, 0 7px 0 #634127, 0 12px 19px #081c1880;
}
#wishCards .hanging-wish:nth-of-type(2n) { --wish-accent: #3c5b43; }
.hanging-wish::before {
  left: calc(50% - 10px);
  top: -29px;
  width: 20px;
  height: 38px;
  border: 2px solid var(--wish-accent);
  transform: rotate(11deg);
}
.hanging-wish::after {
  content: "";
  position: absolute;
  top: 7px;
  left: calc(50% - 4px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wish-accent);
  box-shadow: 0 0 0 2px #f5ddab;
}
.hanging-wish header {
  padding-bottom: 8px;
  border-bottom: 1px solid #85593540;
  color: #4d3425;
  font-weight: 700;
}
.hanging-wish img {
  width: 42px;
  height: 42px;
  padding: 3px;
  border: 1px solid #aa79505c;
  border-radius: 50%;
  background: #fff2ce95;
}
.hanging-wish h3 {
  margin: 11px 0 7px;
  color: var(--wish-accent);
  font-size: clamp(22px, 3vw, 31px);
}
