.constellation {
  background: #20152e;
  color: #f8ebf5;
}
.constellation .eyebrow, .constellation h2, .constellation h3 { color: #ffd7b1; }
.constellation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1rem, 4vw, 2.5rem);
}
.constellation-sky {
  position: relative;
  aspect-ratio: 5 / 4;
  border: 1px solid #9b739f;
  border-radius: 1rem;
  background:
    radial-gradient(circle at 18% 68%, #f9ddbd 1px, transparent 2px),
    radial-gradient(circle at 68% 61%, #f9ddbd 1px, transparent 2px),
    radial-gradient(circle at 64% 11%, #f9ddbd 1px, transparent 2px),
    radial-gradient(circle at 37% 87%, #f9ddbd 1px, transparent 2px),
    radial-gradient(ellipse at 50% 50%, #442557, #120e22 78%);
}
.constellation-sky svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.constellation-heart, .constellation-moon { opacity: 0; transition: opacity .7s ease; }
.constellation-heart { fill: none; stroke: #ffaccb; stroke-width: .6; }
.constellation-moon { fill: #ffd7a6; }
.constellation-sky.complete path { opacity: 1; }
.constellation-sky button {
  position: absolute;
  left: var(--x);
  top: var(--y);
  translate: -50% -50%;
  width: 44px;
  height: 44px;
  border: 1px solid #b88da9;
  border-radius: 50%;
  background: #291934;
  color: #ffe4ad;
  font: 1.5rem/1 system-ui, sans-serif;
  cursor: pointer;
}
.constellation-sky button:hover, .constellation-sky button.discovered {
  background: #ffe4ad;
  color: #291934;
  box-shadow: 0 0 14px #ffe4ad80;
}
.constellation-sky button:focus-visible { outline: 3px solid white; outline-offset: 3px; }
.constellation-discoveries img {
  display: block;
  width: 100%;
  max-width: 18rem;
  height: auto;
  border-radius: .75rem;
}
.constellation-bonus { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #9b739f; }
.constellation [hidden] { display: none; }
@media (max-width: 640px) {
  .constellation-layout { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .constellation-heart, .constellation-moon { transition: none; }
}
#full-moon-excerpt blockquote {
  margin: 1rem 0;
  padding-left: 1rem;
  border-left: 2px solid #ffaccb;
}

.story-parcels { margin-top: 1.5rem; }
.story-parcel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 1rem;
  margin: 1.25rem 0;
}
.story-parcel {
  border: 1px solid #aa879f;
  border-radius: .85rem;
}
.story-parcel summary {
  min-height: 44px;
  padding: 1rem;
  border-radius: .8rem;
  background: #6d203a;
  color: #fff1da;
  font-weight: 700;
  cursor: pointer;
}
.story-parcel-violet summary { background: #492766; }
.story-parcel summary:focus-visible { outline: 3px solid #d69b49; outline-offset: 3px; }
.story-letter { padding: 1rem; }
.story-letter blockquote { margin: 1rem 0; padding-left: .85rem; border-left: 2px solid #aa879f; }
@media (max-width: 640px) {
  .story-parcel-grid { grid-template-columns: 1fr; }
}
.story-book-cover {
  display: block;
  width: min(100%, 15rem);
  height: auto;
  margin: 1rem auto;
  border-radius: .6rem;
}

.story-parcel {
  --parcel-light: #b34464;
  --parcel-dark: #77243e;
  --parcel-satin: #ffcc81;
}
.story-parcel-violet {
  --parcel-light: #9863c1;
  --parcel-dark: #502970;
  --parcel-satin: #e7d5ff;
}
.story-parcel summary {
  display: block;
  text-align: center;
}
.parcel-stage {
  position: relative;
  display: block;
  width: min(100%, 11rem);
  height: 7.5rem;
  margin: 0 auto .65rem;
  overflow: hidden;
  isolation: isolate;
}
.parcel-paper {
  position: absolute;
  top: 28%;
  width: 42%;
  height: 64%;
  border: 1px solid #fff5;
  background: linear-gradient(155deg, var(--parcel-light), var(--parcel-dark));
}
.parcel-paper-left { left: 8%; border-radius: .55rem 0 0 .55rem; }
.parcel-paper-right { right: 8%; border-radius: 0 .55rem .55rem 0; }
.parcel-ribbon, .parcel-bow {
  position: absolute;
  z-index: 1;
  color: var(--parcel-satin);
}
.parcel-ribbon { inset: 28% 8% 8%; }
.parcel-ribbon::before, .parcel-ribbon::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.parcel-ribbon::before { inset: 0 45%; }
.parcel-ribbon::after { inset: 43% 0; }
.parcel-bow {
  inset: 8% 28% auto;
  height: 24%;
}
.parcel-bow::before, .parcel-bow::after {
  content: "";
  position: absolute;
  width: 43%;
  height: 70%;
  border: 3px solid currentColor;
  border-radius: 70% 45% 60% 40%;
}
.parcel-bow::before { left: 0; transform: rotate(23deg); }
.parcel-bow::after { right: 0; transform: rotate(-23deg) scaleX(-1); }
.parcel-stage::before {
  content: "";
  position: absolute;
  inset: 23% 5% 2%;
  background: radial-gradient(ellipse, #fff9e9 0%, var(--parcel-satin) 19%, transparent 68%);
  opacity: 0;
}
.parcel-sparkles {
  position: absolute;
  z-index: 2;
  inset: 0;
  color: var(--parcel-satin);
  pointer-events: none;
}
.parcel-sparkles span {
  position: absolute;
  left: 50%;
  top: 55%;
  opacity: 0;
  text-shadow: 0 0 .55rem currentColor;
}
.parcel-sparkles span:nth-child(1) { --spark-x: -4.3rem; --spark-y: -1.6rem; }
.parcel-sparkles span:nth-child(2) { --spark-x: -2.5rem; --spark-y: -3.4rem; font-size: 1.25rem; }
.parcel-sparkles span:nth-child(3) { --spark-x: .2rem; --spark-y: -3.8rem; }
.parcel-sparkles span:nth-child(4) { --spark-x: 2.6rem; --spark-y: -3rem; font-size: 1.3rem; }
.parcel-sparkles span:nth-child(5) { --spark-x: 4rem; --spark-y: -1.3rem; }
.parcel-open-label, .story-parcel[open] .parcel-closed-label { display: none; }
.story-parcel[open] .parcel-open-label { display: inline; }
.story-parcel[open] .parcel-bow,
.story-parcel[open] .parcel-ribbon { animation: ribbon-away .48s ease-in both; }
.story-parcel[open] .parcel-paper-left { animation: paper-away .55s .25s ease-in both; --peel: -75%; --tilt: -21deg; }
.story-parcel[open] .parcel-paper-right { animation: paper-away .55s .25s ease-in both; --peel: 75%; --tilt: 21deg; }
.story-parcel[open] .parcel-stage::before { animation: parcel-glow .95s ease-out both; }
.story-parcel[open] .parcel-sparkles span { animation: parcel-stardust 1s .22s ease-out both; }
.story-parcel[open] .parcel-sparkles span:nth-child(even) { animation-delay: .34s; }
@keyframes parcel-glow {
  0% { opacity: 0; transform: scaleX(.08); }
  32% { opacity: 1; transform: scaleX(.35); }
  65% { opacity: .9; transform: scale(1.15); }
  100% { opacity: .22; transform: scale(.9); }
}
@keyframes parcel-stardust {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.25); }
  25% { opacity: 1; }
  100% { opacity: .55; transform: translate(var(--spark-x), var(--spark-y)) rotate(30deg) scale(.8); }
}
.story-parcel[open] .story-letter { animation: parcel-rise .45s .7s ease-out both; }
@keyframes ribbon-away {
  to { transform: translate(35%, -110%) rotate(20deg); opacity: 0; }
}
@keyframes paper-away {
  to { transform: translateX(var(--peel)) rotate(var(--tilt)); opacity: 0; }
}
@keyframes parcel-rise {
  from { transform: translateY(.65rem); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .story-parcel[open] :is(.parcel-bow, .parcel-ribbon, .parcel-paper, .story-letter) { animation: none; }
  .story-parcel[open] .parcel-stage::before, .story-parcel[open] .parcel-sparkles span { animation: none; }
  .story-parcel[open] :is(.parcel-bow, .parcel-ribbon, .parcel-paper) { opacity: 0; }
  .story-parcel[open] .parcel-stage::before { opacity: .35; }
  .story-parcel[open] .parcel-sparkles span { opacity: .75; transform: translate(var(--spark-x), var(--spark-y)); }
}

.pendant-stage {
  display: block;
  width: min(100%, 28rem);
  height: auto;
  margin: 0 auto 1rem;
  border: 1px solid #9b739f;
  border-radius: 1rem;
  background: radial-gradient(ellipse at 50% 65%, #4a2c60, #151020 75%);
}
.pendant-chain {
  fill: none;
  stroke: #e2c5a6;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 1 4;
}
.pendant-right .pendant-chain { stroke: #dccbf2; }
.pendant-left { --join-distance: 12.5%; }
.pendant-right { --join-distance: -12.5%; }
.pendant-full { opacity: 0; filter: drop-shadow(0 0 10px #ffc8d9); }
.pendant-stage.joined .pendant-slide { animation: pendant-join .8s ease-in-out both; }
.pendant-stage.joined .pendant-full { animation: pendant-light .35s .8s ease-out both; }
@keyframes pendant-join {
  to { transform: translateX(var(--join-distance)); }
}
@keyframes pendant-light { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .pendant-stage.joined .pendant-slide { animation: none; transform: translateX(var(--join-distance)); }
  .pendant-stage.joined .pendant-full { animation: none; opacity: 1; }
}

.story-parcel { --parcel-foil: #ffdaa3; }
.story-parcel-violet { --parcel-foil: #e9d8ff; }
.parcel-paper {
  color: var(--parcel-foil);
  box-shadow: inset 0 0 0 2px #fff2, inset 0 0 1rem #16082066;
  background:
    radial-gradient(circle, #fff6 0 1px, transparent 1.5px) 2px 3px / 17px 17px,
    linear-gradient(145deg, var(--parcel-light), var(--parcel-dark));
}
.parcel-paper::before {
  position: absolute;
  inset: .28rem;
  border: 1px solid currentColor;
  border-radius: inherit;
  content: "";
  opacity: .6;
}
.parcel-paper::after {
  position: absolute;
  inset: .4rem .5rem;
  content: "✧ ☾";
  font-size: .85rem;
  text-align: left;
  text-shadow: 0 0 .4rem currentColor;
}
.parcel-paper-right::after {
  content: "☾ ✧";
  text-align: right;
}
.parcel-ribbon::before {
  background: linear-gradient(90deg, #99664b, currentColor 22%, #fff2db 49%, currentColor 65%, #99664b);
}
.parcel-ribbon::after {
  background: linear-gradient(180deg, #99664b, currentColor 22%, #fff2db 49%, currentColor 65%, #99664b);
}
.story-parcel-violet .parcel-ribbon::before,
.story-parcel-violet .parcel-ribbon::after { filter: hue-rotate(28deg) saturate(.55); }
.parcel-bow {
  font-size: 1rem;
  line-height: 1;
  padding-top: .9rem;
  text-shadow: 0 1px 2px #321830, 0 0 .55rem currentColor;
}
.parcel-bow::before, .parcel-bow::after {
  top: 0;
  background: linear-gradient(140deg, #fff6, transparent 65%);
  box-shadow: 0 0 .35rem #fff3;
}
