/* FTUE v2 shared pieces (public/ftue.mjs). Promise lines: quiet facts under a box, each with a drawn tick. */
.promises{list-style:none;margin:14px 0 0;padding:0;display:grid;gap:7px}
.promise{display:flex;align-items:flex-start;gap:9px;font-size:13px;line-height:1.45;color:#6f5c86}
.promise-mark{flex:none;position:relative;width:17px;height:17px;margin-top:1px;border-radius:50%;background:#e8daf2;border:1.5px solid #ac85c6}
.promise-mark::after{content:'';position:absolute;left:4.5px;top:1.5px;width:4px;height:8px;border:solid #5b4870;border-width:0 2px 2px 0;transform:rotate(45deg)}
.promise-text{min-width:0;overflow-wrap:anywhere}

/* FTUE v2 screens (public/ftue-screens.mjs). One centred column; the bottom nav is hidden until v2 is done. */
body.ftue-nav-hidden .bottom-nav{display:none}
.ftue-screen{max-width:460px;margin:auto;text-align:center}
.ftue-screen h1{font-size:34px;letter-spacing:-.8px;margin:14px 0 10px}
.ftue-screen .lead{margin:0 auto 6px}
.ftue-screen .actions{justify-content:center}
.ftue-screen .actions .primary{min-width:220px}
.ftue-screen .promises{max-width:340px;margin:16px auto 0;text-align:left}
.ftue-status{min-height:1.5em;color:#873e50}
/* 1 · Egg: the egg is the tap target; it idles, wobbles on tap, splits, and Diplope rises out of it. */
.ftue-egg{display:grid;place-items:center;width:220px;height:240px;margin:8px auto 0;padding:0;border:0;border-radius:40px;background:radial-gradient(closest-side,#ffedccbf,#ffedcc00)}
.ftue-egg>*{grid-area:1/1}
.ftue-egg:disabled{cursor:default;opacity:1}
.ftue-egg-shell{position:relative;z-index:1;width:170px;height:198px;transform-origin:50% 90%;animation:egg-idle 2.8s ease-in-out infinite}
.ftue-egg-shell .ftue-egg-whole{width:100%;height:100%}
.ftue-hatching .ftue-egg-shell{animation:egg-wobble .35s ease-in-out 3 alternate}
.ftue-egg-open .ftue-egg-shell{animation:none}
.ftue-egg-open .egg-top{transform:translate(-50px,-130px) rotate(-40deg);opacity:0}
.ftue-egg-open .egg-bottom{transform:translateY(110px) rotate(6deg);opacity:0}
.ftue-egg-monster.monster-art{width:190px;height:218px;opacity:0;transform:scale(.55) translateY(30px);transition:opacity .5s ease .15s,transform .6s cubic-bezier(.3,1.4,.6,1) .15s}
.ftue-egg-open .ftue-egg-monster.monster-art{opacity:1;transform:none}
/* 2 · Hatched: the carrying picture, large. */
.ftue-picture{display:grid;place-items:center;margin:4px auto 0;padding:12px;width:fit-content;max-width:100%;border-radius:22px;background:#fffcf8d9;border:1px solid #c8b4f04d;box-shadow:0 4px 12px #b4a0dc1a}
.ftue-picture .comic-monster{width:48%}
/* 1 · Story, before the egg (public/ftue-story.mjs): four beats, each a small looping scene. Reduced motion shows the end pose. */
.ftue-story-picture{width:min(320px,100%);padding:0;overflow:hidden}
.story-stage{position:relative;width:100%;height:210px;background:radial-gradient(ellipse at 50% 30%,#ffedccb3,transparent 65%),linear-gradient(180deg,#fff8ef00 55%,#eadff2 100%)}
.story-stage::after{content:'';position:absolute;left:10%;right:10%;bottom:18px;height:14px;border-radius:50%;background:radial-gradient(closest-side,#a592bb40,#a592bb00)}
.story-backdrop{position:absolute;inset:-4%;width:108%;height:108%;object-fit:cover;animation:story-pan 16s ease-in-out infinite alternate}
.story-painted{background:none}
.story-painted::after{bottom:14px}
img.story-envelope,img.story-mailbox,.story-open-letter{object-fit:contain}
.story-open-letter{position:absolute;left:18px;top:26px;width:70px;height:56px;opacity:0;animation:story-heart 4.2s ease-out infinite;animation-delay:.25s}
.story-actor{position:absolute;left:50%;bottom:20px;width:128px;height:148px;margin-left:-64px;z-index:1}
.story-actor .monster-art{width:100%;height:100%}
.story-envelope{position:absolute;width:44px;height:32px}
.story-carried{left:42px;top:64px;z-index:2}
.story-mailbox{position:absolute;bottom:22px;width:52px;height:70px}
.story-far{right:14px}
.story-near{left:14px}
.story-sparkles{position:absolute;inset:0}
.story-sparkle{position:absolute;color:#c9a6f2;font-size:22px;animation:monster-sparkle 1.8s ease-in-out infinite}
.story-sparkle.s0{left:22%;top:22%}.story-sparkle.s1{right:22%;top:14%;animation-delay:.6s;color:#f5a3b8}.story-sparkle.s2{right:26%;top:58%;animation-delay:1.2s}
.story-hop{animation:story-hop 1.6s ease-in-out infinite}
.story-pair-left{margin-left:-118px}.story-pair-right{margin-left:-6px;animation-delay:.4s}
.story-walk-out{animation:story-walk-out 4.2s ease-in-out infinite}
.story-walk-out .story-carried{animation:story-drop 4.2s ease-in-out infinite}
.story-walk-in{animation:story-walk-in 4.2s ease-in-out infinite}
.story-heart{position:absolute;left:30px;top:40px;color:#e25a9b;font-size:28px;opacity:0;animation:story-heart 4.2s ease-out infinite}
.story-eggs{position:absolute;inset:0;display:flex;justify-content:center;align-items:flex-end;gap:4px;padding-bottom:20px}
.story-egg{--i:0;position:relative;display:grid;place-items:end center;width:92px;height:120px}
.story-egg>*{grid-area:1/1}
.story-egg[data-egg="1"]{--i:1}.story-egg[data-egg="2"]{--i:2}
.story-egg .egg-art{width:78px;height:92px;transition:transform .6s ease,opacity .6s ease;transition-delay:calc(.9s + var(--i)*.7s)}
.story-egg-waiting .egg-art{transform-origin:50% 90%;animation:egg-idle 2.8s ease-in-out infinite}
.story-egg-monster.monster-art{width:92px;height:106px;opacity:0;transform:scale(.5) translateY(24px);transition:opacity .5s ease,transform .6s cubic-bezier(.3,1.4,.6,1);transition-delay:calc(1.05s + var(--i)*.7s)}
.story-stage[data-beat=eggs] .story-egg:not(.story-egg-waiting){animation:egg-wobble .3s ease-in-out calc(var(--i)*.7s) 3 alternate;transform-origin:50% 90%}
.story-open .story-egg-top{transform:translate(-26px,-70px) rotate(-38deg);opacity:0}
.story-open .story-egg-bottom{transform:translateY(60px);opacity:0}
.story-open .story-egg-monster.monster-art{opacity:1;transform:none}
.ftue-story-dots{display:flex;justify-content:center;gap:8px;list-style:none;margin:12px 0 0;padding:0}
.ftue-story-dots li{width:8px;height:8px;border-radius:50%;background:#e1d2ea;transition:background .3s,transform .3s}
.ftue-story-dots li[data-on]{background:#ac85c6}
.ftue-story-dots li[data-current]{transform:scale(1.35)}
.ftue-story h1{font-size:30px;margin:10px 0 8px}
.ftue-story .lead{min-height:3.2em}
.ftue-story-last{margin:10px 0 0;font-weight:600;color:#5b4870}
.ftue-story .ftue-skip{margin-top:0}
@keyframes story-pan{from{transform:translate(-1.5%,0) scale(1)}to{transform:translate(1.5%,-1%) scale(1.04)}}
@keyframes story-hop{0%,100%{transform:translateY(0) scale(1,1)}40%{transform:translateY(-16px) scale(.97,1.03)}55%{transform:translateY(0) scale(1.05,.95)}}
@keyframes story-drop{0%{transform:translateY(-120px) rotate(-18deg);opacity:0}20%{opacity:1}30%,100%{transform:none;opacity:1}}
@keyframes story-walk-out{0%,35%{transform:translateX(-30px)}80%{transform:translateX(62px) scale(.82);opacity:1}92%,100%{transform:translateX(70px) scale(.8);opacity:0}}
@keyframes story-walk-in{0%{transform:translateX(150px) scale(.8);opacity:0}12%{opacity:1}55%,100%{transform:translateX(-30px);opacity:1}}
@keyframes story-heart{0%,55%{opacity:0;transform:translateY(8px) scale(.6)}68%{opacity:1;transform:translateY(-6px) scale(1.15)}85%{opacity:1;transform:translateY(-14px) scale(1)}100%{opacity:0;transform:translateY(-24px)}}
@media(prefers-reduced-motion:reduce){.story-heart,.story-open-letter{opacity:1}.story-walk-out{transform:translateX(50px) scale(.85)}.story-walk-in{transform:translateX(-30px)}}
/* 3–5 · Letter, reply, sent (public/ftue-reply.mjs). The picture sits beside the heading; the letter is never cut. */
.ftue-head{display:flex;align-items:center;gap:12px;text-align:left;margin:4px 0 0}
.ftue-head .tutorial-panel{flex:none}
.ftue-head-text{min-width:0}
.ftue-head h1{margin:0}
.ftue-head .ftue-reply-ask{font-size:24px;letter-spacing:-.3px;line-height:1.2}
.ftue-letter{text-align:left;margin:16px 0 8px;padding:18px 20px}
.ftue-letter-pills{display:flex;flex-wrap:wrap;gap:6px}
.ftue-letter .ftue-letter-text{overflow:visible;max-height:none;margin:10px 0 12px}
.ftue-letter-footer{margin:0;font-size:12px;color:#897389}
.ftue-count{margin:6px 0 0;font-size:14px;color:#6f5c86}
.ftue-count-tick{animation:ftue-tick .5s ease-out}
.ftue-how{display:block;margin:0 auto}
.ftue-openers{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-start;margin:14px 0 4px}
.ftue-opener{border:2px solid #cab1df;border-radius:18px;padding:8px 14px;min-height:44px;background:#fffaf5;color:#5b4870;box-shadow:0 2px 0 #cab1df;font-size:14px}
.ftue-opener:active{transform:translateY(2px);box-shadow:none}
.ftue-reply-form{text-align:left;margin-top:12px}
.ftue-reply-form textarea{display:block;width:100%;min-height:150px;resize:vertical;padding:14px 16px;border:1px solid #ebdfce;border-radius:8px;background:var(--cream);color:#51405a;font:22px/1.5 Caveat,'Noteworthy','Segoe Print',cursive}
.ftue-reply-form .paper-meta{margin-top:6px}
.ftue-coach{margin:10px 0 0;padding:10px 14px;border-radius:14px;background:#fff6e6;color:#6e537d;font-size:14px}
.ftue-reply-form .ftue-status:empty{min-height:0}
.ftue-sent .sent-banner{margin-top:0}
.ftue-sent h1.sent-banner-title{font-family:inherit;font-size:20px;font-weight:600;line-height:1.2;letter-spacing:.5px;margin:0}
.ftue-sent .travel-postcard{margin:12px auto 4px}
.ftue-walking{margin:14px auto 0}
/* The XP beat after the first reply must not cover "Sent" at the top: during v2 it rises from the bottom instead. */
body.ftue-nav-hidden .xp-burst{top:auto;bottom:max(24px,env(safe-area-inset-bottom))}
@keyframes ftue-tick{0%{transform:scale(1)}40%{transform:scale(1.12)}100%{transform:scale(1)}}
/* 6–7 · Today's question and everyone's answers (public/ftue-daily.mjs). The wall reuses daily.css's answer cards;
   its one button stays in reach however long the wall gets. */
.ftue-screen .ftue-daily-question{font:clamp(26px,7vw,34px)/1.2 Georgia,serif;letter-spacing:-.3px;color:#4c3a5c;margin:8px auto 10px;max-width:22ch}
.ftue-daily-form{text-align:left;margin-top:14px}
.ftue-daily-form textarea{display:block;width:100%;min-height:120px;resize:vertical;padding:14px 16px;border:1px solid #ecdfc9;border-radius:8px;background:linear-gradient(180deg,#fffdf6,#fffaf0);color:#51405a;font:22px/1.5 Caveat,'Noteworthy','Segoe Print',cursive}
.ftue-daily-form .paper-meta{margin-top:6px}
.ftue-daily-form .ftue-status:empty{min-height:0}
.ftue-skip{display:block;margin:4px auto 0}
.ftue-wall-heading{margin:14px 0 0;text-align:left}
.ftue-wall{text-align:left}
.ftue-wall-actions{position:sticky;bottom:0;margin:0 -16px;padding:12px 16px max(12px,env(safe-area-inset-bottom));background:linear-gradient(180deg,#f8ede800,#f8ede8 35%)}
/* 8 · Diplope's home (public/ftue-home.mjs). The live trip while it lasts, then the delivered picture. */
.ftue-home-travelling .travel-postcard{margin:12px auto 4px}
.ftue-home .ftue-status:empty{min-height:0}
/* 9 · Your turn (public/ftue-letter.mjs). Reuses the reply form's box and the opener chips. */
.ftue-head .ftue-prompt{margin:4px 0 0;font-size:17px;color:#6f5c86}
.ftue-nudge{margin:6px 0 0;font-size:15px;color:#6e537d}
.ftue-nudge-alert{padding:8px 12px;border-radius:12px;background:#fff6e6;color:#873e50}
.ftue-reply-like{margin:12px 0 4px;font-size:15px;color:#5b4870}
.ftue-reply-like .ftue-change{min-height:44px;padding:0 6px;text-decoration:underline}
/* Screen 10: read signals. Each line only exists while the server says it is true. */
.ftue-signals{display:grid;gap:8px;margin:14px auto 0;max-width:360px}
.ftue-signal{margin:0;padding:10px 14px;border-radius:16px;background:#fffaf5;border:1.5px solid #cab1df;color:#4c3a5c;font-size:16px;font-weight:600}
.ftue-signal-writing{background:#f3ecfb}
.ftue-signal-picture{margin-top:14px}
.ftue-caption{margin:8px 0 0;font-size:14px;color:#6f5c86}
.ftue-room{margin:12px 0 0;font-size:14px;color:#6f5c86}
@media(prefers-reduced-motion:no-preference){.ftue-signal:not([hidden]){animation:ftue-tick .5s ease-out}}
/* 11 · Notifications (public/ftue-notify.mjs): Diplope with the envelope, the one ask, then v2 is over. */
.ftue-notify h1{max-width:18ch;margin-left:auto;margin-right:auto}
@media(prefers-reduced-motion:reduce){.ftue-count-tick{animation:none}.ftue-egg-shell{animation:none!important}.ftue-egg-monster.monster-art{transition:none}}
