.ad-shell{--ad-accent:#225f48;--ad-ink:#294337;--ad-cream:#fff9e8;position:relative;isolation:isolate;min-height:100svh;background:#edf1d9 center/cover fixed;color:var(--ad-ink);padding:0 28px 28px;font-family:var(--body);overflow:hidden}
.ad-shell::before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(180deg,#fffdf1d9 0,#fffdf1a6 30%,#fffdf117 70%,#fffdf177)}
.ad-theme-market{--ad-accent:#96513c;--ad-ink:#5c3c2d;background-image:url('./assets/market-background-v1.webp')}
.ad-theme-sounds{--ad-accent:#376544;--ad-ink:#2e5039;background-image:url('./assets/garden-background-v1.webp')}
.ad-theme-earth{--ad-accent:#1f6871;--ad-ink:#254e4f;background-image:url('./assets/earth-background-v1.webp')}
.ad-shell button{font-family:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.ad-shell button:focus-visible{outline:4px solid #1f7ba4;outline-offset:4px}
.ad-shell [data-drag]{touch-action:none;user-select:none;-webkit-user-select:none}
.ad-shell h1,.ad-shell h2,.ad-shell h3{font-family:var(--heading);letter-spacing:-.02em}
.ad-topbar{display:flex;align-items:center;justify-content:space-between;gap:20px;max-width:1320px;margin:auto;min-height:75px;border-bottom:1px solid #38523928}
.ad-school{font-size:9px;letter-spacing:.12em;font-weight:800;text-align:center}
.ad-top-actions{display:flex;gap:8px;align-items:center}
.ad-nav,.ad-sound,.ad-full,.ad-read{border:1.5px solid #264a3529;background:#fffdf1dc;color:var(--ad-ink);border-radius:14px;min-height:46px;padding:10px 15px;font-size:13px;font-weight:800;display:inline-flex;gap:9px;align-items:center;justify-content:center;box-shadow:0 3px 0 #355c3620}
.ad-nav:hover,.ad-sound:hover,.ad-full:hover,.ad-read:hover{background:white;transform:translateY(-1px)}
.ad-sound svg,.ad-full svg,.ad-read svg{width:23px;height:23px;flex:none}
.ad-full{padding:10px;width:46px}.ad-sound[aria-pressed=false]{opacity:.7}
.ad-kicker{font-size:11px;font-weight:900;letter-spacing:.16em;line-height:1.8;color:var(--ad-accent)}
.ad-intro{max-width:1100px;min-height:550px;display:grid;grid-template-columns:1fr 1.1fr;gap:50px;align-items:center;margin:20px auto 0}
.ad-intro-art{padding:10px;filter:drop-shadow(0 20px 25px #4b663b25);animation:ad-float 5s ease-in-out infinite}.ad-intro-art svg{width:100%;max-height:430px;overflow:visible}
.ad-intro-copy h1{font-size:clamp(50px,6vw,86px);line-height:1.04;margin:13px 0 22px}.ad-intro-copy p{font-size:19px;line-height:1.65;max-width:510px;margin:0 0 28px}.ad-intro-copy small{display:block;font-size:12px;margin-top:20px;line-height:1.6}
.ad-primary{border:2px solid var(--ad-accent);border-radius:17px;background:var(--ad-accent);color:#fffaf0;min-height:58px;padding:15px 27px;font-weight:850;font-size:19px;display:inline-flex;align-items:center;justify-content:center;gap:20px;box-shadow:0 6px 0 color-mix(in srgb,var(--ad-accent) 75%,black)}
.ad-primary:hover{filter:brightness(1.1);transform:translateY(-1px)}.ad-primary:active{transform:translateY(3px);box-shadow:0 3px 0 var(--ad-accent)}
.ad-bottom-note{max-width:1000px;margin:0 auto;text-align:center;font-size:13px;font-weight:700;background:#fffdf1cc;padding:16px;border-radius:50px;width:fit-content}
.ad-progress{display:flex;align-items:center;justify-content:center;gap:10px;max-width:650px;margin:20px auto 15px}.ad-progress span{display:grid;place-items:center;width:39px;height:39px;border:2px solid #4167433d;border-radius:50%;background:#fffdf1bf;font-size:17px;font-weight:800;color:#637656}.ad-progress i{height:0;border-top:2px dashed #41674345;width:55px}.ad-progress .ad-progress-current{background:var(--ad-accent);color:#fffaf0;border-color:var(--ad-accent);box-shadow:0 0 0 5px #fffdf19c}.ad-progress .ad-progress-done{background:#ffdf7c;border-color:#c89d46;color:#7e582c}
.ad-main{max-width:1100px;margin:0 auto}.ad-mission-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:14px 0 20px}.ad-mission-heading h1{font-size:clamp(28px,3.2vw,43px);line-height:1.15;margin:6px 0 8px;outline:none}.ad-mission-heading p{font-size:17px;line-height:1.5;margin:0}.ad-read{width:56px;height:56px;background:#fff1ae;flex-shrink:0;box-shadow:0 5px 0 #c6a7504d}
.ad-stage{position:relative}.ad-feedback{min-height:29px;font-size:15px;font-weight:800;line-height:1.6;color:#8d4c35;margin:14px 0 2px;text-align:center}.ad-feedback-good{color:#25643c}.ad-stage-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:9px;font-size:11px;font-weight:650;opacity:.85}.ad-restart{border:0;background:#fffdf1c9;color:var(--ad-ink);padding:11px 16px;min-height:42px;border-radius:50px;font-size:12px;font-weight:800}
.ad-global-status{max-width:1100px;margin:8px auto;font-size:13px;text-align:center}.ad-global-status:empty{display:none}
.ad-celebration{position:fixed;inset:0;z-index:200;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:25px;background:#fff9e9f2;backdrop-filter:blur(8px);overflow:auto}.ad-success-star{width:138px;height:138px;animation:ad-pop .5s cubic-bezier(.2,.9,.3,1.4)}.ad-celebration h2{font-size:clamp(44px,6vw,70px);margin:9px 0;color:var(--ad-accent);line-height:1.1}.ad-celebration p{font-size:20px;line-height:1.5;max-width:650px;margin:12px 0 28px}.ad-celebration .ad-nav{margin-top:25px;background:transparent;box-shadow:none;border:0;font-size:12px}.ad-celebration .ad-kicker{margin-top:16px}.ad-confetti{position:absolute;inset:0;overflow:hidden;pointer-events:none}.ad-confetti i{position:absolute;left:calc(5% + var(--i)*5%);top:-30px;width:9px;height:18px;background:#e0a756;border-radius:2px;animation:ad-fall calc(3s + var(--i)*.1s) calc(var(--i)*-.17s) linear infinite}.ad-confetti i:nth-child(3n){background:#6ba980}.ad-confetti i:nth-child(3n + 1){background:#de8b82}.ad-confetti i:nth-child(3n + 2){background:#81b9c4}
.ad-ending{max-width:800px;margin:5px auto;text-align:center;padding-bottom:30px}.ad-end-art{max-width:275px;height:185px;margin:auto}.ad-end-art svg{width:100%;height:100%}.ad-ending h1{font-size:clamp(38px,5vw,60px);line-height:1.1;margin:8px 0}.ad-final-stars{font-size:44px;color:#cb9535;letter-spacing:9px;margin:14px 0}.ad-ending p{font-size:20px;line-height:1.6;margin:12px auto 25px;max-width:660px}.ad-end-actions{display:flex;justify-content:center;gap:20px;flex-wrap:wrap}.ad-end-actions .ad-nav{background:#fffdf1d9}
.ad-shell .ad-drag-ghost{position:fixed!important;z-index:250;pointer-events:none;transform:translate(-50%,-50%) rotate(-7deg)!important;height:auto!important;min-height:65px;opacity:.94!important;box-shadow:0 12px 30px #29433755!important;max-width:145px;margin:0!important}.ad-drag-ghost svg{max-height:100px}.ad-dragging{opacity:.32!important}.ad-shell .ad-drop-hover{outline:5px solid #e3b643!important;outline-offset:4px;background-color:#fff2b0!important}
.ad-shell:fullscreen{overflow-y:auto;overflow-x:hidden;background-attachment:scroll}
body[data-page=game] .adventure-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.adventures .adventure-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
@keyframes ad-float{50%{transform:translateY(-12px) rotate(1deg)}}@keyframes ad-pop{from{opacity:0;transform:scale(.4) rotate(-20deg)}to{opacity:1;transform:scale(1)}}@keyframes ad-fall{to{transform:translateY(110svh) rotate(380deg)}}
@media(min-width:760px) and (max-height:850px){.ad-topbar{min-height:64px}.ad-progress{margin:9px auto 8px}.ad-progress span{width:32px;height:32px;font-size:14px}.ad-mission-heading{margin:8px 0 12px}.ad-mission-heading h1{font-size:36px;line-height:1.1;margin:5px 0 7px}.ad-mission-heading p{font-size:16px}.ad-read{width:49px;height:49px;min-height:49px}.ad-kicker{font-size:10px}.ad-feedback{margin-top:9px}.ad-stage-footer{margin-top:4px}}
@media(max-width:700px){.ad-shell{padding:0 15px 25px;background-attachment:scroll}.ad-topbar{min-height:66px;gap:10px}.ad-school{display:none}.ad-nav,.ad-sound{font-size:12px;min-height:44px;padding:9px 11px}.ad-full{width:42px;min-height:44px;padding:9px}.ad-sound svg{width:20px}.ad-intro{grid-template-columns:1fr;gap:5px;min-height:0;text-align:center;margin:20px auto}.ad-intro-art{max-width:290px;height:215px;margin:auto;padding:5px}.ad-intro-art svg{max-height:210px}.ad-intro-copy h1{font-size:49px;max-width:500px;margin:10px auto 15px}.ad-intro-copy p{font-size:16px;max-width:440px;margin:0 auto 22px}.ad-intro-copy small{margin:18px auto 12px;max-width:300px}.ad-primary{font-size:17px;min-height:55px;padding:13px 22px;gap:12px}.ad-bottom-note{font-size:10px;padding:14px}.ad-progress{gap:7px;margin:20px auto 18px}.ad-progress span{width:33px;height:33px;font-size:14px}.ad-progress i{width:28px}.ad-kicker{font-size:9px;letter-spacing:.1em}.ad-mission-heading{gap:12px;margin-bottom:16px;align-items:flex-start}.ad-mission-heading h1{font-size:29px;margin:6px 0 8px}.ad-mission-heading p{font-size:14px}.ad-read{width:47px;height:47px;min-height:47px;border-radius:12px;padding:10px;margin-top:8px}.ad-stage-footer{font-size:10px;gap:10px;align-items:flex-start}.ad-stage-footer>span{max-width:185px}.ad-restart{padding:9px 12px;white-space:nowrap;font-size:10px}.ad-feedback{font-size:13px;line-height:1.6;min-height:23px}.ad-celebration p{font-size:17px}.ad-celebration h2{font-size:48px}.ad-success-star{width:120px;height:120px}.ad-ending p{font-size:17px}.ad-final-stars{font-size:35px;letter-spacing:5px}.ad-end-actions{gap:15px;flex-direction:column;align-items:center}body[data-page=game] .adventure-grid,.adventures .adventure-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.ad-shell *,.ad-shell *::before,.ad-shell *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.ad-card-preview{position:absolute;inset:13% 14% 9%;display:flex;align-items:center;justify-content:center;pointer-events:none;filter:drop-shadow(0 12px 15px #3d513a30)}.ad-card-preview>svg{width:100%;height:100%;max-width:90%;max-height:95%;overflow:visible}.adventure-art>.game-number,.adventure-art>.tiny-pill{z-index:2}
