/* Our Little Garden · continuous paper-and-flower motion
   Readable romantic typography, a separate scene region, and deliberate controls. */
:root{--cream:#fff4e5;--paper:#fff7ed;--ink:#51394e;--muted:#71576a;--gold:#efca9a;--rose:#b77994;--ui-background:#51445f;--ui-border:#d2b6c8;--motion-fast:180ms;--motion-enter:600ms;--motion-scene:2400ms}
html,body{height:auto;min-height:100svh}body{position:relative;overflow-x:hidden;overflow-y:auto;font-size:16px}main{position:relative;min-height:100svh;outline:none}
.veil{background:linear-gradient(90deg,rgba(45,34,64,.78),rgba(60,44,75,.52) 39%,rgba(72,52,81,.12) 68%,rgba(67,48,80,.04));}
.atmosphere{filter:saturate(.83)}
#sceneFrame{left:44%;right:0;top:13%;bottom:10%;width:auto;height:auto;z-index:2}
.masthead{padding:26px 5%;gap:20px}.wordmark-caption{font-size:11px;letter-spacing:.5px;line-height:1.5}.wordmark-number{font-size:48px}.header-actions{gap:20px;font-size:13px}.sound-button,.edit-button,.motion-button{min-height:44px;font-size:12px}.motion-button{display:flex;align-items:center;gap:8px;padding:8px 0}.motion-button[aria-pressed=true]{color:var(--gold)}.header-actions button:active{opacity:.7}.header-divider{display:none}
.story-panel{position:absolute;left:8%;top:23%;max-width:40%;width:540px;animation-duration:var(--motion-enter)}
.eyebrow{font-size:11px;letter-spacing:2.2px;line-height:1.7;margin-bottom:22px;color:#f5dfd1}h1{font-size:clamp(60px,5.6vw,92px);line-height:1.03;letter-spacing:-1.5px;margin-bottom:26px}h2{font-size:clamp(53px,4.8vw,77px);line-height:1.03;letter-spacing:-1.4px;text-wrap:balance}
.intro-description{font-size:15px;line-height:1.8;color:#fff0e4;margin-bottom:28px;max-width:400px;text-shadow:0 1px 15px #38213c26}.primary-button{min-height:52px;font-size:13px;letter-spacing:.1px;padding:0 25px;gap:30px;background:var(--cream);border-color:var(--cream);color:#52364e;backdrop-filter:none;box-shadow:0 8px 30px #2b193221;transition:transform var(--motion-fast),background var(--motion-fast),box-shadow var(--motion-fast)}
.primary-button:hover{background:#fffaf1;box-shadow:0 10px 33px #241a3433}.primary-button:active{transform:scale(.98)}.primary-button>span:last-child{font-size:23px}.tiny-note{font-size:18px;color:#f5dfd0;line-height:1.6;margin-top:19px}.text-button{font-size:13px;min-height:44px;color:#fff0e3}.seal-cue{left:80%;top:72%;color:#fff2de}.seal-cue>span:first-child{font-size:25px}
.footer{left:5%;right:5%;bottom:22px;min-height:44px;gap:20px}.draft-label{font-size:11px;line-height:1.6;max-width:240px;color:#fff0df}.recipient-note{font-family:var(--serif);font-size:17px;font-style:italic;color:#fff0df}.footer-whisper{font-size:18px;color:#fff0df}.chapter-nav{gap:15px}.chapter-nav button{min-height:44px;min-width:55px;color:#f2decf;gap:9px}.chapter-nav small{font-size:11px}.chapter-nav button[aria-current=step]{font-weight:600}.chapter-nav button[aria-current=step]>span{width:7px;height:7px}.next-chapter{font-size:12px;min-height:44px;gap:15px}.next-chapter>span:last-child{font-size:22px}
.chapter-heading{position:absolute;top:15%;left:8%;right:8%;z-index:5}.chapter-heading .eyebrow{margin-bottom:14px}.chapter-heading h2{font-size:clamp(44px,4vw,61px);margin-bottom:15px;line-height:1.04}.chapter-heading>p:last-child{font-size:14px;color:#fff0e4;line-height:1.7}
body[data-step="2"] #sceneFrame{left:12%;right:12%;top:33%;bottom:17%}
.memory-choices{bottom:113px;gap:20px;max-width:82%;width:auto}.memory-choices button{font-size:12px;min-height:44px;gap:10px;padding:8px 12px;color:#fff3e6;border-bottom-color:#ead7c2a6;max-width:240px;text-shadow:0 1px 8px #31203a80}.memory-choices .choice-number{font-size:25px}.secret-choices{gap:6px;max-width:340px}.secret-choices button{font-size:14px;min-height:44px;padding:10px 0;gap:15px;color:#fff2e4}.secret-choices button:hover .secret-dot{transform:scale(1.3)}.secret-choices button[data-read=true]::after{content:'✓';color:#f2d2ae;margin-left:auto}.secret-signature{font-size:12px;color:#785f72}
.memory-dialog{width:980px}.memory-image-wrap{display:flex;align-items:center;justify-content:center;min-height:470px;background:#e7d6df}.memory-image-wrap img{object-fit:contain;min-height:0;height:100%;max-height:78dvh;position:absolute;inset:0}.memory-image-wrap>span{font-size:10px;background:#443349d9;padding:7px 12px}.memory-copy{padding:70px 40px 35px}.memory-copy h2{font-size:49px}.memory-copy .eyebrow{font-size:10px;color:#826074}.memory-copy>p:last-of-type{font-size:15px;line-height:1.8;color:#654c60}.dialog-navigation span{font-size:12px;color:#795b71}.dialog-navigation button{width:44px;height:44px}.close-button{width:44px;height:44px;color:#64475e;background:#fff7edea}
.secret-dialog{width:520px;padding:52px 44px 42px}.secret-dialog .eyebrow{font-size:11px;letter-spacing:1.6px;color:#795b70}.secret-dialog #secretMessage{font-size:37px;line-height:1.35}.secret-flower{color:#ac7c39}.letter-dialog{width:720px}.letter-paper{padding:66px 66px 32px}.letter-paper .eyebrow{font-size:10px;color:#886378;line-height:1.8}.letter-paper h2{font-size:46px}.letter-paper #letterBody p{font-size:16px;line-height:1.85;color:#61465b}.letter-signature{font-size:30px;color:#725368}.letter-paper>.text-button{color:#79596e;font-size:13px}.letter-end{color:#957455}
.toast{font-size:13px;padding:13px 21px;line-height:1.6;color:#60445a}.editor-dialog{width:840px}.editor-dialog form{padding:36px 40px}.editor-top h2{font-size:42px}.editor-top .eyebrow{font-size:10px;color:#866174}.editor-explanation{font-size:13px;line-height:1.8;color:#70576a}.editor-dialog label{font-size:12px;color:#674b60}.editor-dialog input:not([type=file]),.editor-dialog textarea{font-size:16px;border-color:#b9a0b1;color:#513a4e;line-height:1.7}.field-hint{font-size:11px;color:#785e72}.editor-actions .primary-button{font-size:12px;min-height:48px;background:#775569;border-color:#775569;color:#fff6e9}.secondary-button,.editor-dialog .import-button{font-size:12px;min-height:46px;color:#664c60;border-color:#bda5b6;padding:12px 15px}.editor-status{font-size:12px;color:#6d4f64;line-height:1.7}.music-upload input{font-size:12px}.secrets-edit legend{font-size:13px;color:#715165}.recipient-preview-link{display:inline-flex;font-size:13px;color:#765468;min-height:44px;align-items:center;margin:-13px 0 20px;text-underline-offset:4px}
.memory-editor{grid-template-columns:120px 1fr;gap:20px;position:relative;padding-bottom:12px}.upload-preview img{width:120px;height:145px;object-fit:contain;background:#e8d9df}.upload-preview span{font-size:12px;background:#fff6ed;color:#634759}.upload-preview:has(input:focus-visible){outline:2px solid #8f5f7d;outline-offset:5px;border-radius:4px}.accessible-file{position:absolute!important;width:1px!important;height:1px!important;clip-path:inset(50%);overflow:hidden;white-space:nowrap}.memory-tools{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px}.memory-tools button{min-height:44px;padding:8px 12px;border:1px solid #ccb3c3;border-radius:5px;color:#6f4e64;font-size:12px}.memory-tools .remove-memory{margin-left:auto;color:#9b3e60;border-color:#d5afba}.memory-tools button:disabled{opacity:.4;cursor:default}.editor-dialog .add-memory{color:#795469;font-size:13px}.skip-link{position:fixed;z-index:200;top:12px;left:20px;padding:13px 18px;background:#fff3e2;color:#4b3048;transform:translateY(-150%);border-radius:6px;font-size:14px}.skip-link:focus{transform:none}
.fallback-envelope{left:59%;top:42%;width:300px;height:195px}.fallback-envelope button{transition:transform .4s}.fallback-envelope button:hover{transform:rotate(2deg)}
@media(min-width:1600px){.story-panel{left:12%;top:25%;max-width:38%}#sceneFrame{left:47%;right:3%}}
@media(max-width:1100px) and (min-width:761px){.story-panel{left:7%;max-width:43%;top:23%}h1{font-size:60px}h2{font-size:53px}.intro-description{font-size:14px;line-height:1.7}.eyebrow{font-size:10px}.tiny-note{font-size:16px;max-width:340px}.header-actions{gap:15px}.wordmark-caption{font-size:10px}#sceneFrame{left:48%;right:0;top:18%;bottom:15%}.chapter-nav{gap:10px}.chapter-nav small{font-size:10px}.chapter-nav i{width:6px}.recipient-note{font-size:14px}.next-chapter{font-size:11px;gap:7px}.footer .draft-label{font-size:10px;max-width:170px}.footer{left:4%;right:4%}.chapter-heading{top:16%}.chapter-heading h2{font-size:48px}}
@media(max-height:750px) and (min-width:761px){.story-panel{top:21%}h1{font-size:59px}h2{font-size:53px}.eyebrow{margin-bottom:17px}.intro-description{margin-bottom:22px}.tiny-note{margin-top:16px}.chapter-heading{top:16%}#sceneFrame{top:16%;bottom:14%}}
@media(max-width:760px){
  .veil{background:linear-gradient(180deg,rgba(48,36,67,.66),rgba(58,43,75,.62) 39%,rgba(71,48,80,.13) 74%,rgba(55,39,73,.3))}
  .masthead{padding:19px 6%;gap:12px}.wordmark-number{font-size:39px}.wordmark-caption{font-size:9px;letter-spacing:.1px;padding-left:10px}.wordmark{gap:12px}.header-actions{gap:16px}.sound-button{gap:7px;font-size:11px}.edit-button{font-size:11px}.motion-button{padding:8px;min-width:44px;margin-right:-7px}.motion-button>span{display:none}.header-actions .header-divider{display:none}
  .story-panel{top:114px;left:8%;right:8%;max-width:none;width:auto}.eyebrow{font-size:10px;letter-spacing:1.8px;margin-bottom:15px;line-height:1.7}.eyebrow>span{width:20px}h1{font-size:clamp(43px,11.8vw,65px);line-height:1.03;letter-spacing:-.8px;margin-bottom:19px}h2{font-size:clamp(42px,11.3vw,61px);line-height:1.02;letter-spacing:-.9px;margin-bottom:20px}
  .intro-description{font-size:14px;line-height:1.75;margin-bottom:22px;max-width:340px}.primary-button{min-height:49px;padding:0 22px;font-size:12px;gap:27px}.tiny-note{display:none!important}.seal-cue{display:none}#sceneFrame{left:0;right:0;top:49%;bottom:10%;height:auto;width:auto}.footer{left:6%;right:6%;bottom:calc(12px + env(safe-area-inset-bottom));min-height:44px;gap:12px}.recipient-note{font-size:13px;max-width:160px}.draft-label{font-size:10px;max-width:165px}.footer-whisper{display:none!important}.chapter-nav{position:fixed;bottom:calc(57px + env(safe-area-inset-bottom));gap:11px;width:auto;max-width:92%;justify-content:center}.chapter-nav button{gap:7px;min-width:46px}.chapter-nav small{font-size:10px}.chapter-nav i{width:7px}.next-chapter{font-size:11px;gap:8px;line-height:1.5;max-width:145px}.next-chapter>span:last-child{font-size:20px}.chapter-heading{position:absolute;top:119px;left:8%;right:8%;text-align:left}.chapter-heading .eyebrow{justify-content:flex-start;margin-bottom:16px}.chapter-heading h2{font-size:43px;line-height:1.04;margin-bottom:15px}.chapter-heading>p:last-child{font-size:13px;line-height:1.7;max-width:280px}
  body[data-step="2"] #sceneFrame{left:0;right:0;top:36%;bottom:17%}.memory-choices{bottom:calc(111px + env(safe-area-inset-bottom));width:91%;max-width:none;gap:8px}.memory-choices button{font-size:11px;gap:7px;padding:7px 4px;max-width:34%;min-width:0;line-height:1.5}.memory-choices .choice-number{font-size:23px;flex-shrink:0}.memory-choices button[aria-label]{max-width:30px;flex-shrink:0}.memory-choices button:only-child{max-width:100%}
  .secrets-panel{top:110px!important}.secrets-panel h2{font-size:43px}.secrets-panel .intro-description{font-size:13px;margin-bottom:15px}.secret-choices{gap:3px;max-width:290px}.secret-choices button{font-size:13px;min-height:44px;padding:8px 0}.secret-choices button::after{font-size:12px}body[data-step="3"] #sceneFrame{top:55%;bottom:10%}.finale-panel h2{font-size:47px}.finale-panel .intro-description{font-size:13px;margin-bottom:20px}.finale-panel .text-button{font-size:12px;padding-top:13px}body[data-step="4"] #sceneFrame{top:55%;bottom:10%}
  .memory-dialog{width:500px;max-height:90dvh}.memory-image-wrap{height:300px;min-height:0;max-height:44dvh}.memory-image-wrap img{max-height:100%;height:100%;min-height:0}.memory-copy{padding:29px 27px 23px}.memory-copy h2{font-size:39px;margin-bottom:19px}.memory-copy .eyebrow{font-size:10px;margin-bottom:13px}.memory-copy>p:last-of-type{font-size:15px;line-height:1.8}.dialog-navigation{margin-top:22px}.dialog-navigation span{font-size:12px}.close-button{top:12px;right:12px}.secret-dialog{padding:45px 27px 35px}.secret-dialog .eyebrow{font-size:10px}.secret-dialog #secretMessage{font-size:31px;line-height:1.35}.secret-signature{font-size:12px}.letter-paper{padding:58px 27px 26px}.letter-paper h2{font-size:38px}.letter-paper .eyebrow{font-size:9px;letter-spacing:1.5px;margin-bottom:29px}.letter-paper #letterBody p{font-size:16px;line-height:1.85}.letter-signature{font-size:28px}.letter-paper>.text-button{font-size:12px}.editor-dialog form{padding:27px 23px}.editor-top h2{font-size:34px}.editor-explanation{font-size:13px}.editor-dialog label{font-size:12px}.memory-editor{grid-template-columns:88px 1fr;gap:15px}.upload-preview img{width:88px;height:118px}.upload-preview span{font-size:10px;padding:5px 2px}.editor-dialog input:not([type=file]),.editor-dialog textarea{font-size:16px}.editor-top .eyebrow{font-size:9px}.editor-actions .primary-button{font-size:12px}.secondary-button,.editor-dialog .import-button{font-size:12px}.field-hint,.editor-status{font-size:11px}.music-upload input{font-size:12px}.toast{font-size:12px;bottom:113px}.memory-tools{gap:7px}.memory-tools button{font-size:11px;padding:8px 9px}.fallback-envelope{left:calc(50% - 110px);top:64%;width:220px;height:145px}body.no-webgl .memory-choices{bottom:28%}body.no-webgl[data-step="3"] .fallback-envelope,body.no-webgl[data-step="4"] .fallback-envelope{top:66%}
}
@media(max-width:380px){.wordmark-caption{display:none}.header-actions{gap:12px}.story-panel{left:7%;right:7%}h1{font-size:43px}.chapter-heading h2{font-size:37px}.eyebrow{font-size:9px}.recipient-note{font-size:12px;max-width:135px}.chapter-nav{gap:9px}.chapter-nav small{font-size:9px}.memory-choices button{font-size:10px}.memory-choices .choice-number{font-size:20px}.next-chapter{font-size:10px;max-width:130px}.secrets-panel h2{font-size:40px}.secrets-panel .intro-description{font-size:12px}.finale-panel h2{font-size:43px}}
@media(max-height:720px) and (max-width:760px){.masthead{padding-top:12px}.story-panel{top:91px}.story-panel .eyebrow{margin-bottom:11px}h1{font-size:38px;margin-bottom:16px}h2{font-size:36px;margin-bottom:16px}.intro-description{font-size:13px;line-height:1.7;margin-bottom:16px}.primary-button{min-height:46px}.chapter-heading{top:97px}.chapter-heading h2{font-size:35px}.chapter-heading>p:last-child{font-size:12px}.chapter-heading .eyebrow{margin-bottom:11px}#sceneFrame{top:54%;bottom:11%}body[data-step="2"] #sceneFrame{top:37%;bottom:20%}.secrets-panel{top:94px!important}.secrets-panel h2{font-size:35px}.secrets-panel .intro-description{font-size:12px;line-height:1.6;margin-bottom:9px}.secret-choices button{font-size:12px;min-height:40px;padding:5px 0}.secret-choices{gap:0}body[data-step="3"] #sceneFrame{top:62%;bottom:10%}.finale-panel h2{font-size:37px}.finale-panel .intro-description{font-size:12px;line-height:1.65;margin-bottom:15px}.finale-panel .text-button{font-size:11px;min-height:38px;padding:10px 0}body[data-step="4"] #sceneFrame{top:61%;bottom:10%}.footer{bottom:8px}.chapter-nav{bottom:48px}.memory-choices{bottom:100px}}
@media(max-height:500px) and (max-width:900px){body{overflow-y:auto}.masthead{position:absolute}.story-panel{position:relative;top:auto!important;left:auto;right:auto;padding-top:110px;margin:0 0 80px 7%;max-width:50%;width:420px}main{min-height:660px}#sceneFrame{position:absolute;top:105px!important;left:49%!important;right:0!important;bottom:auto!important;height:420px!important}.chapter-heading{position:relative;top:auto;padding-top:105px;left:auto;right:auto;width:84%;margin:auto}.footer{position:absolute;top:auto;bottom:10px}.chapter-nav{position:absolute;bottom:45px}.memory-choices{position:absolute;bottom:105px}.story-panel h1{font-size:46px}.story-panel h2{font-size:42px}body[data-step="2"] #sceneFrame{left:15%!important;right:15%!important;top:240px!important;height:260px!important}body[data-step="2"] main{min-height:740px}.chapter-heading h2{font-size:40px}.recipient-note{font-size:12px}.secrets-panel{padding-top:100px}.secret-choices button{min-height:44px}.memory-dialog[open]{display:grid;grid-template-columns:1fr 1fr}.memory-image-wrap{height:100%;min-height:250px;max-height:none}.memory-copy{padding:55px 25px 25px}.memory-copy h2{font-size:32px}}
body[data-motion="still"] .atmosphere{animation:none;transform:none}body[data-motion="still"] .sound-bars i,body[data-motion="still"] .story-panel,body[data-motion="still"] .seal-cue{animation:none}body[data-motion="still"] .primary-button:hover{transform:none}
@media(max-width:760px){body[data-mode="edit"] .wordmark-caption{display:none}body[data-mode="edit"] .header-actions{gap:12px}}
body[data-motion="still"] .atmosphere,body[data-motion="still"] .sound-bars i{animation-play-state:paused!important}
.motion-button.needs-play{padding:8px 12px;border:1px solid #fff1dc70;border-radius:24px;background:#fff0df12;color:#fff3e3}
.card-toggle{display:inline-flex;align-items:center;gap:10px;padding:8px 0;min-height:44px;font-size:12px;color:#fff2df;line-height:1.5;text-align:left}.card-toggle>span{font-size:20px}
@media(max-width:760px){.wordmark-caption{display:none}.motion-button{padding:8px 6px;margin-right:0;gap:7px;min-width:0}.motion-button>span{display:inline;font-size:11px}.motion-button.needs-play{padding:8px 10px}.header-actions{gap:12px}.card-toggle{font-size:11px;max-width:145px;gap:7px}body[data-mode="edit"] .header-actions{gap:8px}body[data-mode="edit"] #soundLabel{display:none}body[data-mode="edit"] .sound-button{min-width:38px;justify-content:center}}

/* A fixed canvas keeps projection continuous; the responsive frame is only a target. */
#scene{position:fixed!important;inset:0!important;width:100%!important;height:100%!important}
#sceneFrame{position:fixed;pointer-events:none;visibility:hidden}
body[data-step="2"] #sceneFrame{bottom:24%}
.envelope-hit{position:fixed;left:0;top:0;z-index:3;border:0;background:transparent;padding:0;border-radius:12px;cursor:pointer;will-change:transform}
.story-panel,.chapter-heading{animation:none!important}
h1[tabindex="-1"]:focus,h2[tabindex="-1"]:focus{outline:none}
.story-panel[inert],.chapter-heading[inert]{pointer-events:none}
.story-panel[inert] button,.story-panel[inert] .secret-choices{pointer-events:none}
dialog[open]{animation:none;transform-origin:50% 58%}
dialog::backdrop{animation:backdrop-in .4s ease both;transition:opacity .3s ease}
dialog[data-closing]::backdrop{opacity:0;animation:none}
@keyframes backdrop-in{from{opacity:0}to{opacity:1}}
.card-toggle{flex-shrink:0;position:relative;z-index:1}.card-toggle>span:first-child{font-size:inherit}
body[data-mode="edit"] .card-toggle{margin-left:auto;margin-right:15px}
@media(min-width:761px){body[data-step="0"] .card-toggle{margin-left:auto;margin-right:15px}}
@media(max-width:760px){.card-toggle{max-width:112px}body[data-mode="edit"] .card-toggle{margin-right:0}.footer-whisper{display:none!important}}
body[data-motion="still"] dialog::backdrop{animation:none;transition:none}
