/* Our Halloween storybook. This stylesheet is loaded only by halloween.html. */
:root {
  color-scheme: dark;
  --hw-night: #30233f;
  --hw-ink: #644465;
  --hw-cream: #fff1df;
  --hw-pink: #efb8d2;
  --hw-lavender: #d4b9e6;
  --hw-muted: #d3bfd9;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body.hw-world { margin: 0; background: var(--hw-night); color: var(--hw-cream); font-family: Inter, sans-serif; font-size: 15px; line-height: 1.7; }
.hw-world h1, .hw-world h2, .hw-world p, .hw-world figure { margin: 0; }
.hw-world h1, .hw-world h2 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; line-height: 1.08; }
.hw-world h1 { font-size: clamp(2.65rem, 5.8vw, 5.9rem); letter-spacing: -.035em; }
.hw-world h2 { font-size: clamp(2.4rem, 4.6vw, 4.5rem); letter-spacing: -.03em; }
.hw-world em { color: var(--hw-pink); font-weight: 400; }
.hw-world a { color: inherit; text-underline-offset: 5px; }
.hw-world a, .hw-world button { -webkit-tap-highlight-color: transparent; }
.hw-world :focus-visible { outline: 3px solid #ffe1a0; outline-offset: 6px; }
.hw-world [hidden] { display: none !important; }
.hw-art { display: block; max-width: 100%; pointer-events: none; user-select: none; }
.hw-skip { opacity: 0; pointer-events: none; position: fixed; left: 20px; top: -100px; padding: 10px 18px; z-index: 10; background: var(--hw-cream); color: var(--hw-ink) !important; border-radius: 20px; }
.hw-skip:focus { top: 15px; opacity: 1; pointer-events: auto; }
.hw-topbar { max-width: 1340px; margin: auto; padding: 26px 5%; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid #d4b9e61a; }
.hw-brand { font: italic 1.7rem 'Cormorant Garamond', Georgia, serif; text-decoration: none; }
.hw-brand span { display: block; margin-top: 3px; font: 9px Inter, sans-serif; text-transform: uppercase; letter-spacing: .2em; color: var(--hw-muted); }
.hw-letter-shortcut { font-size: 12px; text-decoration: none; padding: 8px 0; }
.hw-letter-shortcut span { margin-left: 14px; color: var(--hw-pink); }
.hw-eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: .23em; color: #ddc3b9; font-weight: 500; }
.hw-welcome { position: relative; padding-top: 40px; text-align: center; background: radial-gradient(ellipse at 50% 52%, #62457066, transparent 65%); }
.hw-welcome-copy { position: relative; z-index: 1; padding: 0 22px; }
.hw-welcome h1 { margin: 18px auto 20px; }
.hw-subtitle { max-width: 480px; margin: auto !important; color: var(--hw-muted); font-size: clamp(.85rem, 1.2vw, 1rem); }
.hw-corner-web { position: absolute; width: clamp(60px, 12vw, 160px); left: 0; top: 0; opacity: .6; }
.hw-welcome-stage { position: relative; height: clamp(260px, 28vw, 385px); max-width: 1440px; margin: 0 auto; }
.hw-welcome-stage > .hw-art { position: absolute; }
.hw-village { width: 100%; height: 63%; object-fit: fill; bottom: 0; }
.hw-moon { width: 15%; max-width: 170px; right: 13%; top: -9%; filter: drop-shadow(0 0 24px #f4c99733); }
.hw-cloud { width: 20%; opacity: .5; animation: hw-cloud 12s ease-in-out infinite alternate; }
.hw-cloud--one { left: 12%; top: 4%; }
.hw-cloud--two { right: 6%; top: 25%; animation-delay: -5s; }
.hw-scarecrow { width: 15%; max-width: 175px; bottom: 3%; left: 31%; transform-origin: 50% 95%; }
.hw-welcome-witch { width: 8%; max-width: 91px; bottom: 12%; left: 54%; animation-delay: -2s !important; }
.hw-welcome-ghost { width: 9%; max-width: 108px; left: 17%; top: 29%; }
.hw-welcome-wave { width: 7%; max-width: 90px; right: 21%; bottom: 10%; animation-delay: -3s !important; }
.hw-welcome-pumpkin { width: 10%; max-width: 128px; bottom: 2%; left: 19%; }
.hw-welcome-giggle { width: 12%; max-width: 155px; bottom: 1%; right: 30%; animation-delay: -2.5s !important; }
.hw-welcome-hat { width: 8%; max-width: 100px; bottom: 1%; right: 16%; }
.hw-welcome-bat { width: 6%; left: 38%; top: 15%; transform: rotate(-10deg); }
.hw-welcome-bat-two { width: 5%; right: 29%; top: 32%; transform: rotate(12deg); }
.hw-welcome-lantern { width: 4.5%; bottom: 14%; left: 9%; }
.hw-welcome-lantern-two { width: 4%; bottom: 10%; right: 6%; animation-delay: -1.5s !important; }
.hw-explore { display: block; width: fit-content; margin: 0 auto; padding: 12px 24px 24px; text-decoration: none; font-size: 10px; letter-spacing: .12em; color: var(--hw-muted) !important; }
.hw-explore span { display: block; font-size: 22px; animation: hw-float 3s ease-in-out infinite; }
.hw-chapter { position: relative; padding: clamp(60px, 7vw, 100px) 24px; }
.hw-chapter-inner { max-width: 1120px; margin: 0 auto; position: relative; }
.hw-copy h2 { margin: 18px 0 24px; }
.hw-copy > p:not(.hw-eyebrow) { color: var(--hw-muted); font-size: 14px; line-height: 1.9; }
.hw-small-flourish { display: flex; align-items: center; gap: 14px; margin-top: 30px; }
.hw-small-flourish img { width: 23px; height: 30px; }
.hw-small-flourish img:last-child { transform: scaleX(-1); }
.hw-pumpkin-chapter { background: linear-gradient(#30233f, #3a2a49 55%, #3c2d4c); padding-bottom: 28px; }
.hw-pumpkin-layout { display: grid; grid-template-columns: .9fr 1.25fr; align-items: center; gap: 30px; }
.hw-special-scene { position: relative; padding: 35px 0 54px; }
.hw-special-scene::before { content: ""; position: absolute; inset: 25% 15%; border-radius: 50%; background: #f6b776; filter: blur(45px); opacity: .08; pointer-events: none; animation: hw-glow 7s ease-in-out infinite; }
.hw-special-pumpkin { position: relative; width: 100%; filter: drop-shadow(0 0 35px #efab7026); animation-duration: 7s !important; }
.hw-special-ghost { position: absolute; width: 11%; left: 5%; top: 6%; }
.hw-special-sleepy { position: absolute; width: 15%; left: 0; bottom: 12%; }
.hw-special-small { position: absolute; width: 19%; right: 0; bottom: 11%; }
.hw-special-scene figcaption, .hw-cat-scene figcaption { position: absolute; bottom: 0; text-align: center; width: 100%; font: italic 17px 'Cormorant Garamond', Georgia, serif; color: #d5b7cc; }
.hw-vine-divider { display: flex; justify-content: center; gap: 18px; margin-top: 40px; }
.hw-vine-divider img { width: 20px; height: 24px; opacity: .65; }
.hw-vine-divider img:first-child { transform: rotate(-45deg); }
.hw-vine-divider img:last-child { transform: rotate(45deg) scaleX(-1); }
.hw-boo-chapter { background: radial-gradient(ellipse at 50% 55%, #6d506c70, transparent 65%), linear-gradient(#3c2d4c, #453151); text-align: center; }
.hw-tombstone-scene { position: relative; max-width: 960px; margin: 22px auto 0; padding: 42px 0 50px; }
.hw-tombstone { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; width: 51%; min-height: 380px; margin: auto; padding: 48px 28px 36px; border: 5px solid #765e81; border-radius: 46% 46% 20px 20px / 35% 35% 18px 18px; background: #cbb9d2; box-shadow: inset 0 0 0 7px #b7a3c1, inset 0 0 0 9px #d9cadf, 0 16px 0 #30233f33; }
.hw-tombstone::after { content: ''; position: absolute; bottom: -16px; height: 20px; left: -12px; right: -12px; border: 3px solid #765e81; border-radius: 8px; background: #b7a3c1; }
.hw-tombstone h2 { color: #513955; font-size: clamp(1.7rem, 3.2vw, 3rem); line-height: 1.3; letter-spacing: -.02em; }
.hw-stone-ornament img { width: 34px; height: 34px; margin-bottom: 24px; }
.hw-stone-flourish { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.hw-stone-flourish img { width: 26px; height: 37px; }
.hw-stone-flourish img:nth-child(2) { width: 16px; }
.hw-tombstone-scene > .hw-art { position: absolute; }
.hw-skeleton { width: 17%; bottom: 16%; z-index: 1; transform-origin: 50% 90%; }
.hw-skeleton--one { left: 6%; }
.hw-skeleton--two { right: 6%; animation-direction: reverse !important; animation-delay: -1.8s !important; }
.hw-tomb-ghost { width: 8%; top: 2%; left: 11%; }
.hw-tomb-heart-ghost { width: 8%; top: 7%; right: 8%; animation-delay: -2.1s !important; }
.hw-tomb-pumpkin { width: 11%; bottom: 5%; left: 21%; z-index: 1; }
.hw-tomb-giggle { width: 13%; bottom: 5%; right: 20%; z-index: 1; }
.hw-tomb-web { width: 13%; right: 1%; top: -8%; transform: scaleX(-1); }
.hw-tomb-bat { width: 7%; top: -4%; left: 32%; }
.hw-peeking-spider { width: 5%; bottom: 5%; right: 8%; }
.hw-hanging-spider { position: absolute; right: 4%; top: 0; width: 44px; animation: hw-spider 5.4s ease-in-out infinite; }
.hw-hanging-spider span { display: block; height: 75px; width: 1px; background: #cab0d7; margin: auto; }
.hw-hanging-spider img { width: 44px; }
.hw-scene-note { margin-top: 18px !important; color: var(--hw-muted); font: italic 20px 'Cormorant Garamond', Georgia, serif; }
.hw-cat-chapter { background: linear-gradient(#453151, #4f385a 70%, #51395b); }
.hw-cat-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 65px; align-items: center; }
.hw-cat-scene { position: relative; min-height: 410px; padding-bottom: 45px; }
.hw-her-cat { position: relative; width: 75%; margin: auto; z-index: 1; }
.hw-cat-scene > .hw-art:not(.hw-her-cat) { position: absolute; }
.hw-cat-friend { width: 14%; left: 1%; bottom: 17%; }
.hw-cat-pumpkin { width: 21%; left: 4%; bottom: 10%; z-index: 2; }
.hw-cat-sleepy { width: 17%; right: 0; bottom: 10%; }
.hw-cat-bat { width: 16%; right: 5%; top: 0; transform: rotate(12deg); }
.hw-cat-ghost { width: 10%; left: 0; top: 16%; }
.hw-cat-flower { width: 7%; left: 27%; bottom: 13%; }
.hw-letter-chapter { background: radial-gradient(ellipse at 50% 50%, #8b5f752e, transparent 70%), linear-gradient(#51395b, #674961); text-align: center; }
.hw-letter-chapter h2 { margin-top: 18px; }
.hw-letter-invitation { color: #e6cddc; margin-top: 20px !important; font-size: 14px; }
.hw-letter-scene { max-width: 760px; margin: 65px auto 0; position: relative; padding: 20px 80px 0; }
.hw-envelope { position: relative; width: 340px; max-width: 100%; height: 205px; margin: 0 auto 30px; border: 3px solid #a985a2; border-radius: 14px; background: #d6b2c6; box-shadow: 0 20px 50px #30233f33; perspective: 900px; }
.hw-envelope-front { position: absolute; inset: 0; border-radius: 11px; background: #fff0df; clip-path: polygon(0 0, 50% 57%, 100% 0, 100% 100%, 0 100%); z-index: 2; }
.hw-envelope-front::after { content: ''; position: absolute; inset: 11px; border: 1px dashed #d1a4b9; border-radius: 5px; }
.hw-envelope-flap { position: absolute; top: 0; left: 0; width: 100%; height: 60%; background: #f8e4d7; clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; z-index: 3; transition: transform 650ms ease, background 650ms ease; }
.hw-envelope-seal { position: absolute; z-index: 4; width: 45px; height: 45px; top: 44%; left: calc(50% - 22px); transition: opacity 250ms ease; }
.hw-envelope-inscription { position: absolute; bottom: 22px; left: 0; width: 100%; z-index: 3; color: #9e708c; font: italic 24px 'Cormorant Garamond', Georgia, serif; }
.hw-letter-scene.is-open .hw-envelope-flap { transform: rotateX(170deg); background: #dcb9cf; }
.hw-letter-scene.is-open .hw-envelope-seal { opacity: 0; }
.hw-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid #e6b8d5; border-radius: 999px; padding: 13px 26px; color: #54344e !important; background: #f3ccda; font: 500 13px/1.5 Inter, sans-serif; text-decoration: none; box-shadow: 0 0 24px #efb8d21a; transition: box-shadow 200ms ease, background 200ms ease, transform 200ms ease; cursor: pointer; }
.hw-button:hover { background: #ffe2e9; box-shadow: 0 0 28px #efb8d244; transform: translateY(-2px); }
.hw-letter-toggle { position: relative; z-index: 2; }
.hw-letter-paper { position: relative; z-index: 2; width: 100%; margin-top: 28px; padding: clamp(25px, 5vw, 50px); border: 1px solid #e5c8bc; border-radius: 8px; background: #fff3e4; color: #654453; box-shadow: 0 18px 35px #30233f2b; text-align: left; animation: hw-unfold 600ms ease both; }
.hw-letter-paper::before { content: ''; position: absolute; inset: 10px; border: 1px solid #e7cfc5; pointer-events: none; }
.hw-letter-text { white-space: pre-line; overflow-wrap: anywhere; font: 400 clamp(1.2rem, 2.3vw, 1.55rem)/1.7 'Cormorant Garamond', Georgia, serif; }
.hw-letter-text p { margin: 0; white-space: normal; }
.hw-letter-text p + p { margin-top: 1em; }
.hw-letter-scene > .hw-art { position: absolute; }
.hw-letter-ghost { width: 13%; left: 0; top: 40px; }
.hw-letter-wave { width: 11%; right: 0; top: 70px; animation-delay: -1.5s !important; }
.hw-letter-pumpkin { width: 12%; left: 4%; top: 200px; }
.hw-letter-flower { width: 6%; right: 4%; top: 220px; }
.hw-letter-hearts { position: absolute; inset: 0; pointer-events: none; }
.hw-release-heart { position: absolute; width: 19px; left: 45%; top: 20%; opacity: 0; }
.hw-release-heart--1 { left: 20%; --hw-drift: -25px; animation-delay: 100ms !important; }
.hw-release-heart--2 { left: 70%; --hw-drift: 25px; animation-delay: 200ms !important; }
.hw-release-heart--3 { left: 35%; --hw-drift: -15px; animation-delay: 300ms !important; }
.hw-release-heart--4 { left: 60%; --hw-drift: 15px; animation-delay: 450ms !important; }
.hw-letter-scene.is-open .hw-release-heart { animation: hw-heart-release 2s ease-out both; }
.hw-noscript { margin-top: 20px !important; }
.hw-ending { position: relative; padding: 30px 24px 35px; text-align: center; background: linear-gradient(#674961, #76566e); }
.hw-ending-friends { display: flex; justify-content: center; gap: 22px; align-items: flex-end; margin-bottom: 32px; }
.hw-ending-friends img { width: 64px; height: 72px; }
.hw-ending-friends img:nth-child(3) { animation-delay: -2s; }
.hw-ending h2 { margin: 18px 0 28px; }
.hw-home img { width: 20px; height: 20px; }
.hw-colophon { margin-top: 40px !important; font-size: 10px; color: #ecd6e4; letter-spacing: .08em; }
/* Scene accents have fixed, intentional positions outside their text areas. */
.hw-charms { position: absolute; inset: 0; pointer-events: none; }
.hw-charm { position: absolute; width: 15px; animation: hw-twinkle 4.8s ease-in-out infinite; }
.hw-charm--0 { left: 8%; top: 8%; }
.hw-charm--1 { left: 27%; top: 22%; width: 16px; animation-name: hw-float; animation-delay: -1.7s; }
.hw-charm--2 { right: 20%; top: 8%; animation-delay: -2.8s; }
.hw-charm--3 { left: 12%; bottom: 8%; width: 22px; animation-name: hw-leaf; animation-duration: 7s; }
.hw-charm--4 { right: 8%; top: 47%; width: 17px; animation-name: hw-float; animation-delay: -2.4s; }
.hw-charm--5 { right: 34%; bottom: 4%; width: 11px; animation-delay: -3.5s; }
.hw-charm--6 { right: 5%; bottom: 12%; width: 20px; animation-name: hw-leaf; animation-duration: 6s; animation-delay: -2s; }
.hw-charm--7 { left: 47%; top: 4%; width: 11px; animation-delay: -1s; }
.hw-pumpkin-chapter .hw-charm--1 { left: 1%; top: 40%; }
.hw-pumpkin-chapter .hw-charm--2 { right: 3%; }
.hw-pumpkin-chapter .hw-charm--4 { right: 0; top: 30%; }
.hw-boo-chapter .hw-charm--1 { left: 2%; top: 42%; }
.hw-boo-chapter .hw-charm--7 { left: 65%; top: 0; }
.hw-cat-chapter .hw-charm--1 { left: 6%; top: 0; }
.hw-cat-chapter .hw-charm--2 { right: 0; top: 28%; }
.hw-cat-chapter .hw-charm--7 { left: 7%; top: 45%; }
.hw-letter-chapter .hw-charm--1 { left: 4%; top: 0; }
.hw-letter-chapter .hw-charm--2 { right: 5%; top: 0; }
.hw-letter-chapter .hw-charm--7 { left: 13%; top: 55%; }
.hw-ending > .hw-charms { max-width: 1000px; margin: auto; }
.hw-ending .hw-charm--1 { left: 12%; }
.hw-ending .hw-charm--2 { right: 12%; }
.hw-ending .hw-charm--7 { left: 33%; top: 3%; }
.hw-float { animation: hw-float 4.7s ease-in-out infinite; }
.hw-sway { animation: hw-sway 6s ease-in-out infinite; transform-origin: 50% 90%; }
.hw-wiggle { animation: hw-sway 4.2s ease-in-out infinite; transform-origin: 50% 90%; }
.hw-dance { animation: hw-dance 3.7s ease-in-out infinite; }
@keyframes hw-glow { 50% { opacity: .16; } }
@keyframes hw-float { 50% { transform: translateY(-9px); } }
@keyframes hw-sway { 0%,100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes hw-dance { 0%,100% { transform: rotate(-4deg) translateY(0); } 50% { transform: rotate(4deg) translateY(-7px); } }
@keyframes hw-spider { 50% { transform: translateY(15px); } }
@keyframes hw-twinkle { 0%,100% { opacity: .45; transform: scale(.85); } 50% { opacity: 1; transform: scale(1); } }
@keyframes hw-leaf { 50% { transform: translate(7px, -7px) rotate(14deg); } }
@keyframes hw-cloud { to { transform: translateX(12px); } }
@keyframes hw-unfold { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hw-heart-release { 0% { opacity: 0; transform: translate(0, 0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--hw-drift, 0px), -100px); } }
@media (max-width: 800px) {
  .hw-topbar { padding: 20px 24px; }
  .hw-pumpkin-layout, .hw-cat-layout { grid-template-columns: 1fr; gap: 25px; }
  .hw-copy { text-align: center; }
  .hw-copy > p:not(.hw-eyebrow) { max-width: 420px; margin: auto; }
  .hw-small-flourish { justify-content: center; margin-top: 18px; }
  .hw-special-scene { max-width: 580px; width: 100%; margin: auto !important; }
  .hw-cat-scene { max-width: 480px; width: 100%; margin: auto !important; min-height: 0; }
  .hw-cat-layout .hw-copy { grid-row: 1; }
  .hw-tombstone { width: 58%; min-height: 330px; padding: 35px 20px; }
  .hw-tombstone h2 { font-size: clamp(1.55rem, 3.8vw, 2.5rem); }
  .hw-skeleton { width: 20%; bottom: 18%; }
  .hw-skeleton--one { left: 0; }
  .hw-skeleton--two { right: 0; }
}
@media (max-width: 520px) {
  .hw-world { font-size: 14px; }
  .hw-topbar { gap: 12px; padding: 18px 20px; }
  .hw-brand { font-size: 1.45rem; }
  .hw-brand span { font-size: 7px; letter-spacing: .13em; }
  .hw-letter-shortcut { font-size: 10px; }
  .hw-letter-shortcut span { margin-left: 4px; }
  .hw-welcome { padding-top: 35px; }
  .hw-welcome h1 { margin-top: 15px; }
  .hw-subtitle { max-width: 320px; }
  .hw-welcome-stage { height: 260px; margin-top: 20px; }
  .hw-moon { width: 24%; right: 9%; top: 0; }
  .hw-cloud { width: 30%; }
  .hw-cloud--one { left: 2%; top: 8%; }
  .hw-cloud--two { right: 2%; top: 30%; }
  .hw-village { height: 50%; }
  .hw-scarecrow { width: 25%; left: 29%; bottom: 0; }
  .hw-welcome-witch { width: 14%; left: 57%; bottom: 12%; }
  .hw-welcome-ghost { width: 17%; left: 8%; top: 23%; }
  .hw-welcome-wave { width: 12%; right: 10%; bottom: 26%; }
  .hw-welcome-pumpkin { width: 18%; left: 10%; }
  .hw-welcome-giggle { width: 21%; right: 23%; }
  .hw-welcome-hat { width: 15%; right: 5%; }
  .hw-welcome-bat { width: 12%; left: 38%; top: 13%; }
  .hw-welcome-bat-two { width: 10%; right: 28%; top: 38%; }
  .hw-welcome-lantern { width: 8%; left: 1%; bottom: 18%; }
  .hw-welcome-lantern-two { width: 7%; right: 1%; bottom: 48%; }
  .hw-welcome .hw-charm--0 { left: 6%; top: 4%; }
  .hw-welcome .hw-charm--2 { right: 35%; top: 3%; }
  .hw-welcome .hw-charm--1 { left: 29%; top: 40%; }
  .hw-chapter { padding: 55px 20px; }
  .hw-pumpkin-chapter { padding-bottom: 20px; }
  .hw-copy h2 { font-size: clamp(2.2rem, 9vw, 3rem); }
  .hw-copy > p:not(.hw-eyebrow) { font-size: 12px; }
  .hw-eyebrow { font-size: 8px; letter-spacing: .18em; }
  .hw-special-scene { padding-top: 25px; padding-bottom: 47px; }
  .hw-special-scene figcaption, .hw-cat-scene figcaption { font-size: 14px; padding: 0 5px; }
  .hw-special-sleepy { bottom: 17%; }
  .hw-special-small { bottom: 16%; }
  .hw-tombstone-scene { padding: 35px 0 130px; }
  .hw-tombstone { width: 88%; min-height: 280px; padding: 35px 20px 30px; border-width: 3px; }
  .hw-tombstone h2 { font-size: clamp(1.5rem, 6.2vw, 2rem); }
  .hw-stone-ornament img { width: 27px; height: 27px; margin-bottom: 16px; }
  .hw-stone-flourish { margin-top: 15px; }
  .hw-skeleton { width: 27%; bottom: 0; }
  .hw-skeleton--one { left: 6%; }
  .hw-skeleton--two { right: 6%; }
  .hw-tomb-pumpkin { width: 18%; left: 32%; bottom: 3%; }
  .hw-tomb-giggle { width: 20%; right: 30%; bottom: 0; }
  .hw-tomb-ghost { width: 13%; top: -2%; left: 3%; }
  .hw-tomb-heart-ghost { width: 12%; top: -1%; right: 6%; }
  .hw-tomb-bat { width: 13%; left: 40%; top: -3%; }
  .hw-hanging-spider { width: 25px; right: -5px; }
  .hw-hanging-spider img { width: 25px; }
  .hw-hanging-spider span { height: 38px; }
  .hw-tomb-web { width: 21%; right: -4%; top: -8%; }
  .hw-peeking-spider { width: 10%; right: 2%; bottom: 28%; }
  .hw-boo-chapter .hw-charm--1 { left: 0; top: 47%; width: 12px; }
  .hw-boo-chapter .hw-charm--4 { right: 0; width: 12px; }
  .hw-boo-chapter .hw-charm--7 { left: 72%; top: -4%; }
  .hw-scene-note { font-size: 17px; }
  .hw-cat-layout { gap: 32px; }
  .hw-cat-scene { padding-bottom: 40px; }
  .hw-letter-scene { padding: 20px 0 0; margin-top: 85px; }
  .hw-envelope { width: 86%; height: clamp(155px, 46vw, 195px); }
  .hw-letter-ghost { width: 16%; top: -58px !important; left: 1% !important; }
  .hw-letter-wave { width: 15%; top: -53px !important; right: 0 !important; }
  .hw-letter-pumpkin { width: 15%; top: auto !important; left: 0 !important; bottom: 55px; }
  .hw-letter-flower { width: 8%; top: 165px !important; right: 0 !important; }
  .hw-letter-scene.is-open .hw-letter-pumpkin { top: 170px !important; bottom: auto; }
  .hw-letter-chapter .hw-charm--1 { top: -55px; left: 24%; }
  .hw-letter-chapter .hw-charm--2 { top: -50px; right: 25%; }
  .hw-letter-chapter .hw-charm--7 { top: -35px; left: 48%; }
  .hw-letter-chapter .hw-charm--3, .hw-letter-chapter .hw-charm--4, .hw-letter-chapter .hw-charm--5, .hw-letter-chapter .hw-charm--6 { display: none; }
  .hw-letter-paper { padding: 28px; }
  .hw-letter-invitation { font-size: 12px; }
  .hw-ending { padding-top: 22px; }
  .hw-ending h2 { font-size: 2.6rem; }
  .hw-ending .hw-charm--0, .hw-ending .hw-charm--2 { top: 7%; }
  .hw-ending .hw-charm--1 { left: 4%; top: 29%; }
  .hw-ending .hw-charm--4 { right: 3%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hw-world *, .hw-world *::before, .hw-world *::after { animation: none !important; transition: none !important; }
  .hw-letter-scene.is-open .hw-release-heart { opacity: 0; }
}

/* Rich storybook environments. The approved letter component above is unchanged. */
.hw-welcome {
  background: radial-gradient(ellipse at 72% 50%, #9b688232, transparent 50%),
    radial-gradient(ellipse at 22% 40%, #a886b31c, transparent 55%),
    linear-gradient(#30233f, #46304e 70%, #4e3656);
  padding-top: clamp(35px, 5vw, 68px);
}
.hw-welcome h1 { max-width: 1050px; font-size: clamp(2.6rem, 5.5vw, 5rem); margin: 0 auto; }
.hw-welcome h1 em { display: inline-block; }
.hw-welcome-stage { height: clamp(340px, 40vw, 565px); margin-top: 12px; }
.hw-sky-details { inset: 0; width: 100%; height: 100%; object-fit: fill; }
.hw-village { height: 87%; object-fit: fill; bottom: 0; }
.hw-moon { width: 14%; right: 22%; top: 0; filter: drop-shadow(0 0 27px #f2cb9d55); }
.hw-cloud--one { top: 2%; left: 6%; width: 21%; opacity: .55; }
.hw-cloud--two { top: 17%; right: 4%; width: 17%; opacity: .5; }
.hw-scarecrow { width: 15%; max-width: 190px; left: 36%; bottom: 7%; }
.hw-welcome-witch { width: 10%; max-width: 122px; left: 57%; bottom: 8%; }
.hw-welcome-ghost { width: 8%; left: 18%; top: 15%; }
.hw-welcome-wave { width: 7%; right: 16%; bottom: 38%; }
.hw-welcome-pumpkin { left: 24%; bottom: 7%; width: 10%; }
.hw-welcome-giggle { right: 23%; bottom: 5%; width: 10%; }
.hw-welcome-hat { right: 12%; bottom: 6%; width: 8%; }
.hw-welcome-bat { left: 39%; top: 10%; }
.hw-welcome-bat-two { right: 32%; top: 25%; }
.hw-welcome-lantern { left: 11%; bottom: 27%; }
.hw-welcome-lantern-two { right: 9%; bottom: 27%; }
.hw-explore { padding: 0 28px 8px; min-height: 44px; }
.hw-explore span { font-size: 25px; }
.hw-pumpkin-chapter { padding-top: 45px; padding-bottom: 0; background: linear-gradient(#4e3656, #49334f); }
.hw-pumpkin-layout, .hw-cat-layout { display: flex; flex-direction: column; gap: 0; }
.hw-pumpkin-layout > .hw-copy, .hw-cat-layout > .hw-copy { width: 100%; text-align: center; }
.hw-pumpkin-layout h2 { margin: 0 auto 12px; font-size: clamp(2.1rem, 4.3vw, 4.3rem); font-style: italic; color: #efbdd4; }
.hw-special-scene { width: 100%; max-width: 1100px; min-height: 540px; padding: 35px 0 80px; isolation: isolate; }
.hw-scene-ground { position: absolute !important; width: 100%; height: auto; bottom: 0; left: 0; z-index: -1; pointer-events: none; }
.hw-special-pumpkin { width: 66%; max-width: 670px; margin: auto; }
.hw-special-scene::before { inset: 20% 28% 18%; }
.hw-special-ghost { left: 15%; top: 17%; width: 8%; }
.hw-special-sleepy { width: 12%; left: 13%; bottom: 13%; }
.hw-special-small { width: 13%; right: 17%; bottom: 9%; }
.hw-patch-hat { position: absolute; width: 12%; left: 3%; bottom: 10%; }
.hw-patch-lantern { position: absolute; width: 6%; right: 8%; bottom: 30%; }
.hw-patch-wave { position: absolute; width: 7%; right: 10%; top: 10%; }
.hw-special-scene .hw-charm--3 { left: 25%; bottom: 14%; }
.hw-special-scene .hw-charm--5 { right: 35%; bottom: 18%; }
.hw-boo-chapter { padding-top: 40px; padding-bottom: 35px; background: radial-gradient(ellipse at 50% 50%, #85617a3b, transparent 70%), linear-gradient(#49334f, #503951); }
.hw-tombstone-scene { isolation: isolate; padding: 55px 0 110px; max-width: 1120px; }
.hw-tombstone { background: radial-gradient(ellipse at 32% 20%, #e1d2df, transparent 72%), linear-gradient(135deg,#cbb9d2,#ad97b7); box-shadow: inset 0 0 0 7px #b7a3c1, inset 0 0 0 9px #dfd1e3, 0 16px 0 #30233f33, 0 25px 36px #241d3122; min-height: 395px; width: 45%; padding-top: 55px; }
.hw-tombstone::before { content: ''; pointer-events: none; position: absolute; inset: 18px; border: 1px solid #9b7fa33d; border-radius: 46% 46% 12px 12px / 33% 33% 12px 12px; background-image: radial-gradient(#8e729a33 .6px, transparent .8px); background-size: 13px 17px; }
.hw-tombstone h2, .hw-stone-ornament, .hw-stone-flourish { position: relative; z-index: 1; }
.hw-stone-engraving { width: 40%; position: absolute; top: 18px; left: 30%; opacity: .8; }
.hw-stone-ornament img { margin-bottom: 20px; }
.hw-stone-flourish { margin-top: 26px; }
.hw-tombstone-scene .hw-scene-ground { height: 60%; object-fit: fill; }
.hw-skeleton { width: 17%; bottom: 14%; }
.hw-skeleton--one { left: 7%; }
.hw-skeleton--two { right: 7%; }
.hw-tomb-pumpkin { left: 22%; bottom: 11%; }
.hw-tomb-giggle { right: 21%; bottom: 10%; }
.hw-grave-lantern { width: 5%; bottom: 27%; left: 2%; }
.hw-grave-lantern-two { width: 5%; bottom: 28%; right: 2%; }
.hw-peeking-spider { bottom: 10%; right: 12%; }
.hw-cat-chapter { padding-top: 18px; padding-bottom: 10px; background: linear-gradient(#503951, #51395b); }
.hw-cat-layout > .hw-copy { order: -1; }
#cat-title { font-weight: 600; font-size: clamp(3.7rem, 7.5vw, 7rem); color: #f4c3d8; letter-spacing: -.04em; margin: 0 0 5px; }
.hw-cat-scene { width: 100%; max-width: 1080px; min-height: 535px; padding-top: 15px; padding-bottom: 80px; isolation: isolate; }
.hw-her-cat { width: 43%; max-width: 450px; }
.hw-cat-scene .hw-scene-ground { height: 66%; object-fit: fill; }
.hw-cat-friend { width: 12%; left: 15%; bottom: 18%; }
.hw-cat-pumpkin { width: 13%; left: 20%; bottom: 11%; }
.hw-cat-sleepy { width: 13%; right: 18%; bottom: 12%; }
.hw-cat-bat { width: 10%; right: 22%; top: 4%; }
.hw-cat-ghost { width: 6%; left: 22%; top: 9%; }
.hw-cat-flower { width: 5%; left: 35%; bottom: 14%; }
.hw-cat-lantern { width: 6%; right: 9%; bottom: 30%; }
.hw-cat-heart-ghost { width: 8%; right: 7%; top: 18%; }
.hw-cat-scene .hw-charm--0 { top: 6%; left: 12%; }
.hw-cat-scene .hw-charm--1 { left: 34%; top: 13%; }
.hw-cat-scene .hw-charm--7 { left: 12%; top: 40%; }
.hw-between-garden { position: relative; width: min(1200px, 100%); height: auto; margin: 20px auto -75px; }
.hw-ending { padding-bottom: clamp(140px, 18vw, 240px); isolation: isolate; }
.hw-ending-landscape { position: absolute; width: 100%; max-height: 260px; height: auto; object-fit: fill; bottom: 0; left: 0; z-index: -1; opacity: .85; }
.hw-ending-friends img { width: 74px; height: 83px; }
.hw-ending .hw-charm--3, .hw-ending .hw-charm--6 { bottom: 20%; }
@media (max-width: 800px) {
  .hw-special-scene { min-height: 0; padding-bottom: 60px; }
  .hw-special-pumpkin { width: 76%; }
  .hw-special-scene .hw-scene-ground { height: 62%; object-fit: fill; }
  .hw-special-ghost { left: 5%; }
  .hw-special-sleepy { left: 5%; bottom: 14%; }
  .hw-patch-hat { left: 17%; bottom: 5%; width: 13%; }
  .hw-special-small { right: 6%; bottom: 12%; }
  .hw-patch-wave { right: 4%; }
  .hw-patch-lantern { right: 0; width: 7%; }
  .hw-tombstone { width: 54%; min-height: 340px; }
  .hw-skeleton { width: 21%; }
  .hw-skeleton--one { left: 0; }
  .hw-skeleton--two { right: 0; }
  .hw-cat-scene { min-height: 0; padding-bottom: 60px; }
  .hw-her-cat { width: 54%; }
  .hw-cat-friend { left: 6%; width: 15%; }
  .hw-cat-pumpkin { left: 12%; width: 15%; }
  .hw-cat-sleepy { right: 7%; width: 15%; }
  .hw-cat-bat { right: 16%; }
  .hw-cat-ghost { left: 13%; width: 8%; }
  .hw-cat-heart-ghost { right: 2%; width: 10%; }
  .hw-cat-lantern { right: 0; width: 7%; }
  .hw-between-garden { width: calc(100% + 48px); max-width: none; margin-left: -24px; margin-bottom: -60px; }
}
@media (max-width: 520px) {
  .hw-welcome-copy { padding: 0 20px; }
  .hw-welcome h1 { font-size: clamp(2.2rem, 8.8vw, 3rem); line-height: 1.12; }
  .hw-welcome-stage { height: 340px; margin-top: 20px; }
  .hw-village { height: 72%; }
  .hw-moon { width: 25%; right: 12%; top: 0; }
  .hw-cloud--one { width: 31%; left: 0; top: 9%; }
  .hw-cloud--two { width: 27%; right: 16px; top: 25%; }
  .hw-scarecrow { width: 29%; left: 30%; bottom: 10%; }
  .hw-welcome-witch { width: 17%; left: 61%; bottom: 12%; }
  .hw-welcome-ghost { width: 17%; left: 8%; top: 20%; }
  .hw-welcome-wave { width: 13%; right: 8%; bottom: 39%; }
  .hw-welcome-pumpkin { width: 20%; left: 12%; bottom: 7%; }
  .hw-welcome-giggle { width: 19%; right: 20%; bottom: 5%; }
  .hw-welcome-hat { width: 16%; right: 3%; bottom: 8%; }
  .hw-welcome-bat { width: 13%; left: 34%; top: 10%; }
  .hw-welcome-bat-two { width: 11%; right: 27%; top: 33%; }
  .hw-welcome-lantern { width: 8%; left: 3%; bottom: 29%; }
  .hw-welcome-lantern-two { width: 8%; right: 2%; bottom: 57%; }
  .hw-pumpkin-chapter { padding: 35px 15px 0; }
  .hw-pumpkin-layout h2 { max-width: 330px; font-size: 2.2rem; line-height: 1.15; margin-bottom: 10px; }
  .hw-special-scene { padding-top: 42px; padding-bottom: 70px; }
  .hw-special-pumpkin { width: 100%; }
  .hw-special-scene .hw-scene-ground { height: 56%; width: calc(100% + 30px); max-width: none; left: -15px; }
  .hw-special-ghost { top: 0; left: 5%; width: 12%; }
  .hw-special-sleepy { width: 17%; bottom: 17%; left: 0; }
  .hw-special-small { width: 21%; bottom: 11%; right: 0; }
  .hw-patch-hat { width: 18%; bottom: 1%; left: 16%; }
  .hw-patch-wave { width: 12%; right: 6%; top: 0; }
  .hw-patch-lantern { width: 10%; right: 0; bottom: 35%; }
  .hw-special-scene .hw-charm--0 { left: 23%; top: 2%; }
  .hw-special-scene .hw-charm--2 { right: 25%; top: 5%; }
  .hw-special-scene .hw-charm--4 { right: 3%; top: 17%; }
  .hw-special-scene .hw-charm--7 { top: 0; }
  .hw-boo-chapter { padding: 15px 20px 10px; }
  .hw-tombstone-scene { padding: 60px 0 160px; margin-top: 15px; }
  .hw-tombstone { width: 90%; min-height: 300px; padding: 50px 16px 35px; }
  .hw-tombstone h2 { font-size: clamp(1.5rem, 6.3vw, 2rem); }
  .hw-stone-engraving { width: 50%; left: 25%; top: 14px; }
  .hw-tombstone-scene .hw-scene-ground { width: calc(100% + 40px); max-width: none; left: -20px; height: 42%; }
  .hw-skeleton { width: 29%; bottom: 5%; }
  .hw-skeleton--one { left: 4%; }
  .hw-skeleton--two { right: 4%; }
  .hw-tomb-pumpkin { width: 22%; bottom: 9%; left: 30%; }
  .hw-tomb-giggle { width: 24%; bottom: 5%; right: 26%; }
  .hw-tomb-ghost { top: 1%; left: 4%; }
  .hw-tomb-heart-ghost { top: 2%; right: 8%; }
  .hw-tomb-bat { top: 0; }
  .hw-tomb-web { top: -2%; }
  .hw-grave-lantern { width: 8%; left: -2%; bottom: 30%; }
  .hw-grave-lantern-two { width: 8%; right: -2%; bottom: 31%; }
  .hw-cat-chapter { padding: 25px 20px 5px; }
  #cat-title { font-size: 4rem; }
  .hw-cat-scene { padding-top: 40px; padding-bottom: 65px; }
  .hw-her-cat { width: 75%; }
  .hw-cat-scene .hw-scene-ground { width: calc(100% + 40px); max-width: none; left: -20px; height: 58%; }
  .hw-cat-friend { width: 18%; left: 0; bottom: 18%; }
  .hw-cat-pumpkin { width: 20%; left: 4%; bottom: 9%; }
  .hw-cat-sleepy { width: 20%; right: 0; bottom: 8%; }
  .hw-cat-bat { width: 16%; right: 4%; top: 0; }
  .hw-cat-ghost { width: 12%; left: 4%; top: 3%; }
  .hw-cat-heart-ghost { width: 12%; right: -2%; top: 26%; }
  .hw-cat-lantern { width: 9%; right: 0; bottom: 34%; }
  .hw-cat-flower { width: 8%; left: 29%; bottom: 16%; }
  .hw-cat-scene .hw-charm--1 { top: 2%; }
  .hw-cat-scene .hw-charm--2 { right: 3%; top: 19%; }
  .hw-cat-scene .hw-charm--0 { left: 47%; top: 0; }
  .hw-between-garden { width: calc(100% + 40px); margin-left: -20px; height: 145px; object-fit: fill; margin-bottom: -55px; }
  .hw-ending { padding-top: 30px; padding-bottom: 160px; }
  .hw-ending-landscape { height: 160px; object-fit: fill; }
}
/* Blend the illustrated banks into the next scene, retaining foreground detail. */
.hw-scene-ground, .hw-village, .hw-between-garden, .hw-ending-landscape {
  mask-image: linear-gradient(to bottom, #000 0%, #000 93%, transparent 100%);
}
/* Keep even small accents outside the readable heading areas. */
.hw-ending .hw-charm--1 { left: 8%; top: 12%; }
.hw-ending .hw-charm--4 { right: 8%; top: 14%; }
@media (max-width: 1100px) {
  .hw-welcome .hw-corner-web { width: 40px; top: -5px; }
}
