Back to the app
The code
Love Letter by GPT-6.2 Astra
Exactly as the AI wrote it. Shown as text, so nothing runs on this page.
index.html
works · auto-checked (Checked by an automated pass. Not hand-played yet.)<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="theme-color" content="#f8f3e8">
<title>Purr Post — Love, by post.</title>
<style>
:root {
--canvas:#f7f2e7; --surface:#fffbf2; --ink:#382b27; --muted:#74685c; --red:#a13e38;
--wine:#8b332e; --gold:#bd9457; --line:#d9cdbb; --soft-line:#e4dac9;
--display:"DM Serif Text",Georgia,"Times New Roman",serif;
--body:"DM Sans","Segoe UI",system-ui,sans-serif;
--mono:"IBM Plex Mono",Consolas,"Liberation Mono",monospace;
--hand:"Segoe Print","Bradley Hand","Apple Chancery","Comic Sans MS",cursive;
--env:#efc9b7; --flap:#f9deca; --env-shadow:#dba998; --env-line:#a96f63;
--seal:#ae4541; --seal-dark:#853c38; --seal-mark:#ffe2b8;
--sheet:#fff4e6; --sheet-ink:#683d37; --rule:#d9b8a5; --print:#ad655a; --night:#32394f;
}
[data-paper="botanical"] {
--env:#c5ceaa; --flap:#e0e3c5; --env-shadow:#aab898; --env-line:#768266;
--seal:#647759; --seal-dark:#465c47; --seal-mark:#f4e7b9;
--sheet:#f4f4e5; --sheet-ink:#344e40; --rule:#bbc6a6; --print:#708164; --night:#2f4650;
}
[data-paper="moonbeam"] {
--env:#44556e; --flap:#62748a; --env-shadow:#35465e; --env-line:#a1a4a4;
--seal:#cda75d; --seal-dark:#98764b; --seal-mark:#483d40;
--sheet:#313f55; --sheet-ink:#fff0cc; --rule:#737b87; --print:#ddbe82; --night:#253347;
}
* { box-sizing:border-box }
[hidden] { display:none !important }
html { min-height:100%; -webkit-text-size-adjust:100% }
body {
margin:0; min-width:280px; min-height:100vh; color:var(--ink); font:15px/1.45 var(--body);
background:radial-gradient(ellipse at 48% 0%,#fcf9f0 0,transparent 65%),var(--canvas);
}
body::after {
content:""; position:fixed; inset:0; z-index:30; pointer-events:none; opacity:.048; mix-blend-mode:multiply;
background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='148' height='148'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.81' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%236d5b4a' filter='url(%23g)' d='M0 0h148v148H0z'/%3E%3C/svg%3E");
}
button,input,textarea { font:inherit }
button { -webkit-tap-highlight-color:transparent; touch-action:manipulation; cursor:pointer }
button:disabled { cursor:default }
button:focus-visible,input:focus-visible,textarea:focus-visible,a:focus-visible {
outline:3px solid #ac7539; outline-offset:3px;
}
::selection { background:#eed1a8; color:#382b27 }
.defs { position:absolute; width:0; height:0; overflow:hidden; pointer-events:none }
.icon { width:19px; height:19px; flex:none; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round }
.air-stripe {
height:5px; background:repeating-linear-gradient(128deg,#a84a43 0 14px,#f4e8d3 14px 28px,#777e85 28px 42px,#f4e8d3 42px 56px);
}
.wrap { width:calc(100% - 88px); max-width:1196px; margin-inline:auto }
.mast { border-bottom:1px solid var(--line) }
.mast-inner { height:74px; display:flex; align-items:center; justify-content:space-between }
.brand { display:inline-flex; gap:12px; align-items:center; font:700 33px/1 var(--display); letter-spacing:-1.9px }
.brand svg { width:43px; height:47px; transform:rotate(-6deg) }
.brand i { font-weight:400; color:var(--red); margin-left:1px }
.sound,.quiet-button {
display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:42px;
border:1px solid #cfc1ad; border-radius:99px; color:#51433b; background:#fbf7ed;
padding:8px 15px; font:600 13px/1.2 var(--body); transition:background .2s,border-color .2s;
}
.sound .icon { width:17px; height:17px }
.sound[aria-pressed="true"] .sound-cross,.sound[aria-pressed="false"] .sound-waves { display:none }
.intro { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:31px 2px 29px }
h1,h2,p { margin:0 }
h1 { font:500 clamp(52px,5.35vw,76px)/1.04 var(--display); letter-spacing:-.065em }
h1 em { color:var(--red); font-weight:400; letter-spacing:-.064em }
.intro p { color:#6c5e53; font-size:15px; line-height:1.5; margin-top:9px }
.cancellation { color:#9f7161; width:178px; height:86px; flex:none; transform:rotate(-9deg); margin:0 12px 0 0; opacity:.81 }
.desk-grid { display:grid; grid-template-columns:minmax(340px,.79fr) minmax(0,1.21fr); grid-template-areas:"form window"; align-items:stretch; gap:24px }
.panel { border:1px solid var(--line); border-radius:12px; background:var(--surface); box-shadow:0 3px 0 -1px #e8ddcb,0 9px 22px -15px #68513e4d }
.composer { grid-area:form; display:flex; flex-direction:column; padding:23px 24px 24px }
.panel-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:19px }
.heading { display:flex; align-items:center; gap:10px; min-width:0 }
.heading>.icon { width:23px; height:23px; color:var(--red); stroke-width:1.5 }
h2 { font:500 26px/1.16 var(--display); letter-spacing:-1.05px }
form { display:flex; flex:1; flex-direction:column; gap:17px }
.addresses { display:grid; grid-template-columns:1fr 1fr; gap:12px }
.field { display:flex; flex-direction:column; gap:7px; min-width:0 }
.label,.style-picker legend,.counter {
font:700 10.5px/1.25 var(--mono); text-transform:uppercase; letter-spacing:.115em; color:#66584e;
}
.field-row { display:flex; align-items:center; justify-content:space-between; gap:8px }
.counter { font-size:10px; font-weight:400; color:var(--muted); letter-spacing:.015em }
input[type="text"],textarea {
width:100%; border:1px solid #d3c6b4; border-radius:5px; background:#fffdf7; color:var(--ink);
transition:border-color .2s,box-shadow .2s;
}
input[type="text"] { height:43px; padding:0 12px; font-size:15px }
input::placeholder,textarea::placeholder { color:#877b6e; opacity:1 }
input[type="text"]:focus,textarea:focus { outline:none; border-color:#ab7060; box-shadow:0 0 0 3px #b66a5021 }
.message-field { flex:1 }
textarea {
min-height:87px; height:89px; flex:1; resize:vertical; padding:8px 13px 9px; font:italic 17px/26px Georgia,serif;
background-color:#fffaf0;
background-image:repeating-linear-gradient(transparent 0 25px,#d9cbbb85 25px 26px);
background-size:calc(100% - 26px) 26px; background-repeat:repeat-y; background-position:13px 4px;
}
.error { color:#953b34; font-size:13px }
.style-picker { min-width:0; margin:0; padding:0; border:0 }
.style-picker legend { margin:0 0 8px; padding:0 }
.paper-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px }
.paper-option { position:relative; display:block; cursor:pointer; touch-action:manipulation; -webkit-tap-highlight-color:transparent }
.paper-option input { position:absolute; opacity:0; width:1px; height:1px; inset:auto 50% 8px }
.choice {
min-height:66px; padding:6px 3px 5px; border:1px solid var(--line); border-radius:6px;
background:#fffcf5; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:3px;
color:#66564b; font:600 12px/1.2 var(--body); transition:background .18s,border-color .18s;
}
.mini-letter { width:45px; height:28px; overflow:visible; transform:rotate(-5deg); filter:drop-shadow(0 2px 1px #62452f20) }
.paper-option:nth-child(2) .mini-letter { transform:rotate(3deg) }
.paper-option:nth-child(3) .mini-letter { transform:rotate(-3deg) }
.paper-option input:checked+.choice { border-color:#ad5145; box-shadow:inset 0 0 0 .5px #ad5145; background:#faeee1; color:#833d34 }
.paper-option input:checked+.choice::after {
content:""; position:absolute; top:5px; right:5px; width:12px; height:12px; border-radius:50%; background:#a0473b;
background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m3 6 2 2 4-4' fill='none' stroke='%23fff3d9' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.paper-option input:focus-visible+.choice { outline:3px solid #ac7539; outline-offset:3px }
.send {
width:100%; min-height:47px; display:flex; align-items:center; justify-content:center; gap:10px; padding:9px 12px;
background:var(--red); border:1px solid #8e3831; border-radius:6px; color:#fff6e6; font:650 15px/1.25 var(--body);
box-shadow:inset 0 1px 0 #ffffff29,0 2px 1px #76372d20; transition:background .18s,transform .18s;
}
.send .icon { width:21px; height:21px; stroke-width:1.6 }
.send:disabled { background:#aa7569; border-color:#96695e }
.send:active:not(:disabled),.quiet-button:active:not(:disabled),.sound:active { transform:translateY(1px) }
.window { grid-area:window; display:flex; flex-direction:column; padding:22px 18px 13px; min-width:0 }
.window .panel-head { margin:0 3px 17px }
.status { display:inline-flex; align-items:center; gap:7px; color:#665e47; font:650 10px/1.3 var(--mono); letter-spacing:.075em; text-transform:uppercase; white-space:nowrap }
.status i { width:7px;height:7px; border-radius:50%; background:#75805e; box-shadow:0 0 0 3px #89956a1c }
.window[data-state="travel"] .status i { background:#a87837; box-shadow:0 0 0 3px #c39b5426 }
.window[data-state="arrived"] .status i { background:#aa4e40; box-shadow:0 0 0 3px #b85d4b1c }
.postcard-edge {
flex:1; display:flex; min-height:0; padding:5px; border-radius:5px; border:1px solid #c3b39d;
background:repeating-linear-gradient(128deg,#ab6157 0 10px,#f3e5cc 10px 24px,#7c8b95 24px 34px,#f3e5cc 34px 48px);
box-shadow:0 2px 3px #59462e1a;
}
.postcard-mat { display:flex; flex:1; min-width:0; padding:5px; background:#f7eedc }
.stage { position:relative; width:100%; min-height:255px; aspect-ratio:720/390; overflow:hidden; isolation:isolate; background:#344259 }
.stage>.world { position:absolute; inset:0; width:100%; height:100%; display:block }
.stage::after { content:""; position:absolute; inset:0; pointer-events:none; box-shadow:inset 0 0 0 1px #2e282b42,inset 0 0 22px #24253618 }
.stage-hit { position:absolute; z-index:2; inset:0; width:100%; height:100%; padding:0; background:transparent; border:0; border-radius:0 }
.stage-hit:focus-visible { outline:3px dashed #ffe6a0; outline-offset:-6px }
.window-foot { min-height:49px; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 2px 0 }
.hint { display:flex; align-items:center; gap:9px; min-width:0; color:#6e6054; font-size:13px }
.hint .icon { width:18px; height:18px; color:#987455; stroke-width:1.55 }
.replay { min-height:40px; display:inline-flex; justify-content:center; align-items:center; gap:6px; background:none; border:0; padding:6px 3px 6px 8px; font:600 13px/1.2 var(--body); color:var(--red) }
.replay .icon { width:15px; height:15px }
.replay:disabled { color:#8e8173; opacity:.78 }
.end-rule { display:flex; align-items:center; justify-content:center; gap:13px; margin:32px auto 24px; color:#ae8d63 }
.end-rule::before,.end-rule::after { content:""; width:62px; height:1px; background:linear-gradient(90deg,transparent,#c5b396) }
.end-rule::after { transform:rotate(180deg) }
.end-rule svg { width:18px; height:15px; fill:currentColor }
.sr { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0 }
.twinkle { animation:twinkle 4.6s ease-in-out infinite alternate }
@keyframes twinkle { from {opacity:.37} to {opacity:1} }
.idle .cat-bob { animation:breathe 3.3s ease-in-out infinite }
@keyframes breathe { 50% { transform:translateY(-1.8px) } }
.tail { transform-box:fill-box; transform-origin:91% 79%; animation:tail 3.4s ease-in-out infinite }
@keyframes tail { 50% { transform:rotate(-5deg) } }
.eyes { transform-box:fill-box; transform-origin:center; animation:blink 6.2s linear infinite }
@keyframes blink { 0%,44%,47%,100% {transform:scaleY(1)} 45.5% {transform:scaleY(.09)} }
.walking .leg-a,.walking .leg-b { transform-box:fill-box; transform-origin:50% 10%; animation:stride .46s ease-in-out infinite alternate }
.walking .leg-b { animation-direction:alternate-reverse }
@keyframes stride { from {transform:rotate(-12deg)} to {transform:rotate(13deg)} }
#courier,#letter-drop { will-change:transform }
#letter-drop { pointer-events:none }
#flap,.peek { transform-box:fill-box; transform-origin:50% 0 }
.unsealing #flap { animation:lift-flap .56s ease forwards }
.unsealing .peek { animation:lift-note .58s .12s ease both }
.unsealing #open-tag,.unsealing .rays { opacity:0 }
@keyframes lift-flap { to { transform:scaleY(-.79) } }
@keyframes lift-note { from { transform:translateY(0) } to { transform:translateY(-27px) } }
.arrived .rays { animation:ray-light 1.6s ease-in-out infinite alternate }
@keyframes ray-light { from {opacity:.58} to {opacity:1} }
.reader { max-width:750px; padding-top:22px; padding-bottom:16px }
.reader-tools { display:flex; justify-content:space-between; align-items:center; gap:8px; margin:0 0 15px }
.reader-tools .quiet-button { min-height:44px; font-size:13px }
.reader-tools .quiet-button:first-child { border-color:transparent; background:transparent; padding-left:0 }
.reading-card {
position:relative; isolation:isolate; padding:13px; background:var(--sheet); color:var(--sheet-ink);
border:1px solid #c6b79f; border-radius:5px; box-shadow:0 3px 0 -1px #deceb9,0 6px 0 -3px #ede0c9,0 15px 42px -20px #69523d80;
}
.reading-card::after { content:""; position:absolute; pointer-events:none; inset:7px; border:1px solid var(--rule); opacity:.7; border-radius:2px }
.popup { position:relative; overflow:hidden; aspect-ratio:720/262; background:linear-gradient(0deg,#70564118,transparent 15%),var(--sheet); perspective:800px }
.popup>svg { width:100%; height:100%; display:block; overflow:visible }
.note { position:relative; padding:21px clamp(22px,6vw,65px) 24px; border-top:1px solid var(--rule); background:linear-gradient(180deg,#72593f11,transparent 16px) }
.note-to { color:var(--sheet-ink); font:italic 500 clamp(25px,3.4vw,36px)/1.25 var(--display); letter-spacing:-.03em; overflow-wrap:anywhere }
.note-body { position:relative; margin:9px 0 14px; min-height:59px; font:21px/1.5 var(--hand); color:var(--sheet-ink) }
.handwriting { width:100%; height:auto; display:block; overflow:visible }
.written-access { margin:0; white-space:pre-wrap; overflow-wrap:anywhere }
.written-access.visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0) }
.note-from { display:flex; align-items:center; justify-content:flex-end; gap:9px; font:italic 23px/1.3 var(--display); color:var(--sheet-ink); overflow-wrap:anywhere }
.note-from svg { width:18px; height:16px; fill:var(--print); flex:none }
.corner-print { position:absolute; width:42px; height:42px; color:var(--print); pointer-events:none; opacity:.83; bottom:10px; left:6px }
.motif { display:none }
[data-paper="blush"] .motif-rose,[data-paper="botanical"] .motif-leaf,[data-paper="moonbeam"] .motif-star { display:inline }
.reading .reading-card { animation:lay-out .62s cubic-bezier(.18,.68,.25,1) both }
@keyframes lay-out { from { opacity:0; transform:translateY(17px) scale(.96) } to { opacity:1; transform:none } }
.reading .fold-layer { transform-box:fill-box; transform-origin:center bottom; animation:stand-up .96s cubic-bezier(.2,.72,.27,1) both }
.reading .fold-hills { animation-delay:.13s }
.reading .fold-cats { animation-delay:.34s }
.reading .fold-flowers { animation-delay:.46s }
.reading .fold-hearts { animation:float-up .92s .68s ease-out both }
@keyframes stand-up { from {transform:perspective(550px) rotateX(-84deg) scaleY(.32); opacity:.1} 73% {transform:perspective(550px) rotateX(5deg) scaleY(1); opacity:1} to {transform:none;opacity:1} }
@keyframes float-up { from { transform:translateY(34px) scaleY(.6); opacity:0 } to { transform:none; opacity:1 } }
.ink-stroke { stroke-dasharray:1; stroke-dashoffset:1; animation:pen-stroke .19s ease-out forwards }
@keyframes pen-stroke { to { stroke-dashoffset:0 } }
@media(hover:hover) {
.sound:hover,.quiet-button:hover { background:#f1e7d7; border-color:#ad937a }
.send:hover:not(:disabled) { background:#8e342f }
.replay:hover:not(:disabled) { text-decoration:underline; text-underline-offset:3px }
.paper-option:hover .choice { border-color:#b8987e }
}
@media(min-width:1450px) { .intro { padding-block:40px 33px } .mast-inner { height:80px } }
@media(max-width:1100px) and (min-width:851px) {
.wrap { width:calc(100% - 56px) }
.desk-grid { grid-template-columns:minmax(320px,.83fr) minmax(0,1.17fr); gap:17px }
.composer { padding:20px 18px }
.window { padding:20px 13px 10px }
.window .panel-head { margin-inline:2px }
h2 { font-size:24px }
.hint { font-size:12px; gap:6px }
.intro { padding-block:24px }
}
@media(max-width:850px) {
.wrap { width:calc(100% - 44px); max-width:640px }
.mast-inner { height:61px }
.brand { font-size:29px; gap:10px }
.brand svg { width:36px; height:40px }
.intro { padding:25px 0 22px }
h1 { font-size:clamp(46px,8.8vw,61px) }
.intro p { max-width:410px; font-size:14px }
.cancellation { width:113px; height:62px; margin-right:1px }
.desk-grid { grid-template-columns:minmax(0,1fr); grid-template-areas:"window" "form"; gap:18px }
.window { padding:15px 14px 9px }
.window .panel-head { margin:0 1px 12px }
.stage { min-height:0; aspect-ratio:720/376; flex:auto }
.window-foot { padding-top:5px; min-height:42px }
.composer { padding:19px 20px 21px }
.panel-head { margin-bottom:16px }
.reader { max-width:700px }
.end-rule { margin-block:25px }
}
@media(max-width:520px) {
.wrap { width:calc(100% - 28px) }
.air-stripe { height:4px }
.brand { font-size:27px }
.brand svg { width:33px; height:37px }
.sound { min-height:44px; padding:6px 12px; border:0; background:transparent }
.intro { position:relative; display:block; padding:21px 1px 18px }
h1 { font-size:clamp(43px,10.9vw,57px) }
.intro p { margin-top:7px; max-width:360px; line-height:1.4; padding-right:0 }
.cancellation { width:76px; height:38px; position:absolute; right:0; top:24px; transform:rotate(-10deg); opacity:.65 }
h2 { font-size:23px }
.heading { gap:8px }
.heading>.icon { width:20px; height:20px }
.window { padding:13px 10px 4px }
.window .panel-head { margin:0 2px 11px }
.status { font-size:9px; gap:6px }
.postcard-edge { padding:3px }
.postcard-mat { padding:3px }
.stage { aspect-ratio:720/405 }
.window-foot { gap:6px; padding:1px 1px 0 }
.hint { font-size:12px; gap:6px }
.replay { min-height:44px; font-size:12px; padding-right:2px }
.composer { padding:17px 16px 18px }
.addresses { gap:9px }
input[type="text"] { height:44px; font-size:16px }
form { gap:15px }
textarea { height:94px; font-size:17px }
.reader { padding-top:10px }
.reader-tools { margin-bottom:8px }
.reader-tools .quiet-button { padding-inline:11px; font-size:12px }
.reading-card { padding:8px }
.reading-card::after { inset:4px }
.popup { aspect-ratio:720/320 }
.note { padding:16px 13px 24px }
.corner-print { width:33px; height:33px; left:0; bottom:0 }
}
@media(max-width:365px) {
.cancellation { width:57px; opacity:.5 }
.hint { font-size:11px }
.window .heading { gap:4px }
.reader-tools { gap:2px }
}
@media(prefers-reduced-motion:reduce) {
*,*::before,*::after { animation-duration:.001ms !important; animation-iteration-count:1 !important; animation-delay:0s !important; transition-duration:.001ms !important; scroll-behavior:auto !important }
}
</style>
</head>
<body>
<svg class="defs" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">
<defs>
<symbol id="i-pen" viewBox="0 0 24 24"><path d="m4 20 1.5-6.2L16.9 2.5q1-1 2.1.1l2.4 2.5q1 1-.1 2L10 18.6 4 20Z"/><path d="m5.5 13.8 4.5 4.8M14.8 4.8l4.5 4.5M4 20l2.5-.7M12.5 21h8"/></symbol>
<symbol id="i-window" viewBox="0 0 24 24"><rect x="2.3" y="4.1" width="19.4" height="15.8" rx="2"/><path d="m3 17 5.4-5.6 4.1 3.5 2.9-2.4 5.7 4.4M15.8 6.9c-2.1 2.5.4 4.4 2.2 3.4-2.5 3.5-6-.1-2.2-3.4Z"/></symbol>
<symbol id="i-send" viewBox="0 0 24 24"><path d="m2.5 10.4 19-7.3-5.8 18-4.7-6.3-3.5 2.7.2-5.4-5.2-1.7Z"/><path d="M7.7 12.1 21 3.6 11 14.8"/></symbol>
<symbol id="i-replay" viewBox="0 0 24 24"><path d="M4.4 9A8 8 0 1 1 4 15M4.1 3.8v5.6h5.6"/></symbol>
<symbol id="i-back" viewBox="0 0 24 24"><path d="m10.2 5-7 7 7 7M4 12h16"/></symbol>
<symbol id="i-route" viewBox="0 0 24 24"><path d="M2 8h5M1 12h4m1 4h2"/><rect x="8.5" y="5.5" width="13.7" height="13" rx="1.8"/><path d="m9.1 6.7 6.2 5.7 6.2-5.7"/></symbol>
<g id="heart-shape"><path d="M0 7.2C-1 5.7-8.2 1.8-8.2-3c0-4.6 5.5-6.1 8.2-2.1 3.4-4.2 8.4-2.2 8.2 2.1C8.1 1.2 1.4 6 0 7.2Z"/></g>
<g id="paw-shape"><path d="M-6.8 3.7c1.2-1.9 2.4-5.4 5.4-5.6 3.4-.5 4.6 2.9 6.9 4.7C9 6 6.9 10 3.3 9.1.9 8.5-.2 7.8-2.4 8.9c-4.3 1.8-6.7-1.7-4.4-5.2Z"/><ellipse cx="-9" cy="-2.7" rx="2.8" ry="4.1" transform="rotate(-27 -9 -2.7)"/><ellipse cx="-3.8" cy="-8.2" rx="2.7" ry="4.1" transform="rotate(-10 -3.8 -8.2)"/><ellipse cx="3.4" cy="-8.2" rx="2.7" ry="4" transform="rotate(13 3.4 -8.2)"/><ellipse cx="8.9" cy="-2.8" rx="2.7" ry="4" transform="rotate(26 8.9 -2.8)"/></g>
<g id="spark"><path d="M0-5.4 1.15-1.35 5.1 0 1.15 1.22 0 5.4-1.1 1.22-5.1 0-1.1-1.35Z"/></g>
<g id="moon-shape">
<path d="M13-30C-5-38-29-25-32-6c-5 22 11 41 32 42 15 1 28-8 34-21C20 22 4 18-3 7-13-7-7-22 13-30Z" fill="#f7d893" stroke="#f8e6b3" stroke-width="1.5"/>
<path d="M-25-8c-4 12 1 26 11 32m-6-24-1 5m8 23 4 2" fill="none" stroke="#d4ab70" opacity=".65" stroke-linecap="round"/>
<circle cx="-18" cy="14" r="2.2" fill="#d6b173" opacity=".55"/><circle cx="-23" cy="8" r="1" fill="#dfb77c"/>
</g>
<symbol id="mini-env" viewBox="0 0 60 36">
<rect x="2" y="2" width="56" height="32" rx="1.4" fill="var(--env)" stroke="var(--env-line)" stroke-width="1.3"/>
<path d="m3 33 20-17h13l21 17" fill="var(--env-shadow)" stroke="var(--env-line)" stroke-width="1"/>
<path d="M2.5 3 27 21q3 2.3 6 0L57.5 3Z" fill="var(--flap)" stroke="var(--env-line)" stroke-width="1.1" stroke-linejoin="round"/>
<path d="m7 4.5 21 15.1m5.9-.9L53.1 5" stroke="var(--env-line)" opacity=".6" stroke-width=".7" stroke-dasharray="2.2 1.7" fill="none"/>
<circle cx="30" cy="20" r="4.6" fill="var(--seal)" stroke="var(--seal-dark)" stroke-width="1"/>
<use href="#heart-shape" transform="translate(30 20) scale(.32)" fill="var(--seal-mark)"/>
</symbol>
<g id="botanical-mark" stroke="currentColor" stroke-width="1.35" stroke-linecap="round" fill="none">
<path d="M1 31C12 27 21 16 24 3m-8 17C3 21 5 14 6 11c5 1 11 4 10 9Zm3-5c2-8 8-10 12-10-1 6-7 11-12 10ZM9 26C2 28-2 23-2 19c4 0 10 1 11 7Z"/>
</g>
<g id="daisy">
<g fill="var(--petal,#f5d8a6)" stroke="var(--petal-edge,#ba8d68)" stroke-width=".55">
<ellipse cy="-4" rx="2.4" ry="4.3"/><ellipse cy="-4" rx="2.4" ry="4.3" transform="rotate(52)"/><ellipse cy="-4" rx="2.4" ry="4.3" transform="rotate(104)"/><ellipse cy="-4" rx="2.4" ry="4.3" transform="rotate(156)"/><ellipse cy="-4" rx="2.4" ry="4.3" transform="rotate(208)"/><ellipse cy="-4" rx="2.4" ry="4.3" transform="rotate(260)"/><ellipse cy="-4" rx="2.4" ry="4.3" transform="rotate(312)"/>
</g><circle r="3" fill="#bb7848"/><circle cx="-.7" cy="-.9" r="1.5" fill="#e6b45d"/>
</g>
<g id="plant-spray">
<g fill="none" stroke="var(--stem,#6f7969)" stroke-width="2.4" stroke-linecap="round"><path d="M0 2C-5-26 6-59 14-83M0-1c-1-25-19-36-29-49M0 0c9-23 26-36 33-55"/></g>
<g fill="var(--leaf,#586958)" stroke="var(--leaf-edge,#384f4b)" stroke-width=".8">
<path d="M0-17q-15-1-19-18 12 2 19 18Zm1-14q15-2 20-19-15 5-20 19ZM4-44q-13-6-13-22 13 8 13 22Zm4-17q13 0 19-17-13 3-19 17Z"/>
<path d="M-15-31q-16 4-24-5 13-6 24 5Zm-4-6q-1-13-10-19 0 14 10 19Zm37 9q11 0 18-9-12-2-18 9Zm9-15q-7-8-5-17 8 7 5 17Z"/>
</g>
<use href="#daisy" transform="translate(14 -84) rotate(12)"/><use href="#daisy" transform="translate(-29 -50) scale(.72)"/><use href="#daisy" transform="translate(34 -56) scale(.78)"/>
</g>
<mask id="brand-cut"><rect x="2" y="2" width="40" height="43" rx="1.8" fill="white"/><rect x="1.8" y="1.8" width="40.4" height="43.4" rx="2" fill="none" stroke="black" stroke-width="3.8" stroke-linecap="round" stroke-dasharray=".2 6.1"/></mask>
</defs>
</svg>
<div class="air-stripe" aria-hidden="true"></div>
<header class="mast">
<div class="wrap mast-inner">
<div class="brand" aria-label="Purr Post">
<svg viewBox="0 0 44 47" aria-hidden="true"><g mask="url(#brand-cut)">
<rect width="44" height="47" fill="#a44339"/><rect x="6" y="6" width="32" height="35" rx="1" fill="none" stroke="#e8bc91" stroke-width="1"/>
<path d="m11 27 1-13 8 6q3-1.5 7 0l7-6-1 14c-1 7-7 10-13 9-6-1-9-5-9-10Z" fill="#f8e7c8"/><path d="m14 18 .4 5 3-2m13.5-2.5-3.4 3.2 3.2 1.1" fill="#d0806a"/>
<path d="m14.8 27.5 2.7-.9 1.8.7m6-.1 2-.9 2.2.8m-9 2.8 2.9.2-1.5 1.6Z" fill="none" stroke="#914437" stroke-width="1.3" stroke-linecap="round"/>
<g stroke="#98483e" stroke-width=".8"><path d="m15 29-6-1m6 3-5 1m19-3 6-1m-6 3 5 1"/></g>
</g></svg>
<span>Purr <i>Post</i></span>
</div>
<button type="button" id="sound" class="sound" aria-pressed="true" aria-label="Sound on">
<svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 9h4l5-4v14l-5-4H3Z"/><g class="sound-waves"><path d="M15.5 8.2a5.1 5.1 0 0 1 0 7.6m2.9-10.3a8.6 8.6 0 0 1 0 13"/></g><path class="sound-cross" d="m16 9 5.1 6m-.1-6L16 15"/></svg>
<span id="sound-label">Sound on</span>
</button>
</div>
</header>
<main>
<section id="desk" class="wrap" aria-labelledby="desk-title">
<div class="intro">
<div><h1 id="desk-title">Love, <em>by post.</em></h1><p>Write a little love note. Your cat courier will take it from here.</p></div>
<svg class="cancellation" viewBox="0 0 184 87" aria-hidden="true">
<g fill="none" stroke="currentColor" stroke-width="1.45" stroke-linecap="round">
<path d="M4 26c16-12 26 10 45 0s25 6 42 0m-87 9c16-12 26 10 45 0s25 6 42 0m-87 9c16-12 26 10 45 0s25 6 42 0m-87 9c16-12 26 10 45 0s25 6 42 0"/>
</g>
<g transform="translate(129 44)" fill="currentColor">
<circle r="37.6" fill="none" stroke="currentColor" stroke-width="2"/><circle r="34.4" fill="none" stroke="currentColor" stroke-width=".8"/><circle r="17" fill="none" stroke="currentColor" stroke-width=".85" stroke-dasharray="1.4 2"/>
<defs><path id="stamp-top" d="M-27 0a27 27 0 0 1 54 0"/><path id="stamp-bottom" d="M-26 4a26 26 0 0 0 52 0"/></defs>
<g font-family="Georgia,serif" font-weight="700" text-anchor="middle"><text font-size="8.5" letter-spacing="2"><textPath href="#stamp-top" startOffset="50%">PURR POST</textPath></text><text font-size="8.2" letter-spacing="1.8"><textPath href="#stamp-bottom" startOffset="50%">NIGHT MAIL</textPath></text></g>
<use href="#paw-shape" transform="translate(0 2) rotate(-7) scale(.85)"/><use href="#spark" transform="translate(-26 1) scale(.45)"/><use href="#spark" transform="translate(26 1) scale(.45)"/>
</g>
</svg>
</div>
<div class="desk-grid">
<section class="panel composer" aria-labelledby="compose-title">
<div class="panel-head"><div class="heading"><svg class="icon" aria-hidden="true"><use href="#i-pen"/></svg><h2 id="compose-title">Your letter</h2></div></div>
<form id="letter-form" novalidate>
<div class="addresses">
<label class="field"><span class="label">From</span><input type="text" id="sender" maxlength="40" placeholder="Your name" autocomplete="off" dir="auto"></label>
<label class="field"><span class="label">To</span><input type="text" id="recipient" maxlength="40" placeholder="Their name" autocomplete="off" dir="auto"></label>
</div>
<div class="field message-field">
<div class="field-row"><label class="label" for="message">Your message</label><span class="counter" id="counter" aria-hidden="true"></span></div>
<textarea id="message" maxlength="320" dir="auto" placeholder="Write something from the heart…" aria-describedby="message-error">If I had nine lives, I’d spend every one with you.</textarea>
<p id="message-error" class="error" role="status" hidden>Add a little message for your letter.</p>
</div>
<fieldset class="style-picker">
<legend>Paper style</legend>
<div class="paper-options">
<label class="paper-option" data-paper="blush"><input type="radio" name="paper" value="blush" checked><span class="choice"><svg class="mini-letter" aria-hidden="true"><use href="#mini-env"/></svg>Blush</span></label>
<label class="paper-option" data-paper="botanical"><input type="radio" name="paper" value="botanical"><span class="choice"><svg class="mini-letter" aria-hidden="true"><use href="#mini-env"/></svg>Botanical</span></label>
<label class="paper-option" data-paper="moonbeam"><input type="radio" name="paper" value="moonbeam"><span class="choice"><svg class="mini-letter" aria-hidden="true"><use href="#mini-env"/></svg>Moonbeam</span></label>
</div>
</fieldset>
<button class="send" id="send" type="submit"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg><span id="send-text">Send letter</span></button>
</form>
</section>
<section class="panel window" id="delivery-window" data-state="idle" aria-labelledby="window-title">
<div class="panel-head">
<div class="heading"><svg class="icon" aria-hidden="true"><use href="#i-window"/></svg><h2 id="window-title">Delivery window</h2></div>
<span class="status"><i aria-hidden="true"></i><span id="status">Ready</span></span>
</div>
<div class="postcard-edge"><div class="postcard-mat">
<div class="stage idle" id="stage" data-paper="blush">
<svg class="world" viewBox="0 0 720 390" preserveAspectRatio="xMidYMid slice" role="img" aria-labelledby="street-title">
<title id="street-title">A tabby postcat in a blue cap, carrying a sealed envelope along a moonlit cobblestone street.</title>
<defs>
<linearGradient id="evening" x2="0" y2="1" gradientUnits="objectBoundingBox">
<stop stop-color="#24354d"/><stop offset=".34" stop-color="#485872"/><stop offset=".62" stop-color="#a38a91"/><stop offset=".82" stop-color="#e9af95"/><stop offset="1" stop-color="#f2cda2"/>
</linearGradient>
<linearGradient id="paving" x2=".16" y2="1"><stop stop-color="#c79883"/><stop offset=".55" stop-color="#d5aa8a"/><stop offset="1" stop-color="#b58976"/></linearGradient>
<linearGradient id="pillar" x1="0" x2="1" y2=".16"><stop stop-color="#883e40"/><stop offset=".27" stop-color="#bc584c"/><stop offset=".53" stop-color="#c86753"/><stop offset=".77" stop-color="#a64b45"/><stop offset="1" stop-color="#793d3f"/></linearGradient>
<linearGradient id="lamp-glass" x2=".3" y2="1"><stop stop-color="#ffecba"/><stop offset=".5" stop-color="#f4c77e"/><stop offset="1" stop-color="#db975c"/></linearGradient>
<radialGradient id="lamp-halo"><stop stop-color="#ffe4a0" stop-opacity=".49"/><stop offset=".38" stop-color="#f4ca8a" stop-opacity=".20"/><stop offset="1" stop-color="#f4c785" stop-opacity="0"/></radialGradient>
<radialGradient id="moon-halo"><stop stop-color="#ffdb91" stop-opacity=".2"/><stop offset=".57" stop-color="#fae7bc" stop-opacity=".07"/><stop offset="1" stop-color="#ffe6b8" stop-opacity="0"/></radialGradient>
<pattern id="roof-tiles" width="9" height="5" patternUnits="userSpaceOnUse"><path d="m0 5 3-3 5 0m0-2 1-1" fill="none" stroke="#c0a49a" stroke-width=".85" opacity=".52"/></pattern>
<pattern id="stonework" x="0" y="1" width="66" height="17" patternUnits="userSpaceOnUse"><path d="M0 .5h66M0 9h66m-50-8.5V9m34 0v8m-46-8v8" fill="none" stroke="#8d726e" stroke-width="1"/></pattern>
<pattern id="stipple" width="7" height="7" patternUnits="userSpaceOnUse"><circle cx="2" cy="1.5" r=".65" fill="#ebceb1"/><circle cx="5.4" cy="5" r=".45" fill="#d9baa4"/></pattern>
<filter id="print-grain" x="0%" y="0%" width="100%" height="100%"><feTurbulence type="fractalNoise" baseFrequency=".64" numOctaves="3" stitchTiles="stitch"/><feColorMatrix type="saturate" values="0"/></filter>
<g id="lit-pane"><path d="M0 10V1q2.8-2.3 5.5 0v9Z" fill="#e5ba86"/><path d="M2.7.1V10M0 4.6h5.5" stroke="#73626a" stroke-width=".95"/><path d="M-.8 10.7h7" stroke="#514e5c" stroke-width="1.2"/></g>
<g id="gable-house">
<path d="M2 83V28L26 5l25 23v55Z" fill="var(--wall,#8d777c)"/><path d="m26 5 25 22V83h19V30L47 7Z" fill="var(--side,#6e6470)"/>
<path d="M12 18V2h7v13" fill="#695e6b"/><path d="M10 2h11" stroke="#b79a90" stroke-width="2.1"/>
<path d="m-3 29 27-28 26 1 25 28-26 1L25 7 2 32Z" fill="var(--roof,#505565)"/>
<path d="m24 1 26 1 25 28-26 1Z" fill="url(#roof-tiles)" opacity=".65"/><path d="m-2 29 27-26 25 26" fill="none" stroke="#c3a299" stroke-width="2.2"/>
<g><use href="#lit-pane" transform="translate(11 35)"/><use href="#lit-pane" transform="translate(33 35)"/><use href="#lit-pane" transform="translate(11 57)"/><use href="#lit-pane" transform="translate(34 57)"/><use href="#lit-pane" transform="translate(23 20) scale(.77)"/></g>
<path d="M55 41h6v9h-6zm0 18h6v9h-6zM22 83V65q4-5 8 0v18" fill="#575664"/><path d="M4 52h42m-42 23h9m25-20h4" stroke="#5e5a68" fill="none" opacity=".45"/>
</g>
<g id="mansard">
<path d="M1 80V27h65v53Z" fill="var(--wall,#857782)"/><path d="M52 28h14v52H52Z" fill="#585a6a" opacity=".4"/>
<path d="m-3 28 8-25 50-3 15 26-3 4Z" fill="var(--roof,#495468)"/><path d="m-3 28 8-25 50-3 15 26-3 3Z" fill="url(#roof-tiles)" opacity=".55"/>
<path d="M48 5v-15h6V8Z" fill="#6b616e"/><path d="M46-10h10" stroke="#b39c98" stroke-width="2"/>
<path d="M11 26V15l5-4.5 5 4.5v11m10-1V14l5-5 5 5v11" fill="#ada0a0"/><path d="m9.5 15 6.5-6 6.5 6m7.5-.8 6-6.7 6.5 6.5" fill="none" stroke="#4b5160" stroke-width="2"/>
<path d="M14 23v-6h3.5v6m16 0v-7h4v7" fill="#edc797"/>
<path d="m-2 29 70-.6" stroke="#ada0a1" stroke-width="2"/>
<g><use href="#lit-pane" transform="translate(9 39)"/><use href="#lit-pane" transform="translate(27 39)"/><use href="#lit-pane" transform="translate(44 39)"/><use href="#lit-pane" transform="translate(9 61)"/><use href="#lit-pane" transform="translate(44 61)"/></g>
<path d="M24 80V64q5-7 10 0v16m24-42h4v10h-4" fill="#585867"/><path d="M3 55h46" stroke="#b29a96" opacity=".62"/>
</g>
<g id="cypress"><path d="M0 1C-16-5-12-33-8-45q-2-18 3-31-1-16 6-28 7 16 5 32 6 17 5 29C19-15 14 0 0 1Z" fill="currentColor"/><path d="M0 5v-78m0 51 6-9m-6-6-5-7m5-8 4-7" fill="none" stroke="#9a9490" stroke-width="1.1" opacity=".43"/></g>
<g id="shrub"><path d="M-39 0q-4-15 9-18-3-15 13-16 5-19 22-11 13-5 18 9 13 1 13 13 14 4 10 23Z" fill="currentColor"/><path d="M-17-18q4-5 8-3m-16 6q3-4 6-4M1-33q5-4 8-1m4 8q5-4 8-1m0 10 4-2" stroke="#b9a69a" stroke-width="1.2" opacity=".47" fill="none" stroke-linecap="round"/></g>
<g id="lamp">
<circle cy="-164" r="69" fill="url(#lamp-halo)"/>
<ellipse cx="4" cy="1" rx="22" ry="4" fill="#66585c" opacity=".35"/>
<g stroke="#3a3e49" stroke-linejoin="round">
<path d="m-12 0 1-7 5-3 2-20 1.8-108h4.4L5-31 7-10l5 3 1 7Z" fill="#49505a" stroke-width="1.8"/>
<path d="M-8-11H8m-13-20H5m-7.3-3h4.5" stroke="#a69b8a" stroke-width="1.5"/>
<path d="m-5-137-3-6 8-5 8 5-3 6Z" fill="#434651"/>
<path d="m-11-177 4 32q7 3 14-1l5-31Z" fill="url(#lamp-glass)" stroke-width="2"/>
<path d="m-11-177 5 2 3.8 30m14-32-5 2-4 30" fill="none" stroke-width="1.6"/>
<path d="m-17-178 3-3 4-.8q2-10 10-13 8 3 10 13l5 1 2 3q-16 6-34 0Z" fill="#434854" stroke-width="1.6"/>
<path d="M0-200v8m-3-2 3-6 3 6" stroke="#474651" stroke-width="2"/>
<path d="m-11-181 8-1.3m-10 6 7 1" stroke="#bdac92" stroke-width="1.3"/>
<path d="M-2.9-135h5.8M-2.4-66v29" stroke="#c3ac8c" stroke-width="1.05"/>
</g>
</g>
<g id="postbox">
<ellipse cx="4" cy="2" rx="46" ry="7" fill="#70544e" opacity=".36"/>
<path d="M-34-10q34-6 68 0v10q-33 9-68 0Z" fill="#51464a" stroke="#4d3e40" stroke-width="1.8"/>
<path d="M-30-116q29-7 60 0v106q-31 12-60 0Z" fill="url(#pillar)" stroke="#723e3d" stroke-width="2"/>
<path d="M-27-84v57m4-56v52m47-57v63" stroke="#e98c71" opacity=".59" stroke-width="1.6" fill="none"/>
<path d="M-29-20q29 10 58 0m-58 4q29 10 58 0" fill="none" stroke="#783d3b" stroke-width="1.7"/>
<path d="M-33-12q33 11 66 0v5q-36 10-66 0Z" fill="#824a43" stroke="#67403d" stroke-width="1.2"/>
<path d="M-36-116v-6q3-3 7-4c4-12 15-15 29-16 15 1 25 5 29 16l8 3v7q-36 12-73 0Z" fill="url(#pillar)" stroke="#703b3b" stroke-width="2"/>
<path d="M-33-123q34 9 66 .5m-64-4q30 5 60 0" fill="none" stroke="#e49876" stroke-width="2"/>
<path d="M-13-138q12-4 23-.6m-6-4H-4l1-4h5Z" fill="#92504a" stroke="#79433f" stroke-width="1.3"/>
<path d="M-22-105q22 3.4 44 0v9q-22 4-44 0Z" fill="#4d3438" stroke="#d98468" stroke-width="1.6"/>
<path d="M-24-106q24 3.6 48 0" fill="none" stroke="#693b3a" stroke-width="3"/>
<text y="-77" text-anchor="middle" font-family="Georgia,serif" font-size="12" font-weight="700" letter-spacing="1.4" fill="#f4d9a7">POST</text>
<rect x="-13.5" y="-66" width="27" height="31" rx="1.5" fill="#f1d5a3" stroke="#75433d" stroke-width="1.7"/>
<g fill="none" stroke="#a7795a" stroke-linecap="round"><rect x="-8.5" y="-61" width="17" height="10" rx=".8"/><path d="m-8-60 8 5.3 8-5.3m-16 14H8m-14 4H6"/></g>
<use href="#spark" transform="translate(0 -26) scale(.75)" fill="#e7b27d"/>
</g>
</defs>
<rect width="720" height="390" fill="url(#evening)"/>
<g id="street-stars" fill="#f3dfb5"></g>
<g transform="translate(548 73)">
<circle r="87" fill="url(#moon-halo)"/><circle r="48" fill="none" stroke="#ebd1a3" opacity=".14"/>
<path d="M-47-17a51 51 0 0 1 46-35m21 97a49 49 0 0 0 24-22" stroke="#edd2a4" opacity=".37" fill="none" stroke-linecap="round"/>
<use href="#moon-shape" transform="rotate(-12) scale(1.06)"/>
</g>
<g fill="none" stroke-linecap="round">
<path d="M292 68q24-8 48-26" stroke="#edcfa9" stroke-width="1.3" opacity=".75"/><path d="M313 57q19-8 27-15" stroke="#fff0c2" stroke-width="2"/><use href="#spark" transform="translate(340 42) scale(.78)" fill="#fff0bf"/>
</g>
<g fill="#c3a4a2" opacity=".6">
<path d="M-20 114q14-9 41-9 8-12 27-12 11-11 22-10 15-1 24 12 17-5 28 8 23-3 43 5-69-1-109 4-35 3-76 2Z"/>
<path d="M355 112q17-4 29-5 7-11 22-10 14-16 29-7 7 2 11 11 18-3 28 6l18 3q-57-1-96 3-21 1-41-1Z"/>
<path d="M582 142q15-5 28-4 12-12 29-10 13-13 27-9 9 3 14 11 18-4 31 5l26 6Z"/>
</g>
<g fill="none" stroke="#debdac" opacity=".59" stroke-linecap="round"><path d="M28 119q36-4 79-4m8-1h16M375 118l38-2m8-.5 21-.5m172 33 44-3"/><path d="M193 143q30-4 60-2m-49 4 20-.7" opacity=".6"/></g>
<path d="M-8 214q47-32 90-22 62-41 115-11 31-17 59-7 82-37 163-2 97-56 171-15 66-25 142 16v105H-8Z" fill="#7e7484"/>
<path d="M-5 230q39-32 89-22 61-22 108-10 74-31 147-6 38-14 63-8 88-35 152-11 82-36 177-5v113H-5Z" fill="#65677b"/>
<g fill="#5e6274">
<path d="M-4 227v-49l17-9 18 12v46m87-12v-55l13-8 12 8v48m55-6v-53l12-9 13 11v47m166-12v-37l10-7 11 7v39m126-11v-50l14-7 12 8v46m115-5v-49l13-7 12 9v47"/>
<path d="M200 154v-12h3v10m203-4v-10h3v9m132-15v-11h3v11"/>
</g>
<g transform="translate(132 161)">
<path d="M-11 67V-4h22v71Z" fill="#887a82"/><path d="M3-3h8v70H3Z" fill="#6b6775"/>
<path d="M-15-6q0-6 6-8l2-8q7-3 14 0l2 8q7 3 7 8Z" fill="#535a6b"/><path d="m-7-23 7-18 7 18-7 2Z" fill="#535c70"/>
<path d="M0-45v8m-3-4h6" fill="none" stroke="#5d6073" stroke-width="1.6"/>
<path d="M-6 13V4q2.5-5 5 0v9m3 0V4q2.5-5 5 0v9" fill="#e2ba94"/><path d="M-11 18h22m-22-25h23" stroke="#bc9e93" stroke-width="1.4"/>
<circle cy="30" r="7" fill="#d3b399" stroke="#5c5e6e" stroke-width="1.5"/><path d="M0 25v5l3 2" stroke="#5c5b67" fill="none"/>
</g>
<g opacity=".97">
<use href="#mansard" transform="translate(-13 184) scale(.88)"/>
<use href="#gable-house" transform="translate(40 185) scale(.79)"/>
<use href="#mansard" transform="translate(85 204) scale(.77)" style="--wall:#a78b88;--roof:#626674"/>
<use href="#gable-house" transform="translate(146 188) scale(.87)" style="--wall:#9d8487;--roof:#5c6172"/>
<use href="#mansard" transform="translate(198 208) scale(.76)"/>
<use href="#gable-house" transform="translate(245 204) scale(.75)" style="--wall:#ac8b84"/>
<use href="#mansard" transform="translate(302 187) scale(.96)" style="--wall:#97858b"/>
<use href="#gable-house" transform="translate(365 196) scale(.9)" style="--wall:#b1928b;--roof:#646676"/>
<use href="#mansard" transform="translate(426 170) scale(1.16)" style="--wall:#8e7b80"/>
<use href="#gable-house" transform="translate(498 196) scale(.87)" style="--wall:#a38380"/>
<use href="#mansard" transform="translate(541 189) scale(.96)" style="--wall:#9c8587"/>
<use href="#gable-house" transform="translate(607 169) scale(1.15)" style="--wall:#927a77;--roof:#4c5768"/>
<use href="#mansard" transform="translate(676 187)"/>
</g>
<g color="#4e5d65"><use href="#cypress" transform="translate(21 258) scale(.71)"/><use href="#cypress" transform="translate(181 263) scale(.56)"/><use href="#cypress" transform="translate(411 263) scale(.71)"/><use href="#cypress" transform="translate(423 262) scale(.52)"/><use href="#cypress" transform="translate(657 260) scale(.99)"/></g>
<g color="#536362"><use href="#shrub" transform="translate(8 265) scale(1.2)"/><use href="#shrub" transform="translate(78 269)"/><use href="#shrub" transform="translate(149 266) scale(1.06)"/><use href="#shrub" transform="translate(222 269) scale(1.17)"/><use href="#shrub" transform="translate(324 269) scale(1.28)"/><use href="#shrub" transform="translate(398 265) scale(.8)"/><use href="#shrub" transform="translate(467 264) scale(1.05)"/><use href="#shrub" transform="translate(541 263)"/><use href="#shrub" transform="translate(608 265)"/><use href="#shrub" transform="translate(691 261) scale(1.35)"/></g>
<path d="M-2 257q174 8 355 1t369-14v61H-2Z" fill="#ab8e83"/>
<path d="M-2 258q174 8 355 1t369-14v61H-2Z" fill="url(#stonework)" opacity=".59"/>
<path d="M-3 251q174 8 358 1t368-14v8q-181 6-366 14t-360-2Z" fill="#d6b59b" stroke="#786b6c" stroke-width="1.3"/>
<path d="M-2 253q193 8 361 0t364-13" fill="none" stroke="#edcbb0" stroke-width="1.6"/>
<path d="M-4 293q199 8 372-1t356-20v119H-4Z" fill="url(#paving)"/>
<path d="M-3 293q174 9 364-1t364-21" fill="none" stroke="#88736e" stroke-width="2"/>
<g id="paving-marks" stroke="#927569" fill="none" stroke-linecap="round" stroke-linejoin="round"></g>
<g transform="translate(81 316) scale(.92)"><use href="#lamp"/></g>
<g transform="translate(591 325) scale(.99)"><use href="#postbox"/></g>
<g fill="none" stroke="#e3bda1" stroke-linecap="round" opacity=".8"><path d="m115 327 13 .3m357-14 22-1m-372 48 20 .6m251 6 15-.3"/></g>
<g id="cat-shadow" transform="translate(279 335)"><ellipse cy="1" rx="60" ry="7.4" fill="#775d58" opacity=".35"/><ellipse cy=".5" rx="38" ry="4.8" fill="#79605a" opacity=".25"/></g>
<g id="courier" transform="translate(279 335)">
<g class="cat-bob"><g id="cat-art" stroke-linejoin="round" stroke-linecap="round">
<g class="tail">
<path d="M-20-67c-12 10-39 18-55 9-18-10-23-32-19-48 2-9 9-13 14-9 4 3 1 9 1 17 0 13 7 24 19 25 12 2 24-5 35-13Z" fill="#d09b64" stroke="#624e46" stroke-width="2.5"/>
<path d="M-90-112q3-6 9-2 3 3 1 10-6-3-13-1Z" fill="#f2d7ac"/><path d="m-92-96 12-1m-11 9 12-3m-7 14 9-5m8 18 3-8" fill="none" stroke="#9b6c4e" stroke-width="4"/>
<path d="M-73-66q13 11 34 0" fill="none" stroke="#e0b282" stroke-width="2"/>
</g>
<g class="leg-a">
<path d="M-18-45c-4 11-6 24-9 31-7 0-13 5-12 10 1 5 19 6 26 2 6-8 11-24 15-38Z" fill="#ce9c72" stroke="#644e45" stroke-width="2.3"/>
<path d="M-27-14q7 3 16 2l-3 10q-12 6-23 1c-6-4 0-11 10-13Z" fill="#f1d7b3"/><path d="M-30-1q-1-4 2-7m5 8q-1-4 2-6" fill="none" stroke="#9e7c61" stroke-width="1.3"/>
</g>
<g class="leg-b">
<path d="M2-44c0 13 6 24 12 36 5 7 26 9 30 3 3-5-5-10-13-11-5-11-8-22-8-33Z" fill="#e1b482" stroke="#654f45" stroke-width="2.3"/>
<path d="m13-13 14-6 4 3c7 1 17 6 13 11-4 6-22 4-28-1Z" fill="#f4dfbd"/><path d="M34-2q1-4-3-8m10 7q0-4-4-7" fill="none" stroke="#a78269" stroke-width="1.3"/>
<path d="m7-28 15-4m-12 9 13-3" fill="none" stroke="#b58058" stroke-width="2.6"/>
</g>
<path d="M-22-101c-16 9-20 35-18 59 13 9 40 13 66 3 4-21 1-46-16-62Z" fill="#688196" stroke="#3f4c59" stroke-width="2.6"/>
<path d="M-24-96q-17 22-14 51l12 5 2-55Zm33 0c8 18 14 39 9 59l10-2q5-36-12-55Z" fill="#4e687e"/><path d="M-34-46q27 12 59 2" fill="none" stroke="#b7bdaf" stroke-width="1.5"/>
<path d="M-10-96-1-83l13-15 7 13L5-71l-7-11-7 6-11-15Z" fill="#8ba0a9" stroke="#485d70" stroke-width="1.4"/>
<path d="m0-81 3 40" stroke="#c0c2af" stroke-width="1.5"/><g fill="#e6bf79" stroke="#5a5960" stroke-width=".85"><circle cx="5" cy="-67" r="2.25"/><circle cx="6.3" cy="-51" r="2.25"/></g>
<path d="M16-101C7-87-8-65-31-47l-6-6C-14-73 .5-91 8-104Z" fill="#a8744e" stroke="#604e44" stroke-width="1.8"/>
<path d="M11-99C1-84-14-65-32-51" fill="none" stroke="#edd0a0" stroke-width="1.2" stroke-dasharray="2.8 3.2"/>
<g transform="rotate(9 -34 -50)">
<path d="m-55-56 37-2 1 26q-17 8-36 2Z" fill="#a9714d" stroke="#624a3f" stroke-width="2"/>
<path d="m-56-58 38-2 1 13q-20 8-39 0Z" fill="#bb8656" stroke="#694e40" stroke-width="1.7"/>
<path d="M-52-46q15 5 32-.2m-32 12q15 5 30-.5" fill="none" stroke="#e6be85" stroke-width="1.1" stroke-dasharray="2.4 2.4"/>
<rect x="-39" y="-51" width="7" height="11" rx="2" fill="#d1a867" stroke="#654d3d" stroke-width="1.4"/><path d="M-37-46h3" stroke="#71543c"/>
</g>
<path d="M-23-102q18 8 41-1l1 8q-17 10-41 1Z" fill="#ad584b" stroke="#6c4b44" stroke-width="1.4"/>
<path d="m-18-98-14 5 6 4-5 8q11-2 21-14" fill="#bd6756" stroke="#784e46" stroke-width="1.4"/>
<path d="M-34-128c-3-14-7-28-5-43 0-3 2-5 5-2l19 18q14-4 28-1l21-18c3-2 4 1 4 3l-1 30q8 12 8 23l6 1-6 5 3 3-9 3c-8 11-23 16-40 15-17-1-28-5-36-15l-7-2 5-4-7-5 7-2Z" fill="#ddb07b" stroke="#604e46" stroke-width="2.6"/>
<path d="m-35-166 16 15-13 11Z" fill="#c98774"/><path d="m34-167-13 15 13 10Z" fill="#c88875"/>
<path d="M5-152q13 3 13 17c-1 8 3 13 12 16l13-4q2 5 0 9l4 1-5 4q-8 15-32 16-28 2-43-15l-7-3 8-2q11 3 17-3c8-7 7-15 8-22 0-7 5-13 12-14Z" fill="#f5dfb9"/>
<g fill="#b07c54"><path d="m-21-148 7 14-1-15m7-.6 4 11 2-12m-37 24 15 3-14-8m2 17 12-2-11-3m64-10-10 5 12-1"/></g>
<g class="eyes" fill="#473f3c"><ellipse cx="-9.5" cy="-125.5" rx="3.45" ry="5.25"/><ellipse cx="26.5" cy="-127.2" rx="3.25" ry="5"/></g>
<g fill="#fff1da"><circle cx="-8.7" cy="-127.4" r="1.05"/><circle cx="27.3" cy="-129" r="1"/></g>
<g fill="none" stroke="#805f4c" stroke-width="1.5"><path d="M-15-134q5-3 8-1m29.5-.8q4-3 7.5.2"/></g>
<ellipse cx="-17" cy="-116" rx="7" ry="3.7" fill="#dd9d85" opacity=".72"/><ellipse cx="35" cy="-118" rx="5" ry="3" fill="#dd9d85" opacity=".68"/>
<path d="M7-120q4.8-2.5 10-.5-1.2 5-5 5.8Z" fill="#955c52" stroke="#735148" stroke-width=".9"/>
<path d="m12-114.8.2 3.7m.1-.4q-4.9 5.7-9 .5m9.2-.7q4.6 4.4 8.4-.5" fill="none" stroke="#684c43" stroke-width="1.55"/>
<g fill="#a18066"><circle cx="-5" cy="-116.5" r=".85"/><circle cx="-.5" cy="-114.4" r=".9"/><circle cx="-.9" cy="-119" r=".65"/><circle cx="26.5" cy="-115" r=".8"/><circle cx="30" cy="-112.8" r=".9"/></g>
<g fill="none" stroke="#674f45" stroke-width="1.3"><path d="M-18-116q-17-6-36-4m34 7q-17-1-31 5m80-9q15-5 31-5m-30 8q13-1 26 3"/></g>
<g transform="rotate(-9 -5 -154)">
<path d="M-35-158c-9-6-7-16 1-22 10-9 23-12 37-9 14 1 26 9 28 21l-1 9Z" fill="#577a96" stroke="#394a5c" stroke-width="2.4"/>
<path d="M-32-177q18-16 39-10m-18 2q-7 5-11 17" fill="none" stroke="#98adba" stroke-width="1.7"/>
<path d="M9-187q12 6 13 19m-47-10-4 5" fill="none" stroke="#405d76" stroke-width="1.2"/>
<path d="M-36-164q31-6 66-1l-1 9q-33-3-60 4Z" fill="#354e66" stroke="#344453" stroke-width="1.7"/>
<path d="M-31-157q29-6 58-3" fill="none" stroke="#caa875" stroke-width="1.65"/>
<path d="M-13-155q24-7 44-5l13 3q4 2-1 4-15 7-36 5Z" fill="#324658" stroke="#303e4d" stroke-width="1.6"/>
<path d="M12-150q14-.1 23-3" fill="none" stroke="#81949b" stroke-width="1.1"/>
<path d="m-6-178 7 1.1.1 8q-2 4-6.7 5-5.6-1.3-7.6-5.3l.6-7.9Z" fill="#d7ad66" stroke="#666054" stroke-width="1.2"/>
<use href="#paw-shape" fill="#6b6151" transform="translate(-6 -171.2) scale(.32)"/>
</g>
<path d="M17-88q10-7 17 8l6 15-11 5-13-16" fill="#617b91" stroke="#455769" stroke-width="1.8"/>
<g id="carried-envelope" transform="translate(29 -70) rotate(-10)">
<rect x="-25.5" y="-16" width="51" height="34" rx="1" fill="var(--flap)" stroke="#795c4d" stroke-width="1.6"/>
<path d="m-25 17 19-16H5l20 16" fill="var(--env)" stroke="var(--env-line)" stroke-width="1.1"/>
<path d="m-25-15 23 18.5q2 1.3 4 0L25-15Z" fill="var(--flap)" stroke="var(--env-line)" stroke-width="1.1"/>
<circle cy="3" r="4.6" fill="var(--seal)" stroke="var(--seal-dark)" stroke-width="1"/><use href="#heart-shape" transform="translate(0 3) scale(.31)" fill="var(--seal-mark)"/>
</g>
<path d="M-12-83q6 3 14 11l12-3 4 9c-6 7-16 8-22 4l-16-11" fill="#758da0" stroke="#46596b" stroke-width="1.8"/>
<path d="m6-72 4-2 5 11-5 2Z" fill="#b4bbb1" stroke="#556775" stroke-width="1.1"/>
<path d="M11-74q4-4 8-2l7 4q3 4 0 7-5 5-11 2Z" fill="#efd4ae" stroke="#81624d" stroke-width="1.4"/><path d="m21-71 4 4m-8-2 4 5" fill="none" stroke="#bd9470" stroke-width="1.1"/>
<path d="M51-75q5-4 7 1 2 6-5 11l-2-3 2-4-2-1Z" fill="#ead0ac" stroke="#80624f" stroke-width="1.25"/>
</g></g>
</g>
<g aria-hidden="true">
<path d="M0 390v-34q9-13 17-13 8-15 19-8 14-13 23 2 14-4 19 8 15 0 19 13 13-4 20 11 22-2 32 21Z" fill="#475955"/>
<path d="M720 390v-57q-11-12-23-8-10-11-23 3-18-1-22 14-16 0-19 11-17 0-24 14-23 0-38 23Z" fill="#435451"/>
<g style="--stem:#6f7860;--leaf:#667562;--leaf-edge:#4c6259;--petal:#d99683;--petal-edge:#98756c">
<use href="#plant-spray" transform="translate(28 395) rotate(-14) scale(.93)"/><use href="#plant-spray" transform="translate(705 397) rotate(17) scale(1.09)"/>
</g>
<g style="--stem:#7b8064;--leaf:#72806a;--leaf-edge:#4c6259"><use href="#plant-spray" transform="translate(77 400) rotate(-18) scale(.74)"/><use href="#plant-spray" transform="translate(651 400) rotate(-18) scale(.72)"/></g>
<path d="M2 388q26-13 49-5 18-13 39-2 15-4 37 9m484 0q21-12 42-5 18-12 37-6 14-11 31-9" fill="none" stroke="#334b4b" stroke-width="4"/>
<g fill="none" stroke="#99a086" opacity=".75" stroke-width="1.4" stroke-linecap="round"><path d="M6 371q7-7 14-7m19 7 8-5m-14 19q8-8 14-9m38 2 5-3m584-8q5-5 11-5m9-12 6-3m-48 30 7-4"/></g>
</g>
<g id="letter-drop" style="display:none" transform="translate(359 276)">
<ellipse cx="3" cy="58" rx="100" ry="8" fill="#574448" opacity=".25"/>
<g class="rays" fill="#ffe1a2" stroke="#ffe1a2" stroke-width="2.3" stroke-linecap="round">
<path d="m-101-23-11-5m16-9-4-6m187 7 6-8m5 20 12-5m-12 20 7 2" fill="none"/>
<use href="#spark" transform="translate(-102 8) scale(.84)" stroke="none"/><use href="#spark" transform="translate(107 -42) scale(.79)" stroke="none"/>
</g>
<g transform="rotate(-3)">
<rect x="-86" y="-51" width="172" height="105" rx="3" fill="var(--env-shadow)" stroke="#74594d" stroke-width="2.4"/>
<path d="M-84-49h168L0 18Z" fill="var(--env-line)"/>
<g class="peek"><rect x="-74" y="-46" width="148" height="79" rx="1.5" fill="var(--sheet)" stroke="var(--env-line)"/><path d="M-62-35H62m-124 5H44" stroke="var(--rule)" fill="none"/></g>
<path d="m-85-49 68 53L-85 52Z" fill="var(--env)" stroke="var(--env-line)" stroke-width="1.4"/>
<path d="m85-49-68 53 68 48Z" fill="var(--env)" stroke="var(--env-line)" stroke-width="1.4"/>
<path d="m-84 52 70-57q12-10 26 0l72 57Z" fill="var(--env)" stroke="var(--env-line)" stroke-width="1.5"/>
<g transform="translate(-74 25)" fill="var(--seal)" color="var(--seal)" opacity=".76">
<g class="motif motif-rose"><use href="#heart-shape" transform="translate(8 7) rotate(-13) scale(.63)"/><use href="#heart-shape" transform="translate(19 2) rotate(16) scale(.39)"/></g>
<g class="motif motif-leaf"><use href="#botanical-mark" transform="translate(1 -4) scale(.59)"/></g>
<g class="motif motif-star"><use href="#spark" transform="translate(9 6) scale(1.1)"/><use href="#spark" transform="translate(22 2) scale(.54)"/></g>
</g>
<g id="flap">
<path d="M-85-50H85L7 13q-7 6-14 0Z" fill="var(--flap)" stroke="var(--env-line)" stroke-width="1.7"/>
<path d="M-74-45-4 11q4 3 8 0l70-56" stroke="var(--env-line)" fill="none" stroke-width="1.15" stroke-dasharray="3.3 3.4"/>
<path d="M-13 9q-1-6 5-8 3-5 9-2 5-2 9 3 6 1 6 7 2 6-3 10-1 6-7 6-5 4-10 0-7 1-9-5-5-4 0-11Z" fill="var(--seal)" stroke="var(--seal-dark)" stroke-width="1.5"/>
<circle cx="1" cy="12" r="9" fill="none" stroke="var(--seal-mark)" stroke-width="1" opacity=".67"/>
<use href="#heart-shape" transform="translate(1 12) scale(.72)" fill="var(--seal-mark)"/>
</g>
</g>
<g id="open-tag"><rect x="-51" y="64" width="102" height="25" rx="12.5" fill="#fff1d8" stroke="#9a7967"/><text x="0" y="81" text-anchor="middle" font-size="13" font-weight="600" font-family="Georgia,serif" font-style="italic" fill="#763d34">Tap to open</text></g>
</g>
<rect width="720" height="390" filter="url(#print-grain)" opacity=".115" style="mix-blend-mode:soft-light;pointer-events:none"/>
</svg>
<button type="button" class="stage-hit" id="open-letter" aria-label="Open your delivered envelope" hidden></button>
</div>
</div></div>
<div class="window-foot">
<p class="hint"><svg class="icon" aria-hidden="true"><use href="#i-route"/></svg><span id="hint">Your courier is ready to go.</span></p>
<button type="button" id="replay" class="replay" disabled><svg class="icon" aria-hidden="true"><use href="#i-replay"/></svg>Replay</button>
</div>
</section>
</div>
</section>
<section id="reader" class="wrap reader" data-paper="blush" aria-labelledby="note-to" hidden>
<div class="reader-tools">
<button type="button" class="quiet-button" id="back"><svg class="icon" aria-hidden="true"><use href="#i-back"/></svg>Back to desk</button>
<button type="button" class="quiet-button" id="read-replay"><svg class="icon" aria-hidden="true"><use href="#i-replay"/></svg>Replay delivery</button>
</div>
<article class="reading-card">
<div class="popup">
<svg viewBox="0 0 720 262" preserveAspectRatio="xMidYMax meet" role="img" aria-labelledby="garden-title">
<title id="garden-title">A moonlit pop-up garden. Two paper cats nestle together among flowers and floating hearts.</title>
<defs>
<linearGradient id="garden-sky" x2="0" y2="1"><stop stop-color="var(--night)"/><stop offset=".62" stop-color="#646579"/><stop offset="1" stop-color="#b08787"/></linearGradient>
<linearGradient id="garden-base" x2="0" y2="1"><stop stop-color="#c4a58b"/><stop offset="1" stop-color="#e2c9a9"/></linearGradient>
<path id="arch" d="M32 235V151C32 74 103 52 155 62 176 21 239 17 279 40 316-4 389-4 429 34c54-29 108-8 133 31 60-16 126 22 126 84v86Z"/>
<clipPath id="arch-clip"><use href="#arch"/></clipPath>
<g id="cypress-private"><path d="M0 0C-12-3-13-20-9-35q-3-12 2-26 0-16 8-30 8 17 5 30 7 13 5 26C18-13 13 0 0 0Z" fill="currentColor" stroke="#d9c6a7" stroke-width="2.3"/><path d="M.5 0v-69m0 45 5-9M0-39l-4-6m4-9 4-6" fill="none" stroke="#9aab93" stroke-width="1.3"/></g>
<g id="sitting-cat">
<path d="M-11-32c-17 6-22 16-37 16-12 1-17-5-16-15 1-6-6-8-11-3-10 14-.3 32 16 36 18 5 42-1 55-11Z" fill="var(--fur,#cf9568)" stroke="#f9e7c8" stroke-width="5"/>
<path d="M-12-32c-17 6-22 16-37 16-12 1-17-5-16-15 1-6-6-8-11-3-10 14-.3 32 16 36 18 5 42-1 55-11" fill="var(--fur,#cf9568)" stroke="var(--fur-edge,#91674e)" stroke-width="1.6"/>
<path d="m-71-24 7-2m-5 14 9-5m-2 12 6-7m5 9 4-7" fill="none" stroke="var(--tabby,#b57d57)" stroke-width="3.4" stroke-linecap="round"/>
<path d="M-26-3c-13-6-15-21-12-37 3-18 17-35 18-48-12-8-15-19-12-30l-2-19 18 11q12-6 25-2l16-15 2 27q8 12 5 24-3 11-14 15c4 14 17 31 18 49 3 16-.4 24-11 27-14 4-37 5-51-2Z" fill="var(--fur,#cf9568)" stroke="#fff0d6" stroke-linejoin="round" stroke-width="5.3"/>
<path d="M-26-3c-13-6-15-21-12-37 3-18 17-35 18-48-12-8-15-19-12-30l-2-19 18 11q12-6 25-2l16-15 2 27q8 12 5 24-3 11-14 15c4 14 17 31 18 49 3 16-.4 24-11 27-14 4-37 5-51-2Z" fill="var(--fur,#cf9568)" stroke="var(--fur-edge,#91674e)" stroke-linejoin="round" stroke-width="1.6"/>
<path d="m-29-131 11 7-9 5Zm51-4-10 9 10 5Z" fill="var(--inner-ear,#bc8174)"/>
<path d="M18-86q5-2 10-8l5-9-4-1 1-10q-7 8-19 10c-7 1-11 2-15 6l6 3q8 5 11 12c1 21 21 47 10 72q18-2 13-25c-1-18-15-38-18-50Z" fill="var(--chest,#f0d2aa)"/>
<path d="M2-100q5 4 10-1" stroke="var(--fur-edge,#91674e)" stroke-width="1.7" stroke-linecap="round" fill="none"/>
<path d="m26-98 13-3m-14 6 14 1m-64-7-13-2m13 6-14 1" fill="none" stroke="var(--fur-edge,#91674e)" stroke-width="1.2" stroke-linecap="round"/>
<g fill="var(--tabby,#b57d57)"><path d="m-27-116 12 6-14-1m1 7 12 4-12 2m12-28 6 9-1-10m9 0 2 8 3-8m-28 61q7 6 18 8-11 2-22-1m-3 7q10 8 22 9-15 3-26-2m-2 10q9 6 20 6-11 4-21 0"/></g>
<path d="M-15-80q-5 13-11 20M-30-32q-3 14 3 21m7 5q7 3 15 1" fill="none" stroke="var(--highlight,#e6bb89)" stroke-width="1.6" stroke-linecap="round"/>
</g>
<g id="cut-flower">
<path d="M-1 0q4-29-5-53M0-3q9-21 18-32m-20 19q-8-16-19-21" fill="none" stroke="#f9e8cc" stroke-width="6" stroke-linecap="round"/>
<path d="M-1 0q4-29-5-53M0-3q9-21 18-32m-20 19q-8-16-19-21" fill="none" stroke="#71806a" stroke-width="2.8"/>
<g fill="#859579" stroke="#f9e8cc" stroke-width="1.8"><path d="M-3-20q-18-2-19-17 15 3 19 17Zm4-4q1-16 17-21-1 15-17 21Zm-4-13q-12-2-16-16 14 4 16 16Z"/></g>
<use href="#daisy" transform="translate(-6 -54) scale(1.16)"/><use href="#daisy" transform="translate(18 -36) scale(.7)"/>
</g>
</defs>
<ellipse cx="358" cy="245" rx="301" ry="14" fill="#634a3e" opacity=".12"/>
<path d="m52 221 616-3 32 31q-337 17-681 1Z" fill="url(#garden-base)" stroke="var(--rule)" stroke-width="1.5"/>
<path d="M36 246q313 12 646-1m-592-12 544-.3" fill="none" stroke="#f0d9b7" stroke-width="1.6"/>
<g class="fold-layer fold-sky">
<use href="#arch" transform="translate(2 4)" fill="#6a5549" opacity=".22"/>
<use href="#arch" fill="url(#garden-sky)" stroke="#ecd6b6" stroke-width="5.5"/>
<g clip-path="url(#arch-clip)">
<g id="garden-stars" fill="#f9dfaa"></g>
<g transform="translate(414 62) rotate(2)"><circle r="39" fill="none" stroke="#d9c49f" opacity=".27"/><use href="#moon-shape" transform="scale(.81)"/></g>
<g fill="#c3a59e" opacity=".5"><path d="M70 121q18-5 30-5 9-9 19-7 13-15 28-9 6 2 10 10 13-2 21 5 14-2 25 3Z"/><path d="M486 105q13-6 29-5 11-12 25-8 9-10 19-7 8 1 12 8 13-1 21 6l18 3Z"/></g>
<path d="M23 191q62-40 112-27 58-28 108-9 47-23 98-4 58-30 104-12 70-32 137-8 57-24 116-9v123H23Z" fill="#857887"/>
<g fill="#656674"><path d="M88 180v-26l9-7 10 7v21m9-3v-33l11-8 11 8v34m-15-40v-12h3v10m353 31v-28l11-9 12 8v26m28-6v-30l12-7 14 8v29"/><path d="M561 146v-29l7-5 7 5v29m-15-28 8-20 8 20"/></g>
<g fill="#f1c68f"><path d="M94 158h4v6h-4zm30-15h4v5h-4zm364-6h5v7h-5zm55-10h4v7h-4z"/></g>
</g>
</g>
<g class="fold-layer fold-hills">
<path d="M37 231q3-26 32-34 12-21 36-19 13-18 35-12 29-19 55-4 21-13 42-5 46-14 82 8 41-16 74 3 36-20 71-12 33-20 68-9 24-17 47-9 18-18 47-12 29-11 44 9l16 45-5 47Z" fill="#61716e" stroke="#e8d3b5" stroke-width="2.8"/>
<g transform="translate(92 230) scale(.7)" color="#40595a"><use href="#cypress-private"/></g>
<path d="M34 229c43-11 57-35 89-32 34-22 74-12 97-4 28-13 53-13 75 0 33-8 73-6 99 4 31-19 69-17 100-9 44-18 80-17 112-10 30-16 54-15 79-12v67Z" fill="#78816d" stroke="#d8c4a9" stroke-width="2.2"/>
<g fill="none" stroke="#b2ad8d" stroke-linecap="round" stroke-width="1.5"><path d="m109 204 8-4m77-12 8 2m-60 24 7-3m381-31 8-1m47 5 8-3m38-9 7-.5m-386 14 7-1"/></g>
<path d="m38 227 17 12 6-12m601-10 17 18 7-16" fill="#bca58a" stroke="#897a68" stroke-width="1"/>
</g>
<g class="fold-layer fold-cats">
<ellipse cx="359" cy="234" rx="102" ry="8" fill="#584d45" opacity=".22"/>
<g transform="translate(333 232) rotate(-3) scale(.88)"><use href="#sitting-cat"/></g>
<g transform="translate(389 233) rotate(5) scale(-.79 .79)" style="--fur:#606a77;--fur-edge:#424d5a;--tabby:#495464;--chest:#e4dbca;--highlight:#86929b;--inner-ear:#ba8c85"><use href="#sitting-cat"/></g>
</g>
<g class="fold-layer fold-flowers">
<g fill="#bba58c" stroke="#988572" stroke-width="1"><path d="m79 232 12 12 14-12m111-2 9 11 12-11m251 6 9 10 12-10m102-8 11 12 12-12"/></g>
<g style="--petal:#eab6a0;--petal-edge:#f3debd"><use href="#cut-flower" transform="translate(108 233) rotate(-15) scale(1.25)"/><use href="#cut-flower" transform="translate(228 240) rotate(15) scale(.87)"/><use href="#cut-flower" transform="translate(517 237) rotate(-18) scale(1.09)"/><use href="#cut-flower" transform="translate(635 228) rotate(8) scale(1.18)"/></g>
<g style="--petal:#f9e4b9;--petal-edge:#e7cea7"><use href="#cut-flower" transform="translate(66 238) rotate(-14) scale(.86)"/><use href="#cut-flower" transform="translate(164 236) rotate(6) scale(1.18)"/><use href="#cut-flower" transform="translate(470 237) rotate(-9) scale(.75)"/><use href="#cut-flower" transform="translate(572 236) rotate(12) scale(1.2)"/></g>
<g fill="#b86259" stroke="#f3d8b6" stroke-width="1.5"><use href="#heart-shape" transform="translate(136 197) rotate(-13) scale(.92)"/><use href="#heart-shape" transform="translate(542 191) rotate(13) scale(.91)"/></g>
</g>
<g class="fold-layer fold-hearts" stroke-linejoin="round">
<use href="#heart-shape" transform="translate(339 82) rotate(-15) scale(1.28)" fill="#cd7969" stroke="#ffe0b9" stroke-width="1.1"/>
<use href="#heart-shape" transform="translate(361 67) rotate(14) scale(.81)" fill="#ecc09e" stroke="#f7dab8" stroke-width="1.3"/>
<use href="#heart-shape" transform="translate(314 68) rotate(-27) scale(.52)" fill="#f1c6a4"/>
<path d="m335 98 1 6m23-25-1.5 6" stroke="#e2c29e" opacity=".8" stroke-width="1.3" stroke-linecap="round"/>
</g>
</svg>
</div>
<div class="note">
<h2 class="note-to" id="note-to" tabindex="-1" dir="auto"></h2>
<div class="note-body" id="note-body">
<p id="written-access" class="written-access" dir="auto"></p>
<svg id="handwriting" class="handwriting" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" hidden></svg>
</div>
<p class="note-from"><svg viewBox="-10 -9 20 18" aria-hidden="true"><use href="#heart-shape"/></svg><span id="signature" dir="auto"></span></p>
<svg class="corner-print" viewBox="0 0 44 44" fill="currentColor" aria-hidden="true">
<g class="motif motif-rose"><use href="#heart-shape" transform="translate(15 25) rotate(-19) scale(.77)"/><use href="#heart-shape" transform="translate(28 15) rotate(16) scale(.5)"/></g>
<g class="motif motif-leaf"><use href="#botanical-mark" transform="translate(5 4)"/></g>
<g class="motif motif-star"><use href="#spark" transform="translate(16 24) scale(1.5)"/><use href="#spark" transform="translate(30 12) scale(.72)"/></g>
</svg>
</div>
</article>
</section>
<div class="end-rule" aria-hidden="true"><svg viewBox="-10 -9 20 18"><use href="#heart-shape"/></svg></div>
</main>
<div class="sr" id="announcer" role="status" aria-live="polite" aria-atomic="true"></div>
<script>
(function () {
"use strict";
const $ = (id) => document.getElementById(id);
const ns = "http://www.w3.org/2000/svg";
const desk = $("desk"), reader = $("reader"), stage = $("stage"), form = $("letter-form");
const panel = $("delivery-window"), courier = $("courier"), shadow = $("cat-shadow");
const drop = $("letter-drop"), carried = $("carried-envelope"), hit = $("open-letter");
const message = $("message"), send = $("send"), replay = $("replay");
const reduceMotion = window.matchMedia("(prefers-reduced-motion: reduce)");
let state = "idle", lastLetter = null, sceneFrame = 0, sceneTimer = 0, sceneVersion = 0;
let inkFrame = 0, writing = null, audio = null, master = null, soundOn = true;
let demoActive = false, demoRound = 0, demoTimers = [];
const starter = message.value;
function svgNode(name, attributes) {
const node = document.createElementNS(ns, name);
Object.keys(attributes || {}).forEach((key) => node.setAttribute(key, attributes[key]));
return node;
}
function randomSource(seed) {
return function () {
seed = (Math.imul(seed, 1664525) + 1013904223) >>> 0;
return seed / 4294967296;
};
}
function starField(id, count, seed, bottom) {
const random = randomSource(seed), group = $(id), drawing = document.createDocumentFragment();
for (let i = 0; i < count; i++) {
const x = 7 + random() * 706, y = 7 + random() * bottom;
const size = .51 + random() * .91, glow = .35 + random() * .59;
if (id === "street-stars" && Math.hypot(x - 548, y - 73) < 47) continue;
if (id === "garden-stars" && Math.hypot(x - 414, y - 62) < 32) continue;
const star = i % 7 === 0
? svgNode("use", {href:"#spark",transform:"translate(" + x + " " + y + ") scale(" + (size * .77) + ")"})
: svgNode("circle", {cx:x,cy:y,r:size});
star.setAttribute("opacity", glow);
if (i % 9 === 0) {
star.setAttribute("class", "twinkle");
star.style.animationDelay = (-random() * 5) + "s";
}
drawing.appendChild(star);
}
group.appendChild(drawing);
}
function scatterStones() {
const group = $("paving-marks"), random = randomSource(721);
const drawing = document.createDocumentFragment();
for (let row = 0; row < 8; row++) {
let x = -45 + random() * 22;
const spacing = 19 + row * 3.9;
while (x < 736) {
const wide = spacing * (.69 + random() * .75);
const y = 300 + row * (7.6 + row * .79) - x * .028 + random() * 4;
if (random() > .22) {
const lift = 2.1 + row * .69;
const d = "M" + x.toFixed(1) + " " + y.toFixed(1) + "q2 " + (-lift).toFixed(1) + " 6 " + (-lift).toFixed(1) +
"l" + (wide * .57).toFixed(1) + " -.7q5 -.4 7 1.6";
drawing.appendChild(svgNode("path", {d:d,opacity:(.22 + random() * .33).toFixed(2),"stroke-width":(.9 + row * .06).toFixed(2)}));
if (random() > .62) {
drawing.appendChild(svgNode("path", {d:"M" + (x+8) + " " + (y+1) + "l" + (wide*.36) + " -.6",stroke:"#e8c2a1",opacity:".67","stroke-width":"1.65"}));
}
}
x += wide + 4;
}
}
group.appendChild(drawing);
}
starField("street-stars", 121, 59, 193);
starField("garden-stars", 102, 197, 155);
scatterStones();
function unlockSound() {
if (!soundOn) return;
try {
const AudioEngine = window.AudioContext || window.webkitAudioContext;
if (!AudioEngine) return;
if (!audio) {
audio = new AudioEngine();
master = audio.createGain();
master.gain.value = .37;
master.connect(audio.destination);
}
if (audio.state === "suspended" || audio.state === "interrupted") {
const resume = audio.resume();
if (resume && resume.catch) resume.catch(function () {});
}
} catch (_) {}
}
function ring(hz, delay, duration, level, wave, endHz) {
if (!soundOn || !audio || audio.state !== "running" || !master) return;
try {
const at = audio.currentTime + .008 + delay;
const osc = audio.createOscillator(), volume = audio.createGain();
osc.type = wave || "sine";
osc.frequency.setValueAtTime(hz, at);
if (endHz) osc.frequency.exponentialRampToValueAtTime(endHz, at + duration);
volume.gain.setValueAtTime(.0001, at);
volume.gain.exponentialRampToValueAtTime(Math.max(.001, level), at + .014);
volume.gain.exponentialRampToValueAtTime(.0001, at + duration);
osc.connect(volume); volume.connect(master);
osc.onended = function () { osc.disconnect(); volume.disconnect(); };
osc.start(at); osc.stop(at + duration + .03);
} catch (_) {}
}
function rustle(length, level) {
if (!soundOn || !audio || audio.state !== "running" || !master) return;
try {
const at = audio.currentTime, frames = Math.ceil(audio.sampleRate * length);
const buffer = audio.createBuffer(1, frames, audio.sampleRate);
const samples = buffer.getChannelData(0);
for (let i = 0; i < frames; i++) samples[i] = (Math.random() * 2 - 1) * (.65 + .35 * Math.sin(i / 83));
const source = audio.createBufferSource(), filter = audio.createBiquadFilter(), volume = audio.createGain();
source.buffer = buffer;
filter.type = "bandpass"; filter.frequency.value = 1420; filter.Q.value = .78;
volume.gain.setValueAtTime(.0001, at);
volume.gain.linearRampToValueAtTime(level, at + length * .22);
volume.gain.exponentialRampToValueAtTime(.0001, at + length);
source.connect(filter); filter.connect(volume); volume.connect(master);
source.onended = function () { source.disconnect(); filter.disconnect(); volume.disconnect(); };
source.start(at);
} catch (_) {}
}
function soundCue(which) {
if (which === "send") {
rustle(.18,.14); ring(392,.03,.3,.115,"triangle"); ring(523.25,.18,.49,.105);
} else if (which === "arrive") {
ring(659.25,0,.4,.10); ring(783.99,.13,.52,.08); ring(987.77,.29,.73,.053);
} else if (which === "open") {
rustle(.39,.22); ring(392,.30,.73,.085); ring(493.88,.46,.69,.075);
ring(587.33,.65,.8,.07); ring(783.99,.84,1.05,.055);
} else if (which === "step") {
ring(172,0,.086,.052,"sine",86);
} else if (which === "paper") {
rustle(.09,.12);
}
}
$("sound").addEventListener("click", function () {
soundOn = !soundOn;
this.setAttribute("aria-pressed", String(soundOn));
this.setAttribute("aria-label", soundOn ? "Sound on" : "Sound off");
$("sound-label").textContent = soundOn ? "Sound on" : "Sound off";
if (master && audio) master.gain.setTargetAtTime(soundOn ? .37 : 0, audio.currentTime, .018);
if (soundOn) { unlockSound(); ring(659.25, .045, .26, .076); }
});
function countMessage() {
$("counter").textContent = message.value.length + " / 320";
if (message.value.trim()) {
$("message-error").hidden = true;
message.removeAttribute("aria-invalid");
}
}
let starterUntouched = true;
message.addEventListener("focus", function () {
if (starterUntouched && this.value === starter) this.select();
});
message.addEventListener("click", function () {
if (starterUntouched && this.value === starter) this.select();
starterUntouched = false;
});
message.addEventListener("input", function () { starterUntouched = false; countMessage(); });
countMessage();
function selectedPaper() {
return form.querySelector('input[name="paper"]:checked').value;
}
form.querySelectorAll('input[name="paper"]').forEach(function (radio) {
radio.addEventListener("change", function () {
if (state === "idle") stage.dataset.paper = this.value;
unlockSound(); soundCue("paper");
});
});
function captureLetter() {
return {
from: $("sender").value.trim() || "Me",
to: $("recipient").value.trim() || "You",
message: message.value.replace(/\r\n?/g,"\n").trim(),
paper: selectedPaper()
};
}
function announce(words) { $("announcer").textContent = words; }
const statusText = {
idle:["Ready", "Your courier is ready to go."],
travel:["In transit", "Your postcat is on the way…"],
arrived:["Delivered", "Tap the envelope to read your letter."],
unsealing:["Opening", "Unfolding your letter…"],
reading:["Opened", "Your letter has been opened."]
};
function phase(next) {
state = next;
panel.dataset.state = next;
stage.className = "stage " + next;
$("status").textContent = statusText[next][0];
$("hint").textContent = statusText[next][1];
const busy = next === "travel" || next === "unsealing";
send.disabled = busy;
$("send-text").textContent = next === "travel" ? "Delivering…" : "Send letter";
replay.disabled = !lastLetter || busy;
hit.hidden = next !== "arrived";
if (lastLetter) hit.setAttribute("aria-label", "Open the letter for " + lastLetter.to);
}
function cancelScene() {
sceneVersion++;
cancelAnimationFrame(sceneFrame); clearTimeout(sceneTimer);
cancelAnimationFrame(inkFrame);
writing = null;
}
function showDesk() {
reader.classList.remove("reading"); reader.hidden = true; desk.hidden = false;
}
function bringWindowIntoView(instant) {
const r = panel.getBoundingClientRect();
if (r.top >= 8 && r.bottom <= window.innerHeight - 5) return;
const margin = Math.max(10, (window.innerHeight - r.height) / 2);
window.scrollTo({top:Math.max(0,window.scrollY + r.top - margin),behavior:instant || reduceMotion.matches ? "auto" : "smooth"});
}
function moveCat(x, y, lean, scale) {
courier.setAttribute("transform","translate(" + x.toFixed(2) + " " + y.toFixed(2) + ") rotate(" + lean.toFixed(2) + ") scale(" + (scale || 1) + ")");
shadow.setAttribute("transform","translate(" + x.toFixed(2) + " 335)");
}
function moveEnvelope(x, y, scale, angle) {
drop.setAttribute("transform","translate(" + x.toFixed(2) + " " + y.toFixed(2) + ") rotate(" + angle.toFixed(2) + ") scale(" + scale.toFixed(4) + ")");
}
function readyAtDesk() {
cancelScene(); showDesk(); phase("idle");
stage.dataset.paper = selectedPaper();
drop.style.display = "none"; courier.style.display = ""; shadow.style.display = "";
carried.style.display = ""; $("open-tag").style.opacity = "0";
moveCat(279,335,0); replay.disabled = !lastLetter;
}
function leaveEnvelope(notify) {
courier.style.display = "none"; shadow.style.display = "none";
drop.style.display = ""; moveEnvelope(359,273,1,0);
$("open-tag").style.opacity = "";
phase("arrived");
if (notify) {
soundCue("arrive");
announce("Delivered. Tap the envelope to open your letter.");
}
}
function ease(p) { return p * p * (3 - 2 * p); }
function deliver(letter, automatic) {
const fromDesk = state === "idle";
cancelScene(); showDesk();
const version = sceneVersion;
lastLetter = Object.assign({}, letter);
stage.dataset.paper = letter.paper;
courier.style.display = ""; shadow.style.display = ""; carried.style.display = "";
drop.style.display = "none"; $("open-tag").style.opacity = "0";
phase("travel"); stage.classList.add("walking");
const startX = fromDesk ? 279 : -85;
moveCat(startX,335,0);
if (document.activeElement instanceof HTMLElement && document.activeElement !== document.body) document.activeElement.blur();
bringWindowIntoView(automatic);
soundCue("send"); announce("Your postcat is carrying the letter to " + letter.to + ".");
if (reduceMotion.matches) {
sceneTimer = window.setTimeout(function () { if (sceneVersion === version) leaveEnvelope(true); }, 260);
return;
}
const approach = fromDesk ? 1650 : 1930, transfer = 640, exitTime = 1260;
const start = performance.now(), dropX = 425, finish = approach + transfer + exitTime;
let lastStep = -1, passedLetter = false;
function travel(now) {
if (version !== sceneVersion) return;
const t = Math.max(0, now - start), gait = t / 83;
if (t < approach) {
const p = t / approach;
const x = startX + (dropX - startX) * (.48 * p + .52 * ease(p));
moveCat(x,335 - Math.abs(Math.sin(gait)) * 4.1,Math.sin(gait) * 1.45);
} else if (t < approach + transfer) {
if (!passedLetter) {
passedLetter = true; stage.classList.remove("walking");
carried.style.display = "none"; drop.style.display = ""; soundCue("paper");
}
const p = (t - approach) / transfer, q = ease(p);
moveCat(dropX,335 + Math.sin(p * Math.PI) * 2.8, 3 * Math.sin(p * Math.PI));
moveEnvelope(dropX + 31 + (359 - dropX - 31) * q,265 + 8 * q - 54 * Math.sin(p * Math.PI),.305 + .695 * q,-6 + 6 * q);
} else if (t < finish) {
carried.style.display = "none"; drop.style.display = ""; moveEnvelope(359,273,1,0);
stage.classList.add("walking");
const p = (t - approach - transfer) / exitTime;
moveCat(dropX + (847 - dropX) * (.36 * p + .64 * ease(p)),335 - Math.abs(Math.sin(gait)) * 4.5,Math.sin(gait) * 1.6);
} else { leaveEnvelope(true); return; }
if (t < approach || t > approach + transfer) {
const step = Math.floor(t / 285);
if (step !== lastStep) { lastStep = step; soundCue("step"); }
}
sceneFrame = requestAnimationFrame(travel);
}
sceneFrame = requestAnimationFrame(travel);
}
form.addEventListener("submit", function (event) {
event.preventDefault();
if (send.disabled) return;
const letter = captureLetter();
if (!letter.message) {
$("message-error").hidden = false; message.setAttribute("aria-invalid","true"); message.focus(); return;
}
unlockSound(); deliver(letter,false);
});
function replayLetter() { if (lastLetter) { unlockSound(); deliver(lastLetter,false); } }
replay.addEventListener("click",replayLetter);
$("read-replay").addEventListener("click",replayLetter);
// A single-line pen alphabet keeps the handwriting independent of installed fonts.
// Advances are in pen units. Other scripts use native shaping and the same reveal timing.
const pen = {
a:[10,"M8 -7.2C5 -11 1 -6.4 1 -2.7c0 3.8 4 4.1 7 -5.6L7 -1.5Q7 .9 10 -1.2"],
b:[10,"M1 -.6C1.2 -8 6 -18.3 4.1 -17.2 1.9 -16.7 1.1 -6 1.1 -2.8C4 -10.6 10.4 -10 8 -3.4 6.5 1.3 2.4 1.2 1.2 -.5Q5.2 2.2 10 -1.1"],
c:[9,"M8 -7.2C6.9 -10.8 1.3 -8 .8 -3.4 .2 1.6 5.1 1.7 9 -1.6"],
d:[11,"M8 -7.1C5 -10.6 1 -6.7 1 -2.4 1 1.5 5.2 1.6 8.1 -7.7L11 -17.6C9 -13 6.3 -2.4 7.8 -.6Q8.7 .9 11.5 -1.3"],
e:[9,"M.4 -3.9C4.8 -3.1 9 -6.6 6.7 -8.5 4.3 -10.3 .8 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10.1 -.9M10 -16.4 6.7 -1.1C4.3 9.3 -3.6 4.8 .1 .7"],
K:[14.7,"M5.5 -16.4 1.2 .2M14.4 -16.7 4 -7.2Q10 3.1 15.1 -1.1"],
L:[13.7,"M.2 -4.1C4.1 -7.2 13.5 -18.8 8.9 -18.1 5.3 -17.5 4.8 -6.9 2.5 -.6M.2 -.1C4.9 -2.9 9.4 2.6 14.2 -.6"],
M:[20.3,"M.4 .2Q3.6 -8.3 6.5 -16.4L7 -3.6Q12.3 -13.2 18.6 -17.1C16.8 -8.5 13.5 2.5 20.5 -.9"],
N:[16.5,"M.6 .2Q3.3 -8.2 5.1 -16.7L11.4 -.2Q13.4 -12.9 16.3 -17.1"],
O:[16.7,"M12.6 -16.5C6.2 -19.5 .1 -10 .7 -3.8 1.4 3.6 11.2 2.7 15 -5.7 18.4 -13.4 13.1 -20.5 8.3 -13.9"],
P:[14.5,"M1.2 .2q3.1 -11 4.3 -16M.7 -13.7C7.2 -20 18.5 -17.4 14.2 -10.3 12 -6.4 6.3 -5.7 3.6 -7.4"],
Q:[17,"M12.9 -16.7C6 -19.6 .1 -10 .7 -3.8 1.4 3.6 11.2 2.7 15 -5.8 18.4 -13.4 13.2 -20.3 8.7 -14.4M7 -3.1q4.3 6 10.3 6.2"],
R:[15.4,"M1.1 .2Q4.2 -10.8 5.5 -16M.7 -14C7.5 -20.3 18.1 -17.3 13.8 -10.7 11.7 -7.2 7.8 -6.4 4.8 -7.3Q10.5 2.7 15.7 -.6"],
S:[13.8,"M13.4 -14.3C14 -19.3 4.8 -17.9 3.8 -12.8 2.7 -8.6 12.2 -7.9 11.5 -3.6 10.9 1.8 1.3 2.7 .4 -2.8"],
T:[14,"M-.1 -14.9q7.1 -2.8 17 -1.5M9.4 -16.3Q5.5 -6.1 4.5 .4"],
U:[16.4,"M4.8 -16.5C1.5 -8.3 -1.4 -.4 4.4 .6 9.6 1.4 13.6 -11.5 15 -16.8 13.4 -8.9 9.9 1.8 16.6 -.8"],
V:[15,"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.4 .3 3.6 .5 8.2 7.3 7.5 8.3 4.1"],
"♥":[12.8,"M5.7 -.4C3.9 -3.1 -.7 -5.8 .8 -8.8c1.6 -3.3 5.3 -1.2 5.6 1.1 1.8 -3.4 5.7 -4.7 6 -.9.3 2.9 -5.1 6.4 -6.7 8.2Z"]
};
const aliases = {"’":"'","‘":"'","ʼ":"'","“":'"',"”":'"',"‑":"-","−":"-","♡":"♥","❤":"♥"};
const accents = {
"\u0301":"M3.7 -11.4l3.7 -3.5","\u0300":"M6.7 -11.6l-2.8 -3.4",
"\u0308":"M2.8 -12.1l.2 -.6m4.9 .5.2 -.6","\u0303":"M1.8 -12q1.8 -2.8 4 -.8t4.3 -.9",
"\u0302":"M2 -11.6l3.8 -3.3 3 2.9","\u030a":"M4.1 -12.4c-1.3 -2.8 2.3 -4.4 3.3 -2.3 1.2 2.3 -2.4 4.5 -3.3 2.3Z",
"\u0327":"M4.8 1.6q3.6 2.2 -.4 4.5"
};
function penLetter(ch) {
if (ch === "\n" || /^\s$/u.test(ch)) return {advance:ch === "\t" ? 17 : 5.25,space:true,breakLine:ch === "\n"};
const plain = ch.replace(/\uFE0F/g,"");
const parts = Array.from((aliases[plain] || plain).normalize("NFD"));
const base = parts.shift(), glyph = pen[base];
if (!glyph || parts.some((mark) => !accents[mark])) return null;
return {advance:glyph[0] + .6, path:glyph[1], accents:parts, cap:/[A-Z]/.test(base), base:base};
}
function characters(text) {
if (typeof Intl !== "undefined" && typeof Intl.Segmenter === "function") {
return Array.from(new Intl.Segmenter(undefined,{granularity:"grapheme"}).segment(text),(item) => item.segment);
}
return Array.from(text);
}
function layOutInk() {
if (!writing || !writing.vector || reader.hidden) return;
const svg = $("handwriting"), box = $("note-body");
const pixelWidth = Math.max(120,box.getBoundingClientRect().width);
if (Math.abs(pixelWidth - writing.width) < .6) return;
writing.width = pixelWidth;
const unit = pixelWidth < 415 ? 1.48 : 1.64;
const width = pixelWidth / unit, limit = width - 5, lineStep = 26;
let x = 2, y = 21, previousSpace = true;
const entries = writing.glyphs, paths = [], levels = [y];
const layer = svgNode("g", {fill:"none",stroke:"currentColor","stroke-width":"1.17","stroke-linecap":"round","stroke-linejoin":"round"});
function newline() { x = 2; y += lineStep; levels.push(y); }
entries.forEach(function (glyph, i) {
if (glyph.breakLine) { newline(); previousSpace = true; paths.push(null); return; }
if (glyph.space) { x += glyph.advance; previousSpace = true; paths.push(null); return; }
if (previousSpace) {
let wordWidth = 0;
for (let j = i; j < entries.length && !entries[j].space; j++) wordWidth += entries[j].advance;
if (x > 2.1 && x + wordWidth > limit) newline();
} else if (x + glyph.advance > limit) newline();
previousSpace = false;
const wobble = Math.sin(i * 1.73) * .36;
const letter = svgNode("g", {transform:"translate(" + x.toFixed(2) + " " + (y+wobble).toFixed(2) + ") rotate(" + (Math.sin(i*3.71)*1.1).toFixed(2) + ")"});
const path = svgNode("path",{d:glyph.path,pathLength:"1"});
letter.appendChild(path);
glyph.accents.forEach(function (mark) {
letter.appendChild(svgNode("path",{d:accents[mark],transform:glyph.cap && mark !== "\u0327" ? "translate(2 -7)" : "translate(0 0)"}));
});
if (i >= writing.revealed) letter.setAttribute("visibility","hidden");
paths.push(letter); layer.appendChild(letter);
x += glyph.advance;
});
const rules = svgNode("g",{fill:"none",stroke:"var(--rule)","stroke-width":".52",opacity:".69"});
levels.forEach(function (line) { rules.appendChild(svgNode("path",{d:"M0 " + (line+4.6) + "H" + width.toFixed(2)})); });
svg.replaceChildren(rules,layer);
svg.setAttribute("viewBox","0 0 " + width.toFixed(2) + " " + (y+10));
svg.style.height = ((y+10)*unit).toFixed(1) + "px";
writing.nodes = paths;
}
function showCharacters(count, animate) {
if (!writing) return;
const end = Math.min(count,writing.chars.length);
if (writing.vector) {
for (let i = writing.revealed; i < end; i++) {
const node = writing.nodes[i];
if (node) {
if (animate) node.firstElementChild.setAttribute("class","ink-stroke");
node.removeAttribute("visibility");
}
}
} else {
writing.shown.textContent = writing.chars.slice(0,end).join("");
writing.remaining.textContent = writing.chars.slice(end).join("");
}
writing.revealed = end;
}
function writeMessage(text) {
cancelAnimationFrame(inkFrame);
const chars = characters(text), glyphs = chars.map(penLetter);
const vector = glyphs.every(Boolean), access = $("written-access"), svg = $("handwriting");
writing = {chars:chars,glyphs:glyphs,vector:vector,nodes:[],width:0,revealed:0};
access.classList.toggle("visually-hidden",vector);
if (vector) {
access.textContent = text; svg.removeAttribute("hidden"); layOutInk();
} else {
svg.setAttribute("hidden","");
writing.shown = document.createElement("span"); writing.remaining = document.createElement("span");
writing.remaining.style.visibility = "hidden"; writing.remaining.setAttribute("aria-hidden","true");
writing.remaining.textContent = text; access.replaceChildren(writing.shown,writing.remaining);
}
if (reduceMotion.matches) { showCharacters(chars.length,false); return; }
const start = performance.now();
const moments = [];
let when = 550;
chars.forEach(function (ch, i) {
moments.push(when);
when += (chars.length > 180 ? 24 : 41) + (i % 5) * 2;
if (/[,.!?…\n]/u.test(ch)) when += 105;
});
function stroke(now) {
if (!writing || state !== "reading") return;
let next = writing.revealed;
while (next < chars.length && now - start >= moments[next]) next++;
if (next > writing.revealed) {
showCharacters(next,true);
if (next % 9 === 2) rustle(.042,.045);
}
if (next < chars.length) inkFrame = requestAnimationFrame(stroke);
}
inkFrame = requestAnimationFrame(stroke);
}
if (typeof ResizeObserver === "function") {
new ResizeObserver(layOutInk).observe($("note-body"));
} else { window.addEventListener("resize",layOutInk); }
function showReading(automatic) {
phase("reading");
reader.dataset.paper = lastLetter.paper;
$("note-to").textContent = "Dear " + lastLetter.to + ",";
$("signature").textContent = "With love, " + lastLetter.from;
desk.hidden = true; reader.hidden = false; reader.classList.add("reading");
writeMessage(lastLetter.message);
window.scrollTo({top:0,behavior:"auto"});
if (!automatic) $("note-to").focus({preventScroll:true});
announce("Your letter has opened under the moon.");
}
function openEnvelope(automatic) {
if (state !== "arrived" || !lastLetter) return;
const version = sceneVersion;
phase("unsealing"); soundCue("open");
sceneTimer = window.setTimeout(function () {
if (version === sceneVersion) showReading(automatic);
}, reduceMotion.matches ? 30 : 750);
}
hit.addEventListener("click",function () { unlockSound(); openEnvelope(false); });
$("back").addEventListener("click",function () {
cancelScene(); showDesk(); leaveEnvelope(false);
const firstField = $("compose-title");
firstField.setAttribute("tabindex","-1"); firstField.focus({preventScroll:true});
if (window.matchMedia("(max-width:850px)").matches) {
const top = window.scrollY + firstField.closest(".composer").getBoundingClientRect().top - 12;
window.scrollTo({top:Math.max(0,top),behavior:reduceMotion.matches ? "auto" : "smooth"});
} else { window.scrollTo({top:0,behavior:"auto"}); }
announce("Back at the letter desk.");
});
// The demonstration calls the same delivery, envelope and replay actions as the desk.
function clearDemoTimers() {
demoTimers.forEach((timer) => clearTimeout(timer)); demoTimers = [];
}
function stopDemo() {
if (!demoActive) return;
demoActive = false; clearDemoTimers();
if (state === "travel" || state === "unsealing") {
cancelScene(); leaveEnvelope(false);
} else if (state === "reading" && writing) {
cancelAnimationFrame(inkFrame); showCharacters(writing.chars.length,false);
}
}
function userTakesOver(event) {
stopDemo();
if (!event.target.closest || !event.target.closest("#sound")) unlockSound();
}
document.addEventListener("pointerdown",userTakesOver,{capture:true,passive:true});
document.addEventListener("touchstart",userTakesOver,{capture:true,passive:true});
document.addEventListener("keydown",userTakesOver,true);
document.addEventListener("mousedown",userTakesOver,{capture:true,passive:true});
document.addEventListener("wheel",stopDemo,{capture:true,passive:true});
const samples = [
{from:"Milo",to:"Cleo",message:starter,paper:"blush"},
{from:"Kit",to:"Lou",message:"Every path through the garden leads me back to you.",paper:"botanical"},
{from:"Jules",to:"Robin",message:"In a sky full of stars, you are still my favorite light.",paper:"moonbeam"}
];
function choosePaper(value) {
form.querySelector('input[value="' + value + '"]').checked = true;
if (state === "idle") stage.dataset.paper = value;
}
function demoLater(delay, action) {
demoTimers.push(window.setTimeout(function () { if (demoActive) action(); },delay));
}
function runDemoRound() {
if (!demoActive) return;
clearDemoTimers();
const index = demoRound++ % samples.length, sample = samples[index];
lastLetter = null; readyAtDesk();
$("sender").value = sample.from; $("recipient").value = sample.to;
message.value = sample.message; countMessage();
choosePaper(samples[(index+1)%samples.length].paper);
window.scrollTo({top:0,behavior:"auto"});
demoLater(650,() => choosePaper(samples[(index+2)%samples.length].paper));
demoLater(1270,() => choosePaper(sample.paper));
demoLater(2050,() => deliver(captureLetter(),true));
demoLater(7300,() => {
if (state === "travel") { cancelScene(); leaveEnvelope(false); }
openEnvelope(true);
});
demoLater(15850,() => { if (lastLetter) deliver(lastLetter,true); });
demoLater(20700,runDemoRound);
}
function checkDemo() {
if (window.location.hash === "#demo") {
if (!demoActive) { demoActive = true; demoRound = 0; runDemoRound(); }
} else { stopDemo(); }
}
window.addEventListener("hashchange",checkDemo);
checkDemo();
})();
</script>
</body>
</html>
