:root{font-family:ui-rounded,"Arial Rounded MT Bold",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#142447;background:#8ad6df;font-synthesis:none;--purple:#7057ff;--ink:#142447;--paper:#fffdf7;--muted:#5c707c}*{box-sizing:border-box}body{margin:0;overflow:hidden}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;border:0}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid #ffbf52;outline-offset:4px}button:disabled{cursor:wait;opacity:.7}button:hover{filter:brightness(1.04)}button:active{transform:translateY(2px)}[hidden]{display:none!important}#app{height:100svh;min-height:360px;position:relative;overflow:hidden}#world{width:100%;height:100%;display:block;touch-action:none;outline:none}.topbar{position:absolute;top:max(24px,env(safe-area-inset-top));left:32px;right:32px;display:flex;justify-content:space-between;align-items:center;z-index:5;pointer-events:none}.brand{display:flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none;pointer-events:auto;font-size:21px;font-weight:850;letter-spacing:-.8px}.brand img{width:37px;height:37px}.brand small{display:block;font-size:8px;letter-spacing:1.9px;margin-top:3px;font-weight:700}.top-actions{display:flex;align-items:center;gap:9px;pointer-events:auto}.prototype{font-size:9px;letter-spacing:1.7px;font-weight:800;margin-right:12px;color:#335c6a}.icon-button{width:41px;height:41px;border-radius:50%;background:rgba(255,253,247,.9);color:var(--ink);font-weight:800;font-size:19px;position:relative;box-shadow:0 3px 0 #15354712}.sound-slash{position:absolute;left:16px;top:8px;transform:rotate(18deg);font-size:22px;color:#a45d73}.welcome{position:absolute;top:50%;left:6.5%;transform:translateY(-48%);z-index:3;width:390px;pointer-events:none}.welcome>*{pointer-events:auto}.eyebrow{font-size:10px;font-weight:850;letter-spacing:2.1px;display:flex;align-items:center;gap:8px}.eyebrow>span:first-child{background:#7057ff;width:7px;height:7px;border-radius:50%}.welcome h1{font-size:clamp(48px,5.5vw,86px);letter-spacing:-4px;line-height:1.1;margin:26px 0 2px;font-weight:900;white-space:nowrap}.welcome h1 span{color:#7057ff}.welcome h2{font-size:29px;letter-spacing:-1.4px;margin:0 0 22px}.welcome p{font-size:17px;line-height:1.7;color:#3c6371;margin-bottom:25px}.primary{display:inline-flex;align-items:center;justify-content:center;gap:16px;background:#7057ff;color:white;font-size:16px;padding:17px 25px;border-radius:17px;font-weight:800;box-shadow:0 5px 0 #5141bf;min-height:54px}.primary:hover{background:#6249ed}.welcome-details{display:flex;gap:20px;font-size:11px;margin-top:22px;color:#476776;font-weight:700}.welcome-note{font-size:10px;letter-spacing:.7px;color:#4c7480;margin-top:43px}.mission{position:absolute;top:100px;left:28px;width:276px;background:#fffdf7f0;border:1px solid #fff7;padding:21px;border-radius:23px;box-shadow:0 10px 30px #2a567414;z-index:3}.mission .eyebrow{font-size:9px;color:#7962dc;justify-content:space-between;letter-spacing:1.6px}.mission .eyebrow span{width:auto;height:auto;background:none;color:#8e8d9e;font-size:10px}.mission h2{font-size:22px;line-height:1.15;letter-spacing:-.7px;margin:15px 0 8px}.mission p{font-size:13px;line-height:1.5;margin:0;color:#65737a}.progress-track{height:7px;background:#e9e8e2;border-radius:9px;margin:18px 0 13px;overflow:hidden}#progress{height:100%;width:0%;background:#7057ff;transition:width .4s;border-radius:9px}.inventory{display:flex;gap:8px;justify-content:space-between;font-size:10px;color:#607480}.inventory b{font-size:12px;color:var(--ink)}.text-button{background:none;color:#7057ff;font-weight:750;font-size:11px;padding:15px 0 0;text-align:left}.location{position:absolute;top:100px;right:32px;background:#fffdf7b8;border:1px solid #ffffff60;border-radius:30px;display:flex;align-items:center;gap:8px;padding:11px 15px;font-size:9px;letter-spacing:1.5px;font-weight:850}.location-dot{width:6px;height:6px;background:#37a79c;border-radius:50%}.controls-tip{position:absolute;bottom:28px;left:28px;font-size:10px;color:#345f6b;max-width:235px;line-height:1.7}kbd{font:inherit;font-weight:800;background:#fff9;border-radius:4px;padding:2px 5px}.buddy{position:absolute;left:50%;bottom:26px;transform:translateX(-50%);width:min(520px,60%);padding:17px 21px;background:#fffdf7f2;border:1px solid #fff;border-radius:22px;display:flex;gap:16px;align-items:center;box-shadow:0 8px 30px #234e6914;pointer-events:none}.buddy strong{font-size:10px;letter-spacing:1.2px;color:#7057ff}.buddy strong span{font-size:8px;color:#87959e;margin-left:9px;letter-spacing:1px}.buddy p{font-size:13px;line-height:1.5;margin:5px 0 0}.robot-face{width:40px;height:31px;flex-shrink:0;border-radius:10px;background:#17324b;border:4px solid #acb6ee;display:flex;gap:8px;align-items:center;justify-content:center;position:relative;transform:rotate(-6deg)}.robot-face:before{content:"";position:absolute;width:4px;height:8px;background:#adb6ed;top:-10px}.robot-face i{height:8px;width:5px;background:#80f1d9;border-radius:2px}.interact{position:absolute;bottom:140px;left:50%;transform:translateX(-50%);z-index:4;padding:13px 22px;font-size:14px;min-height:45px}.interact:active{transform:translateX(-50%) translateY(2px)}.interact span{font-size:11px;border:1px solid #fff7;border-radius:5px;padding:3px 6px}#world-labels{position:absolute;inset:0;pointer-events:none;z-index:2}.world-label{position:absolute;transform:translate(-50%,-100%);border-radius:12px;padding:7px 10px;font-size:11px;background:#fffdf7;color:#142447;box-shadow:0 3px 0 #27607120;font-weight:850;white-space:nowrap;pointer-events:auto;transition:opacity .2s}.world-label:after{content:"";position:absolute;left:calc(50% - 5px);bottom:-6px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid #fffdf7}.world-label span{color:#7a65db;font-size:12px;margin-right:4px}.world-label.passive{background:#ffffffa8;font-size:9px;letter-spacing:1.3px;pointer-events:none;box-shadow:none}.world-label.passive:after{display:none}.world-label.is-target{background:#7158ff;color:white;box-shadow:0 4px 0 #5041bc}.world-label.is-target:after{border-top-color:#7158ff}#intro-footer{position:absolute;bottom:24px;left:32px;right:32px;display:flex;justify-content:space-between;font-size:10px;color:#427383}.dpad{display:none}dialog{border:0;padding:0;border-radius:28px;width:min(480px,calc(100% - 30px));background:#fffdf7;color:#142447;box-shadow:0 25px 100px #123e6555;overflow:visible}dialog::backdrop{background:#18395270;backdrop-filter:blur(6px)}#dialog-content{padding:29px;text-align:center}.modal-eyebrow{color:#7057ff;font-size:10px;letter-spacing:2px;font-weight:850;margin-bottom:16px}.item-symbol{width:86px;height:86px;margin:0 auto 16px;border-radius:26px;display:flex;align-items:center;justify-content:center;background:#eee9ff;font-size:40px;transform:rotate(-5deg)}dialog h2{font-size:28px;letter-spacing:-1px;line-height:1.15;margin:0 0 12px}dialog p{color:#60717c;font-size:14px;line-height:1.6;margin:0 0 20px}.choices{display:flex;gap:9px;margin:20px 0 0}.choice{flex:1;padding:18px 7px;background:#f0eee8;border:2px solid transparent;border-radius:16px;color:#142447;font-weight:800;font-size:12px;min-height:95px}.choice>span{display:block;font-size:24px;margin-bottom:10px}.choice:hover,.choice:focus-visible{border-color:#7057ff;background:#f1ecff}.choice.wrong{border-color:#f2ba71;background:#fff5e1}.choice.right{border-color:#53b6a2;background:#e1f5e8}.modal-feedback{min-height:42px;font-size:13px!important;margin:16px 0 0!important;color:#536a68!important}.secondary{display:block;width:100%;background:#efede7;color:#526574;border-radius:14px;padding:13px;font-size:13px;font-weight:750;margin-top:12px}.dialog-close{position:absolute;right:16px;top:14px;border-radius:50%;width:30px;height:30px;background:#efede7;font-size:20px;color:#62737c}.help-steps{text-align:left;background:#f3f1ea;padding:15px 18px;border-radius:18px;margin:18px 0}.help-steps p{margin:7px 0;font-size:13px}.modal-badge{font-size:58px;margin:4px auto 15px}.result-stats{display:flex;gap:8px;margin:20px 0}.result-stats span{flex:1;border-radius:14px;background:#eef1e8;padding:12px 5px;font-size:11px;color:#5d716e}.result-stats b{display:block;color:#142447;font-size:22px;margin-bottom:4px}#toast{position:absolute;left:50%;top:88px;transform:translate(-50%,-10px);background:#142447;color:#fff;border-radius:30px;padding:12px 23px;font-weight:750;font-size:13px;opacity:0;transition:.25s;z-index:6;pointer-events:none;text-align:center}#toast.visible{opacity:1;transform:translate(-50%,0)}.error{position:absolute;inset:20%;background:#fffdf7;padding:30px;border-radius:24px;z-index:10;text-align:center}.playing #intro-footer{display:none}.playing .prototype{opacity:.65}
@media(max-width:1000px){.welcome{left:5%;width:330px}.welcome h1{font-size:59px}.welcome h2{font-size:26px}.mission{width:238px;padding:17px}.mission h2{font-size:20px}.buddy{width:47%;left:60%}.controls-tip{max-width:210px}.prototype{display:none}.topbar{left:22px;right:22px}.location{right:22px}.world-label{font-size:10px;padding:6px 8px}}
@media(max-width:700px){.topbar{top:max(18px,env(safe-area-inset-top));left:18px;right:18px}.brand{font-size:18px}.brand img{width:29px;height:29px}.brand small{font-size:6px;letter-spacing:1.5px}.icon-button{width:36px;height:36px}.welcome{top:auto;bottom:80px;left:25px;right:25px;transform:none;width:auto;pointer-events:none}.welcome h1{font-size:49px;letter-spacing:-2.8px;margin:15px 0 0}.welcome h2{font-size:25px;margin-bottom:12px}.welcome p{font-size:14px;margin:12px 0 17px;line-height:1.5}.welcome .eyebrow{font-size:8px}.welcome-details{margin-top:18px;font-size:10px}.welcome-note{display:none}.welcome .primary{font-size:15px;padding:14px 24px}.mission{top:77px;left:14px;width:220px;padding:14px;border-radius:18px}.mission h2{font-size:18px;margin:8px 0 5px}.mission p{font-size:11px}.progress-track{margin:10px 0}.inventory{font-size:9px}.text-button{font-size:10px;padding-top:12px}.location{right:14px;top:81px;font-size:7px;padding:9px;letter-spacing:.7px;max-width:130px}.location-dot{display:none}.controls-tip{display:none}.buddy{left:14px;right:14px;bottom:calc(15px + env(safe-area-inset-bottom));transform:none;width:auto;min-height:72px;padding:13px 14px;gap:12px;border-radius:18px}.buddy p{font-size:12px}.buddy strong span{font-size:7px}.dpad{display:grid;position:absolute;bottom:calc(110px + env(safe-area-inset-bottom));left:19px;grid-template:repeat(3,39px)/repeat(3,39px);gap:3px;touch-action:none}.dpad button,.dpad span{display:flex;align-items:center;justify-content:center;border-radius:12px;color:#273f5c;font-size:20px;font-weight:800;background:#fffdf7e0;user-select:none;-webkit-user-select:none;box-shadow:0 3px 0 #234a5920}.dpad span{background:#e7e1ffb5;color:#7057ff;font-size:14px;box-shadow:none}.dpad button:first-child{grid-area:1/2}.dpad button:nth-child(2){grid-area:2/1}.dpad span{grid-area:2/2}.dpad button:nth-child(4){grid-area:2/3}.dpad button:nth-child(5){grid-area:3/2}.dpad button.active{background:#7057ff;color:#fff}.interact{left:auto;right:18px;bottom:calc(148px + env(safe-area-inset-bottom));transform:none;padding:14px 17px;font-size:12px}.interact:active{transform:translateY(2px)}.interact span{display:none}.world-label{font-size:9px;padding:6px 7px}#intro-footer{left:25px;right:25px;font-size:8px;bottom:25px;gap:15px}.error{inset:15% 5%}#toast{width:80%;font-size:12px;top:60px}.choices{gap:7px}#dialog-content{padding:25px 22px}dialog h2{font-size:25px}}
@media(max-height:550px) and (min-width:701px){.welcome{top:53%}.welcome h1{font-size:52px;margin:12px 0 0}.welcome h2{font-size:24px;margin-bottom:10px}.welcome p{font-size:14px;margin:12px 0}.welcome-note{display:none}.welcome-details{margin-top:14px}.mission{top:78px}.buddy{bottom:14px;padding:11px 15px}.interact{bottom:105px}.location{top:78px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
dialog{max-height:calc(100svh - 24px);overflow-y:auto}button{touch-action:manipulation}@media(max-height:550px){#dialog-content{padding:22px}.modal-badge{font-size:32px;margin-bottom:8px}.item-symbol{width:52px;height:52px;font-size:28px;margin-bottom:10px}dialog h2{font-size:23px}dialog p{margin-bottom:12px}.choices{margin-top:12px}.choice{min-height:70px;padding:10px}.choice>span{margin-bottom:5px}.welcome-details{margin-top:12px}}
/* Keep projected labels anchored while pressed, so pointer-up still hits them. */
.world-label:active{transform:translate(-50%,calc(-100% + 2px))}

/* Adventure 02: readable choices, a reusable map, and a visual bridge experiment. */
.inventory .done{color:#23806e;font-weight:800}.map-button{display:block;width:100%;margin-top:13px;padding:10px;background:#eee9ff;border-radius:11px;color:#5a43cb;text-align:left;font-size:12px;font-weight:800}.treasure-map,.bridge-diagram{display:block;width:100%;height:auto;margin:16px 0}.answer-list{display:grid;gap:9px;text-align:left}.answer{display:flex;align-items:center;gap:12px;width:100%;min-height:58px;padding:13px 15px;border:2px solid transparent;border-radius:15px;background:#f0eee8;color:#142447;text-align:left;font-size:14px;font-weight:750;line-height:1.4}.answer>span{display:grid;place-items:center;flex:0 0 28px;height:28px;background:#fffdf7;border-radius:50%;color:#7057ff;font-size:12px}.answer:hover,.plank-choice:hover{border-color:#7057ff;background:#f1ecff}.answer.wrong,.plank-choice.wrong{background:#fff5e1;border-color:#e9bb79}.plank-choice.right{background:#e1f5e8;border-color:#53b6a2}.discovery-note{background:#eaf3e8;border-radius:12px;padding:10px 13px;font-size:12px!important}.map-clue{font-size:15px!important}.plank-options{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.plank-choice{min-height:82px;border:2px solid transparent;border-radius:14px;background:#f0eee8;padding:12px 5px;color:#142447;font-weight:750;font-size:11px}.plank-sample{display:block;height:12px;background:#c89160;border:1px solid #ab7c4d;border-radius:3px;margin:8px auto 14px;box-shadow:0 3px 0 #ab7c4d}.plank-sample.short{width:42%}.plank-sample.medium{width:62%}.plank-sample.long{width:88%}.net-icon{font-size:68px;color:#94769e;line-height:1;margin:12px 0 18px}.small-note{font-size:11px!important;margin:18px 0 0!important}.welcome h2{line-height:1.12}.mission .text-button{display:block}.trial-plank{animation:place-plank .3s ease-out}@keyframes place-plank{from{transform:translateY(-12px);opacity:.5}to{transform:translateY(0);opacity:1}}
@media(max-width:700px){.answer{font-size:13px;padding:11px;min-height:57px}.map-button{font-size:11px;padding:8px;margin-top:10px}.mission{width:210px}.treasure-map{margin:12px 0}.map-clue{font-size:13px!important}.plank-choice{font-size:10px}.welcome h2{font-size:24px}.welcome p{max-width:290px}}
@media(max-height:600px){.welcome{bottom:auto;top:52%;transform:translateY(-50%)}.welcome h1{font-size:46px;margin-top:12px}.welcome h2{font-size:23px}.welcome p{margin:10px 0}.welcome-details{margin-top:10px}.welcome-note{display:none}.answer{min-height:48px;padding:9px 12px}.treasure-map{max-height:130px}.bridge-diagram{max-height:115px}}

@media(prefers-reduced-motion:reduce){.trial-plank{animation:none}}

/* Adventure 03: beach decisions and a touch/keyboard accessible net puzzle. */
.beach-art{width:90px;height:90px;margin:0 auto 12px}.beach-actions{display:flex;gap:12px}.beach-actions button{flex:1;margin:0;padding:14px 10px;font-size:14px}.net-puzzle{position:relative;height:210px;margin:6px 0 12px;background:#e4f1ee;border-radius:20px;touch-action:none}.net-mesh{position:absolute;left:21%;right:21%;top:130px;height:55px;background:repeating-linear-gradient(90deg,transparent 0 15px,#94769e 15px 18px),repeating-linear-gradient(0deg,transparent 0 15px,#94769e 15px 18px);opacity:.7}.net-column{position:absolute;top:0;bottom:0;width:64px}.net-column.left{left:12%}.net-column.right{right:12%}.net-post{position:absolute;left:23px;top:92px;width:18px;height:100px;background:#bb8757;border-radius:8px 8px 2px 2px}.loop-target{position:absolute;left:6px;top:12px;width:52px;height:52px;background:#fffdf7;border:2px dashed #7057ff;border-radius:50%;color:#7057ff;font-size:26px}.net-loop{position:absolute;left:5px;top:128px;width:54px;height:44px;border:7px solid #8065ec;border-radius:50%;background:#ece6ff;color:#503ba8;font-weight:850;touch-action:none;z-index:2;box-shadow:0 3px 0 #49348e;cursor:grab}.net-loop:active{transform:none;cursor:grabbing}.net-loop.selected{border-color:#5335cf;background:#fff4be}.loop-done{position:absolute;left:0;top:130px;width:64px;background:#d6f2dd;color:#20663e;border-radius:10px;padding:10px 0;font-weight:800;font-size:12px}@media(max-height:700px){.net-puzzle{height:190px}.net-post{height:85px}.small-note{margin-top:12px!important}}

/* Adventure 04: rescued turtle and reused planks. */
.planks-found{width:150px;margin:18px auto 24px;transform:rotate(-7deg)}.planks-found i{display:block;height:16px;border-radius:3px;margin:5px 0;background:#c89160;border:2px solid #a37449}.planks-found i:nth-child(2){width:80%;margin-left:10%}.rescue-turtle{position:absolute;left:50%;top:48px;transform:translateX(-50%);width:190px;height:140px}.rescue-mesh{top:93px;height:88px;left:20%;right:20%;border-radius:25px;opacity:.8}.net-column{z-index:2}.net-puzzle .net-loop{top:130px}.net-puzzle .loop-done{top:130px}
