:root{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:#fff;background:#a2bcd5;font-size:16px;color-scheme:light}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}button,input,textarea{font:inherit}button{color:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:focus-visible,input:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:3px solid #fff;outline-offset:3px}button{border:1px solid #fff8;background:#ffffff10;border-radius:24px;min-height:40px;padding:8px 17px;font-size:14px}button:hover{background:#ffffff25}button:disabled{opacity:.35;cursor:default}button[aria-pressed=true],button.selected{background:#fff;color:#403c37}button.solid{background:#fff;color:#3e5365;border-color:#fff}img{max-width:100%;user-select:none;-webkit-user-drag:none;object-fit:contain}#app{--paper:#a2bcd5;position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;background:var(--paper);display:flex;flex-direction:column;transition:background .4s;padding:0 max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left));overflow:hidden}header{flex:none;height:48px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #fff3;margin:0 8px}.brand{border:0;background:none;padding:5px 0;font-weight:600;letter-spacing:.12em;font-size:14px}.brand span{opacity:.8;font-size:12px;margin-left:12px;font-weight:400;letter-spacing:.06em}.header-actions{display:flex;gap:8px}.header-actions button{min-height:34px;padding:5px 13px;font-size:13px}#book{flex:1;min-height:0;position:relative;perspective:1800px}.scene{height:100%;display:grid;grid-template-columns:34% 66%;max-width:1320px;margin:auto;transform-origin:left center}.scene.arrive{animation:turn-in .45s cubic-bezier(.2,.7,.3,1)}@keyframes turn-in{from{transform:rotateY(-10deg) translateX(18px);opacity:.45}to{transform:none;opacity:1}}.story{border-right:1px solid #fff3;padding:clamp(12px,2vw,34px);display:flex;flex-direction:column;gap:10px;min-height:0;overflow-y:auto}.mode{font-size:12px;letter-spacing:.15em;opacity:.8;margin:0}.chapter-title{height:clamp(64px,20vh,125px);width:100%;object-position:left center;flex:none}.story>p:not(.mode){font-size:16px;line-height:1.7;margin:0}.story .caption{font-size:12px!important;opacity:.75;margin-top:auto!important}.play{position:relative;padding:clamp(12px,2vw,30px);display:flex;flex-direction:column;gap:10px;min-width:0;min-height:0}.art-stage{position:relative;flex:1;min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden;border-radius:3px}.art-stage>img{height:100%;width:100%;object-fit:contain}.tools{display:flex;justify-content:center;gap:6px;flex:none;flex-wrap:wrap}.tools button{font-size:13px;padding:5px 12px;min-height:36px}.feedback{font-size:14px;line-height:1.55;min-height:22px;text-align:center;margin:0;flex:none}.small-art{display:flex;gap:10px;min-height:0;flex:1;max-height:100px}.small-art img{width:45%;object-position:left center}.dandelion-picture{height:100%;aspect-ratio:367/565;position:relative}.dandelion-picture>img{height:100%;width:100%;display:block}.wind-stage{touch-action:none}#seal{position:absolute;left:1%;top:87%;width:24%;height:13%;padding:0;min-height:0;border:0;background:transparent;border-radius:50%}#seal.finding{outline:2px dashed #9e5940;outline-offset:-5px}#composition{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}#composition path{stroke:#aa6337;stroke-width:3;fill:none;stroke-dasharray:9 5}.particle-layer{position:absolute;inset:0;pointer-events:none;overflow:hidden}.particle{position:absolute;width:22px;height:38px;object-fit:contain;pointer-events:none;animation:drift 2.8s ease-out forwards;filter:drop-shadow(0 1px 2px #47351c44)}@keyframes drift{from{transform:translate(0,0) rotate(0);opacity:1}to{transform:translate(var(--dx),var(--dy)) rotate(var(--spin));opacity:0}}.forest{cursor:pointer;touch-action:manipulation}.runner{position:absolute!important;bottom:9%;left:70%;height:35%!important;width:24%!important;object-fit:contain;animation:run 3s linear infinite;filter:drop-shadow(0 2px 3px #49392622)}@keyframes run{0%{left:78%;bottom:3%;transform:rotate(-4deg)}50%{transform:rotate(4deg)}100%{left:0%;bottom:38%;transform:rotate(-4deg)}}.leaf-particle{height:24px;width:24px}.rain-reference{flex:1;min-height:0;max-height:160px;object-position:left center}.rain-play{justify-content:center}.rain-options,.rain-sequence{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.rain-options button{font-size:14px;min-height:62px;padding:9px;touch-action:none;border-radius:8px;background:#ffffff14}.rain-options button.used{opacity:.45}.rain-sequence{margin:10px 0}.rain-sequence button{min-height:100px;border-radius:8px;border:1.5px dashed #fff8;display:flex;flex-direction:column;gap:10px;align-items:center;justify-content:center;padding:10px}.rain-sequence span{font-size:22px;font-family:Georgia,serif;font-weight:bold}.rain-sequence b{font-size:14px;font-weight:400}.rain-sequence button.filled{border-style:solid;background:#fff2}.rain-sequence button.correct{background:#fff;color:#61493e}.drag-ghost{position:fixed;z-index:100;pointer-events:none;padding:13px;border:1px solid #fff;border-radius:8px;background:#d09383;color:white;font-size:14px;transform:translate(-50%,-50%);box-shadow:0 5px 20px #0002}.rain-play>#rain-animation{position:absolute;inset:0;pointer-events:none;overflow:hidden}.rain-drop{height:25px;width:15px;animation:fall 1.3s ease-in forwards}@keyframes fall{from{transform:translateY(-40px);opacity:.8}to{transform:translateY(230px);opacity:0}}.tabs{display:flex;gap:8px}.tabs button{font-size:13px;padding:5px 13px}.mood-match{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;justify-content:space-between;padding:0 0 5px}.art-choices,.emotion-choices{position:relative;display:grid;grid-template-columns:repeat(4,1fr);gap:12px;z-index:1}.art-choices{height:40%}.art-choices button{padding:5px;border:1px solid #fff5;border-radius:4px;min-height:0}.art-choices img{height:100%;width:100%}.emotion-choices{height:25%}.emotion-choices button{padding:4px;border:0;background:transparent;min-height:0}.emotion-choices img{height:100%;width:100%}#mood-lines{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}#mood-lines path{stroke:#fff;stroke-width:4;fill:none;stroke-linecap:round;opacity:.85}.face-reference{min-height:0;max-height:150px;flex:1;object-position:left center}.drawing-panel{display:flex;flex-direction:column;gap:9px;flex:1;min-height:0}.draw-surface{position:relative;flex:1;min-height:0;overflow:hidden;border:1px solid #fff8;border-radius:3px}.draw-surface canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:crosshair}.face-surface{background:#ffffff08;border:0}.face-surface>img{height:92%;width:100%;position:absolute;inset:4% 0;pointer-events:none}.gift-surface{background:#fffaf0}.canvas-placeholder{position:absolute;inset:0;display:grid;place-items:center;color:#b9b1a1;font-size:17px;pointer-events:none}.draw-tools{display:flex;gap:6px;align-items:center;justify-content:center;flex-wrap:wrap;flex:none}.draw-tools button{min-height:32px;padding:4px 9px;font-size:12px}.draw-tools .swatch{width:32px;height:32px;border-radius:50%;padding:5px;background:var(--ink);border:3px solid transparent;background-clip:padding-box}.swatch[aria-pressed=true]{border-color:white;box-shadow:0 0 0 1px #66594a55}.fan-pair{display:flex;gap:6px;max-height:83px;min-height:0}.fan-pair img{width:49%;object-fit:contain}.recipient{font-size:13px;margin-top:auto;display:block}.recipient input{display:block;width:100%;border:0;border-bottom:1px solid #fff8;color:white;background:transparent;border-radius:0;font-size:14px;padding:7px 0;outline-offset:0}input::placeholder,textarea::placeholder{color:#fff9}.hero-illustration{min-height:0;max-height:190px;flex:1;object-position:left bottom}.powers{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.powers button{display:flex;flex-direction:column;align-items:center;gap:8px;padding:10px 4px;font-size:13px;border-radius:12px}.powers img{height:60px;width:70px;object-fit:contain}.powers button.selected img{filter:brightness(.5) sepia(.2)}.hero-play{justify-content:center}.wish-label{font-size:15px}textarea{resize:none;width:100%;min-height:68px;border:1px solid #fff8;border-radius:6px;background:#ffffff14;padding:10px;color:white;font-size:16px;line-height:1.5}.welcome{grid-template-columns:48% 52%}.intro-title{padding:24px 6%;border-right:1px solid #fff4;display:flex;flex-direction:column;justify-content:center}.intro-title>p{font-size:13px;letter-spacing:.12em}.intro-title h1{font-family:"Kaiti SC",KaiTi,serif;font-size:clamp(42px,8vh,80px);font-weight:500;line-height:1.3;margin:10px 0;letter-spacing:.16em}.sense-list{display:flex;flex-wrap:wrap;gap:8px 15px;max-width:240px;font-size:12px;opacity:.85}.intro-copy{position:relative;padding:24px 9%;display:flex;flex-direction:column;justify-content:center}.intro-copy h2{font-weight:500;font-size:22px;margin:0 0 12px}.intro-copy p{font-size:16px;line-height:1.8;margin:7px 0}.intro-copy .solid{align-self:flex-start;margin-top:12px;padding:10px 25px;min-height:44px}.welcome-seed{position:absolute;width:30px;height:48px;right:8%;top:12%;transform:rotate(-22deg);opacity:.7}footer{height:48px;flex:none;display:flex;align-items:center;justify-content:space-between;margin:0 8px;border-top:1px solid #fff3}footer>button{font-size:13px;border:0;padding:7px 9px;min-width:90px}#pages{display:flex;gap:3px}#pages button{font-size:12px;width:32px;height:32px;min-height:32px;padding:0;border:0;background:transparent;border-radius:50%;opacity:.6}#pages button[aria-current=page]{background:#fff;color:#594e45;opacity:1}.overlay{position:absolute;inset:0;z-index:200;background:#fffaf3;color:#3b3832;display:flex;flex-direction:column}.overlay-bar{height:48px;flex:none;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e8ded0;padding:0 20px;font-size:14px}.overlay-bar button{border:0;color:#66503c;font-size:16px}.overlay-content{padding:20px clamp(20px,5vw,64px);overflow:auto;min-height:0;flex:1;touch-action:pan-y pinch-zoom}.overlay-content p{font-size:19px;line-height:1.85;max-width:48rem;margin:0 auto 1em;text-indent:2em}.overlay-content img{display:block;max-height:70vh;max-width:100%;margin:0 auto 15px;user-select:auto}.overlay-content .save-link{display:block;width:max-content;margin:15px auto;padding:12px 22px;background:#526f7e;color:white;text-decoration:none;border-radius:22px}.notice{position:absolute;z-index:300;bottom:55px;left:50%;transform:translateX(-50%);background:#38434deb;border-radius:9px;color:#fff;padding:10px 18px;font-size:14px;max-width:80%;margin:0;text-align:center;pointer-events:none}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}[hidden]{display:none!important}
@media(orientation:portrait){#app{inset:auto;left:50%;top:50%;width:100dvh;height:100vw;transform:translate(-50%,-50%) rotate(90deg)}.chapter-title{height:clamp(60px,18vw,110px)}.overlay-content img{max-height:65vw}.intro-title h1{font-size:clamp(42px,14vw,72px)}}
@media(max-height:420px) and (orientation:landscape){header{height:40px}footer{height:40px}.story,.play{padding:12px 18px;gap:7px}.story>p:not(.mode){font-size:14px;line-height:1.6}.chapter-title{height:68px}.feedback{font-size:13px}.small-art{max-height:68px}.rain-sequence button{min-height:76px}.rain-options button{min-height:49px}.powers img{height:44px}.hero-illustration{max-height:110px}.intro-copy p{font-size:14px}.intro-title{padding:15px 6%}}
@media(prefers-reduced-motion:reduce){.scene.arrive{animation:none}.particle,.runner,.rain-drop{animation-duration:.01ms;animation-iteration-count:1}#app{transition:none}}
/* Keep the original white brush lettering, with dark, readable touch instructions. */
header,footer,.story>p,.feedback,.tools,.tabs,.rain-options,.rain-sequence,.draw-tools,.powers,.wish-label,.recipient,.intro-copy,.intro-title>p,.sense-list{color:#293e49}.story .mode{opacity:.8}.story .caption{opacity:.85}.recipient input,textarea{color:#293e49}input::placeholder,textarea::placeholder{color:#526875}.draw-tools .swatch{width:36px;height:36px}.draw-tools button{min-height:36px}.tools button,.tabs button{background:#ffffff25}#seal{min-width:36px;min-height:32px}
@media(orientation:portrait) and (max-width:420px){header,footer{height:40px}.story,.play{padding:12px 18px;gap:7px}.story>p:not(.mode){font-size:14px;line-height:1.6}.feedback{font-size:13px}.small-art{max-height:68px}.rain-sequence button{min-height:76px}.rain-options button{min-height:49px}.powers img{height:44px}.hero-illustration{max-height:110px}.intro-copy p{font-size:14px}.intro-title{padding:15px 6%}}

/* Artwork export: keep the action beside the image in the landscape reader. */
.overlay-content:has(>.export-layout){overflow:hidden;padding:16px clamp(16px,4vw,48px)}
.export-layout{height:100%;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) clamp(132px,20%,200px);gap:clamp(16px,3vw,40px);align-items:center}
.overlay-content .export-layout>img{width:100%;height:100%;min-width:0;min-height:0;max-height:100%;margin:0;object-fit:contain}
.export-actions{display:flex;flex-direction:column;gap:12px;align-items:center}
.overlay-content .export-actions .save-link{margin:0;width:100%;padding:12px 14px;text-align:center;white-space:nowrap}
.overlay-content .export-actions p{font-size:14px;line-height:1.6;text-align:center;text-indent:0;margin:0;color:#796e61}
/* Approved welcome spread and static rain reading page. */
.welcome{grid-template-columns:27% 73%;align-items:stretch;position:relative;isolation:isolate}
.welcome .intro-title{position:relative;border:0;padding:24px 12px;gap:24px;min-height:0;justify-content:center;align-items:center}
.welcome .intro-title h1{display:flex;justify-content:center;min-height:0;flex:0 1 68%;height:68%;width:100%;margin:0;line-height:1}
.welcome .intro-title h1 img{width:100%;height:100%;object-fit:contain}
.sense-icons{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;flex:none;align-items:center;width:100%;max-width:240px}
.sense-icons img{width:100%;aspect-ratio:1;object-fit:contain}
.sense-icons img:last-child{transform:scale(1.14)}
.intro-seed{position:absolute;width:24px;height:38px;pointer-events:none}
.seed-one{left:8%;top:20%;transform:rotate(-25deg)}.seed-two{right:7%;top:8%;transform:rotate(15deg)}
/* A short, left-aligned welcome letter; art has its own clear margin. */
.welcome .intro-copy{color:#293e49;padding:24px 15% 24px 6%;gap:18px;min-width:0;min-height:0;overflow-y:auto;justify-content:center;align-items:flex-start;z-index:1}
.welcome .intro-copy h2{margin:0;flex:none;height:34px;width:100%}
.welcome .intro-copy h2 img{display:block;height:100%;width:100%;object-fit:contain;object-position:left}
.welcome-letter{width:100%;max-width:30em;flex:none}
.welcome .intro-copy p{font-family:inherit;font-size:clamp(16px,1.6vw,21px);font-weight:400;line-height:1.75;letter-spacing:.015em;margin:0 0 .85em;text-align:left;overflow-wrap:break-word;line-break:strict}
.welcome-letter p>span{display:block}
.welcome .intro-copy .welcome-invitation{margin-bottom:0}
.welcome #start{align-self:flex-start;margin:0;background:#ffffff20;border-color:#fff9;flex:none;min-height:38px;padding:7px 22px;color:#293e49}
.intro-flower{position:absolute;right:0;bottom:5%;height:42%;width:14%;object-position:bottom right;pointer-events:none;z-index:0}
.read-affordance{position:relative}
#read-prompt{position:absolute;right:0;top:calc(100% + 7px);width:max-content;max-width:190px;margin:0;color:#854727;font-size:14px;line-height:1.4;text-align:center;z-index:30;pointer-events:none}
#read-prompt>span:first-child{display:block;text-align:center;font-size:30px;line-height:1;margin:0 0 3px}
#read.read-highlight{background:#fff;border-color:white;position:relative;animation:read-pulse .9s ease-in-out 2}
#read.read-highlight:after{content:"";width:8px;height:8px;border-radius:50%;background:#c75d39;position:absolute;right:1px;top:0}
@keyframes read-pulse{50%{box-shadow:0 0 0 7px #fff6;transform:scale(1.06)}}
.forest{cursor:default}.forest video{width:100%;height:100%;object-fit:contain;background:transparent}
.rain-reading{grid-template-columns:61% 39%;gap:0;color:#fff}
.rain-copy{min-height:0;overflow-y:auto;padding:20px 28px;display:flex;flex-direction:column;gap:14px}
.rain-copy>.chapter-title{height:80px;max-width:320px;flex:none}
#rain-original-text p{font-size:clamp(14px,1.22vw,18px);line-height:1.65;margin:0 0 .8em}#rain-original-text p:last-child{margin:0}
.rain-art{min-height:0;padding:20px 20px 10px;display:flex;flex-direction:column;gap:16px}
.rain-art figure{margin:0;flex:1;min-height:0;display:flex;align-items:center;justify-content:center}
.rain-art figure>img{min-height:0;min-width:0;height:100%;width:100%;object-fit:contain}
.rain-art figcaption{display:flex;flex-direction:column;align-self:center;gap:7px;font-size:14px;line-height:1.5;white-space:nowrap}
.rain-process{height:31%;width:100%;object-fit:contain;flex:none}
@media(max-height:450px) and (orientation:landscape),(orientation:portrait) and (max-width:450px){
.welcome .intro-title{padding:12px 10px;gap:16px}.sense-icons{gap:4px}.intro-seed{width:18px;height:28px}
.welcome .intro-copy{padding:12px 8% 12px 5%;gap:10px}.welcome .intro-copy h2{height:28px}.welcome .intro-copy p{font-size:16px;line-height:1.55;letter-spacing:0;margin-bottom:.65em}.welcome .intro-copy .welcome-invitation{margin-bottom:0}.intro-flower{width:10%;height:32%;bottom:3%}.welcome #start{min-height:34px;padding:5px 18px;font-size:14px}
.rain-copy{padding:12px 20px;gap:8px}.rain-copy>.chapter-title{height:56px}#rain-original-text p{font-size:14px;line-height:1.55;margin-bottom:.65em}.rain-art{padding:12px 16px 8px;gap:9px}
}
@media(prefers-reduced-motion:reduce){#read.read-highlight{animation:none}}

/* Reveal video only once frames are playing; retain the artwork while loading. */
.forest video{position:absolute;inset:0}.forest video.preparing{opacity:0}
.forest-loading{position:absolute;z-index:4;left:50%;bottom:8%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;padding:12px 18px;border-radius:28px;background:#fffaf3f5;color:#6a4b4f;box-shadow:0 3px 12px #49344214;white-space:nowrap;font-size:16px;pointer-events:none}
.forest-loading>img{width:27px;height:27px;object-fit:contain;animation:leaf-ready 1.2s ease-in-out infinite}
.loading-dots{display:inline-flex;gap:4px;margin-left:5px}.loading-dots i{width:5px;height:5px;border-radius:50%;background:#b77d65;animation:ready-dot 1s ease-in-out infinite}.loading-dots i:nth-child(2){animation-delay:.15s}.loading-dots i:nth-child(3){animation-delay:.3s}
@keyframes ready-dot{50%{transform:translateY(-4px);opacity:.5}}@keyframes leaf-ready{50%{transform:rotate(12deg) translateY(-3px)}}
@media(prefers-reduced-motion:reduce){.forest-loading>img,.loading-dots i{animation:none}}

/* Trim the original coloured outer rim, preserving the hand-drawn symbols. */
.sense-icons img:not(:last-child){clip-path:circle(47% at 50% 50%);transform:scale(1.06)}
.brand{letter-spacing:.04em;white-space:nowrap;min-width:0;text-align:left}

/* A welcoming drawing tab, with a hint that retires after discovery. */
.tabs{align-items:flex-start;gap:12px}.tabs>button{min-height:42px}
.face-invite{display:flex;flex-direction:column;align-items:center;gap:7px;flex:none}
.tabs #face-tab{display:flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:7px 17px;background:#ffe6a6;color:#55474c;border:1.5px solid #fff4d7;border-radius:20px 16px 22px 15px;box-shadow:0 3px 0 #6a637e40;font-weight:600;transform:rotate(-2deg)}
.tabs #face-tab:hover{background:#ffedc4}.tabs #face-tab[aria-pressed=true]{background:#fff4d7;box-shadow:none;transform:none}
.draw-pencil{font-family:Georgia,serif;font-size:25px;line-height:1;font-weight:400}
#face-invite-hint{font-size:14px;line-height:1.3;letter-spacing:.06em;color:#293e49}
#face-tab.invite-draw{animation:invite-draw .85s ease-in-out 2;animation-delay:.3s}
@keyframes invite-draw{0%,100%{transform:rotate(-2deg) translateY(0)}45%{transform:rotate(2deg) translateY(-4px)}70%{transform:rotate(-3deg) translateY(-1px)}}
@media(prefers-reduced-motion:reduce){#face-tab.invite-draw{animation:none}}

/* Match the drawing invitation; reserve hint space to keep the artwork steady. */
.tools:has(.run-invite){align-items:flex-start;gap:12px}
.run-invite{position:relative;flex:none;padding-bottom:23px}
.tools #run-girl{display:flex;align-items:center;justify-content:center;gap:7px;background:#ffe6a6;color:#55474c;border:1.5px solid #fff4d7;border-radius:20px 16px 22px 15px;box-shadow:0 3px 0 #6a637e40;font-weight:600;transform:rotate(-2deg)}
.tools #run-girl::before{content:"▶";font-size:12px}
.tools #run-girl:hover{background:#ffedc4}.tools #run-girl[aria-pressed=true]{background:#fff4d7;box-shadow:none;transform:none}
#run-invite-hint{position:absolute;bottom:0;left:50%;transform:translateX(-50%);font-size:14px;line-height:1.3;letter-spacing:.06em;color:#293e49;white-space:nowrap}
#run-girl.invite-run{animation:invite-draw .85s ease-in-out 2;animation-delay:.3s}
@media(prefers-reduced-motion:reduce){#run-girl.invite-run{animation:none}}
