/* The first adventure: a warm illustrated stage and a quiet, readable story. */
#shell #tutorial{z-index:72;align-items:center;justify-content:center;padding:max(16px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));background:radial-gradient(ellipse at 28% 25%,#294c53e8,#111e2cf5 80%);backdrop-filter:blur(12px)}
#shell .welcome-dialog{width:min(1120px,100%);max-height:100%;overflow:auto;display:flex;flex-direction:column;background:#f5f0e4;color:#19383e;border:1px solid #ffffffa1;border-radius:28px;padding:24px 30px 20px;box-shadow:0 28px 90px #050e2459,inset 0 1px #fff;font-family:Fredoka,system-ui,sans-serif}
#shell .welcome-header{display:flex;align-items:center;justify-content:space-between;gap:16px}
#shell .welcome-brand{font-weight:650;font-size:1.1rem;letter-spacing:.035em;color:#284f53;line-height:1.1}.welcome-brand b{color:#b65a2e}.welcome-brand small{display:block;font-family:system-ui,sans-serif;font-weight:600;font-size:.58rem;letter-spacing:.18em;margin-top:6px}
#shell .welcome button{font-family:inherit;cursor:pointer;min-height:44px;border-radius:12px;transition:transform .15s,background-color .15s;touch-action:manipulation;text-shadow:none}
#shell .welcome button:active{transform:translateY(2px)}#shell .welcome button:focus-visible{outline:3px solid #bc602f;outline-offset:4px}#shell .welcome #tutorial-title:focus{outline:none}
#shell .welcome .welcome-skip{background:transparent;border:0;box-shadow:none;color:#526467;padding:8px 0 8px 12px;font-size:.86rem;white-space:nowrap}#shell .welcome-skip span{font-size:1.6rem;margin-left:10px;vertical-align:middle}
#shell .welcome-route{display:flex;gap:8px;margin:24px 0 16px;position:relative}
#shell .welcome-route:before{content:'';position:absolute;left:8%;right:8%;top:50%;height:1px;background:#d9d5c8}
#shell .welcome-route button{position:relative;flex:1;display:flex;align-items:center;justify-content:center;gap:10px;border:0;box-shadow:none;background:#ece8de;color:#687472;padding:6px 12px;font-size:.88rem;border-radius:24px}
#shell .welcome-route b{border-radius:50%;background:#fff7e7;display:grid;place-items:center;width:25px;height:25px;font-size:.78rem}
#shell .welcome-route [aria-current=step]{background:#254f50;color:#fff7e6;box-shadow:0 3px 0 #173e40}#shell .welcome-route [aria-current=step] b{background:#f8c978;color:#453326}
#shell .welcome-body{display:grid;grid-template-columns:1.25fr 1fr;gap:32px;align-items:stretch;min-height:0}
#shell .welcome-stage{position:relative;min-height:330px;border-radius:22px;overflow:hidden;isolation:isolate;background:radial-gradient(ellipse at 65% 38%,#fff8dc 0,transparent 65%),linear-gradient(145deg,#ecd9aa,#d9d9b3 65%,#c5d2bb);box-shadow:inset 0 0 0 1px #fff7,inset 0 -30px 50px #8da28b29}
#shell .welcome-stage:after{content:'';position:absolute;inset:65% -10% -15%;border-radius:50%;background:#afbd9c40;z-index:-1;transform:rotate(-9deg)}
#shell .welcome-orbit{position:absolute;border:1px solid #fff9;border-radius:50%;width:70%;height:75%;left:15%;top:8%;transform:rotate(-25deg);z-index:-1}.welcome .orbit-two{scale:1.35;opacity:.4}
#shell .welcome-specks{position:absolute;top:20%;left:12%;color:#fff8df;font-size:30px;animation:welcome-breathe 4s ease-in-out infinite}.welcome-specks span{position:absolute;left:260px;top:34px;font-size:17px}.welcome-specks i{position:absolute;left:200px;top:200px;font-size:15px}
#shell .welcome-caption{position:absolute;left:20px;top:17px;text-transform:uppercase;letter-spacing:.15em;font:650 .62rem/1.4 system-ui,sans-serif;color:#556553;z-index:2}
#shell #welcome-snake{position:absolute;inset:12% 0 auto;width:100%;height:72%;object-fit:contain;z-index:1}
#shell .welcome-controls{position:absolute;bottom:22px;left:22px;right:22px;display:flex;align-items:center;gap:15px;font-size:.8rem;color:#456150}
#shell .welcome-stick{width:55px;height:55px;border:1px solid #fff9;border-radius:50%;background:#5277651c;box-shadow:inset 0 2px 7px #577d4521;display:grid;place-items:center}
#shell .welcome-stick i{display:block;width:27px;height:27px;background:linear-gradient(#fff9e7,#e3c98e);border:1px solid #fff;border-radius:50%;box-shadow:0 4px 7px #4e634e40;animation:welcome-steer 4s ease-in-out infinite}
#shell .welcome-story{display:flex;flex-direction:column;justify-content:center;padding:20px 8px 20px 0;align-items:flex-start}
#shell #welcome-eyebrow{font:750 .64rem/1.5 system-ui,sans-serif;letter-spacing:.14em;color:#9e5736}
#shell #tutorial #tutorial-title{font-size:clamp(1.6rem,3.3vw,2.65rem);font-weight:600;letter-spacing:-.035em;line-height:1.07;margin:14px 0 18px;white-space:pre-line;color:#21474b;text-shadow:none}
#shell #welcome-copy{font:500 .98rem/1.65 system-ui,sans-serif;color:#3f5759;margin:0;max-width:38ch}
#shell #welcome-tip{font:500 .78rem/1.6 system-ui,sans-serif;color:#667674;margin:19px 0 0;padding-left:12px;border-left:2px solid #dba764;max-width:40ch}
#shell .welcome-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:1px solid #dbdccc;margin-top:22px;padding-top:16px}
#shell .welcome #tutorial-practice{background:transparent!important;border:0!important;box-shadow:none!important;color:#315c57!important;font-size:.88rem;min-height:44px;margin:0;padding:8px 0}
#shell .welcome-navigation{display:flex;align-items:center;gap:16px}
#shell #welcome-count{font:600 .7rem system-ui,sans-serif;color:#697b74;white-space:nowrap}
#shell #welcome-previous{min-width:44px;background:#e6e8dc;border:0;box-shadow:none;color:#385852;font-size:1.15rem}#shell #welcome-previous:disabled{opacity:.32;cursor:default}
#shell #welcome-next{min-width:135px;min-height:48px;padding:10px 24px;background:linear-gradient(#f8ce80,#eeb968);color:#433924;border:1px solid #d5a454;box-shadow:0 3px 0 #c49e62,inset 0 1px #fff8;font-size:1rem}
#shell #tutorial-play{display:none}#shell #welcome-name{background:#254f50!important;color:#fff7e9!important;border:0!important;margin-top:15px;padding:10px 16px;box-shadow:none!important;font-size:.85rem}
#shell .welcome-food{position:absolute;right:9%;bottom:15%;display:flex;gap:15px;align-items:center}.welcome-food img{width:32px;height:32px;object-fit:contain;filter:drop-shadow(0 4px 2px #42613d35);animation:welcome-breathe 2.4s ease-in-out infinite}.welcome-food img:nth-child(2){animation-delay:.25s}.welcome-food img:nth-child(3){animation-delay:.5s}
#shell #welcome-boost{position:absolute;bottom:18px;left:18px;z-index:4;min-height:44px;background:#fff6dbb8;color:#35544b;border:1px solid #fff9;padding:8px 12px;box-shadow:0 3px 0 #8da08055;font-size:.74rem;touch-action:none;user-select:none}#shell #welcome-boost span{font-size:1.2rem;vertical-align:middle;margin-left:4px}#shell .welcome[data-boost=true] #welcome-boost{background:#254f50;color:#fff7df}#shell .welcome[data-boost=true] .welcome-orbit{border-color:#fff;border-width:2px;animation:welcome-wake .7s linear infinite}
#shell .welcome-rival-wrap{position:absolute;inset:43% 0 0;z-index:2}#shell #welcome-rival{position:absolute;left:15%;top:0;width:55%;height:85%;transform:rotate(-30deg)}#shell .welcome-rival-wrap b{position:absolute;left:20px;bottom:16px;color:#5b5c45;font:600 .71rem system-ui,sans-serif}#shell .welcome-collision{position:absolute;left:52%;top:5%;width:32px;height:32px;background:#fff3e5;color:#c86145;border-radius:50%;display:grid;place-items:center;font-size:1.6rem;box-shadow:0 0 0 7px #fff4}
#shell .welcome[data-step="2"] #welcome-snake{top:0;height:72%}
#shell .welcome-looks{position:absolute;inset:17% 5% 7%;display:grid;grid-template-columns:repeat(3,1fr);gap:8px;align-items:stretch}.welcome-looks figure{margin:0;min-width:0;border-radius:35% 35% 14px 14px;background:linear-gradient(#fff8e24d,#fff8e291);box-shadow:inset 0 0 0 1px #fff7;display:flex;flex-direction:column;justify-content:space-between}.welcome-looks figure:nth-child(2){transform:translateY(-12px)}#shell .welcome-looks canvas{width:100%;height:calc(100% - 34px);min-height:0;object-fit:contain}#shell .welcome-looks figcaption{text-align:center;padding:7px 2px 10px;font-size:.66rem;color:#55654c;white-space:nowrap}
#shell .welcome [hidden]{display:none!important}
@keyframes welcome-steer{0%,100%{transform:translate(-8px,4px)}50%{transform:translate(9px,-6px)}}@keyframes welcome-breathe{0%,100%{transform:translateY(0);opacity:.8}50%{transform:translateY(-5px);opacity:1}}@keyframes welcome-wake{to{transform:translateX(-14px) rotate(-25deg);opacity:.2}}
#shell .welcome[data-reduced=true] *{animation:none!important;transition:none!important}
@media(max-height:650px) and (orientation:landscape){#shell #tutorial{padding:max(8px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left))}#shell .welcome-dialog{border-radius:18px;padding:10px 18px 10px;max-width:1060px}#shell .welcome-header{min-height:36px}#shell .welcome-brand{font-size:.87rem}.welcome-brand small{font-size:.48rem;margin-top:3px}#shell .welcome .welcome-skip{font-size:.7rem;min-height:44px}#shell .welcome-route{margin:6px 0 9px;gap:8px}#shell .welcome-route button{min-height:44px;font-size:.72rem;padding:3px 8px}#shell .welcome-route b{width:21px;height:21px;font-size:.65rem}#shell .welcome-body{gap:22px;grid-template-columns:1.12fr 1fr}#shell .welcome-stage{min-height:0;height:clamp(145px,calc(100dvh - 200px),300px);border-radius:16px}#shell .welcome-story{padding:4px 0}#shell #welcome-eyebrow{font-size:.53rem}#shell #tutorial #tutorial-title{font-size:clamp(1.4rem,3.1vw,2rem);margin:7px 0 9px}#shell #welcome-copy{font-size:.76rem;line-height:1.45}#shell #welcome-tip{font-size:.65rem;line-height:1.4;margin-top:10px;padding-left:9px}#shell .welcome-footer{margin-top:9px;padding-top:6px;gap:10px}#shell #welcome-next{min-height:44px;padding:6px 17px;font-size:.87rem}#shell .welcome #tutorial-practice{font-size:.75rem;min-height:44px}#shell .welcome-caption{font-size:.48rem;left:14px;top:11px}#shell .welcome-controls{bottom:12px;left:14px;gap:10px;font-size:.6rem}#shell .welcome-stick{height:37px;width:37px}#shell .welcome-stick i{width:19px;height:19px}#shell #welcome-name{font-size:.7rem;min-height:44px;margin-top:8px;padding:6px 10px}#shell #welcome-boost{font-size:.58rem;left:10px;bottom:10px;min-height:44px;padding:6px 8px}.welcome-food img{width:23px;height:23px}#shell .welcome-rival-wrap b{font-size:.59rem;bottom:12px;left:12px}#shell .welcome-looks figcaption{font-size:.55rem;padding-bottom:7px}.welcome-specks span{left:160px;top:20px}.welcome-specks i{left:100px;top:100px}}
@media(orientation:portrait){#shell .welcome-dialog{padding:16px;border-radius:22px}#shell .welcome-brand{font-size:.85rem}#shell .welcome .welcome-skip{font-size:.7rem}#shell .welcome-route{gap:5px;margin:14px 0}#shell .welcome-route button{font-size:.66rem;gap:5px;padding:4px 5px}#shell .welcome-route b{width:21px;height:21px;font-size:.6rem}#shell .welcome-body{grid-template-columns:1fr;gap:14px}#shell .welcome-stage{min-height:0;height:230px}#shell .welcome-story{padding:0 2px}#shell #tutorial #tutorial-title{font-size:1.8rem;margin:8px 0 11px}#shell #welcome-copy{font-size:.86rem}#shell #welcome-tip{margin-top:10px;font-size:.7rem}#shell .welcome-footer{flex-wrap:wrap;gap:8px;margin-top:16px;padding-top:10px}#shell .welcome-navigation{gap:9px;margin-left:auto}#shell #welcome-next{min-width:100px;padding:8px 12px}#shell .welcome #tutorial-practice{font-size:.74rem}#shell .welcome-specks{font-size:20px}}
@media(prefers-reduced-motion:reduce){#shell .welcome *{animation:none!important;transition:none!important}}

#shell .welcome-header,#shell .welcome-route,#shell .welcome-body,#shell .welcome-footer{flex-shrink:0}
#shell .welcome-footer #welcome-name{margin:0;min-height:44px;font-size:.75rem;width:auto;padding:8px 12px}
/* Reset legacy tutorial button margins so safe-area bounds stay exact. */
#shell #tutorial #tutorial-back{display:flex;align-items:center;gap:8px;align-self:center;min-height:44px;height:44px;padding:0 6px;margin:0;min-width:0;line-height:1.2}
#shell #tutorial .welcome-footer #tutorial-practice{margin:0;font-size:.75rem;min-height:44px}
