*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}body{font-family:ui-rounded,'Arial Rounded MT Bold',system-ui,sans-serif;background:#7dd7f5;color:#103978;user-select:none;-webkit-user-select:none}button,a{-webkit-tap-highlight-color:transparent;touch-action:manipulation}button{font:inherit;cursor:pointer}button:focus-visible,a:focus-visible{outline:4px solid #ffde45;outline-offset:4px}#app{height:100dvh;position:relative;overflow:hidden;background:linear-gradient(#53c4ef,#c0f4ff)}#scene{width:100%;height:100%;display:block;touch-action:none;outline:none}header{position:absolute;top:max(12px,env(safe-area-inset-top));left:16px;right:16px;display:flex;align-items:flex-start;gap:12px;pointer-events:none}header>*{pointer-events:auto}.square{display:flex;align-items:center;justify-content:center;flex-direction:column;flex-shrink:0;min-width:64px;height:66px;padding:6px 12px;border:3px solid white;border-radius:21px;color:white;font-weight:900;font-size:34px;text-decoration:none;text-shadow:0 2px 2px #1644759c;box-shadow:inset 0 3px 0 #ffffffa3,inset 0 -5px 0 #0002,0 4px 0 #24739b88,0 5px 13px #16447533;transition:transform .12s}.square:active{transform:translateY(3px)}.square span{font-size:13px;line-height:1.2}.blue{background:linear-gradient(#25d5ff,#0877dd)}.orange{background:linear-gradient(#ffbf31,#f77a00)}.pink{background:linear-gradient(#ff70b5,#e92980)}.purple{background:linear-gradient(#cd90ff,#8140d9)}.green{background:linear-gradient(#83e332,#1ba134)}.yellow{background:linear-gradient(#ffe645,#eba400)}h1{font-size:clamp(22px,3.2vw,48px);letter-spacing:-2px;line-height:1;margin:0 auto;padding:12px 22px;background:linear-gradient(#ffe76c,#ffca23);border:4px solid #fff;border-radius:34% 24% 30% 20%;box-shadow:0 5px 0 #07a6e5,0 8px 0 #fff9;text-shadow:2px 2px white,-2px -2px white;transform:rotate(-2deg)}h1 span{display:block;font-size:10px;text-shadow:none;letter-spacing:3px;text-align:center;margin-top:8px}.meter{background:linear-gradient(white,#d4edfa);padding:12px 18px;border:3px solid #fff;border-radius:24px;box-shadow:0 5px 0 #1787b8aa;min-width:220px;font-size:clamp(14px,1.6vw,24px)}.track{height:20px;background:#9cbed5;border:2px solid #688ba3;border-radius:20px;margin-top:7px;overflow:hidden;box-shadow:inset 0 2px 4px #0003}#fill{display:block;width:0;height:100%;border-radius:20px;background:linear-gradient(#beff5b,#39d206 50%,#37aa00);box-shadow:inset 0 3px 0 #fff8;transition:width .2s}#mission{position:absolute;right:20px;top:105px;display:flex;flex-direction:column;align-items:flex-end;gap:2px;padding:10px 17px;background:#ffffffed;border:2px solid white;border-radius:18px;box-shadow:0 3px 12px #14375325}#mission span{font-size:13px;font-weight:800}#timer{font-variant-numeric:tabular-nums;font-size:24px}#target{color:#917029}footer{position:absolute;bottom:max(16px,env(safe-area-inset-bottom));left:16px;right:16px;display:flex;gap:12px;align-items:flex-end;pointer-events:none}footer>*{pointer-events:auto}footer .square{height:86px;min-width:95px}#toolBadge{margin-left:auto;align-self:center;padding:10px 18px;border-radius:18px;background:#fffE;display:flex;flex-direction:column;box-shadow:0 3px 12px #0002}#toolBadge small{font-size:11px;color:#54728d}#hint{position:absolute;bottom:120px;left:50%;transform:translateX(-50%);padding:10px 22px;border-radius:30px;background:#123d65bb;color:#fff;font-size:14px;font-weight:700;pointer-events:none;white-space:nowrap;transition:opacity .5s}dialog{border:4px solid white;border-radius:30px;background:linear-gradient(#f9fdff,#e3f4fb);color:#163e70;box-shadow:0 15px 60px #002f6480;width:min(880px,94vw);max-height:90dvh;padding:24px}dialog::backdrop{background:#07365a70;backdrop-filter:blur(7px)}.panel-head{display:flex;align-items:center;justify-content:space-between}.eyebrow{font-size:11px;font-weight:900;letter-spacing:3px;color:#0999cc}.panel-head button{border:0;background:#dbeaf3;border-radius:50%;width:35px;height:35px;font-size:25px;color:#184d78}h2{font-size:32px;margin:10px 0 6px;letter-spacing:-1px}p{line-height:1.6;margin:8px 0 18px;color:#526c82}.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.card{padding:0;border:3px solid white;border-radius:20px;overflow:hidden;background:#fff;text-align:left;color:#153d70;box-shadow:0 4px 0 #b7dae9;transition:transform .15s}.card:hover:not(:disabled){transform:translateY(-3px)}.card img{width:100%;aspect-ratio:16/9;object-fit:cover;display:block}.card .copy{display:flex;flex-direction:column;padding:11px 14px;gap:5px}.card strong{font-size:17px}.card small{font-size:12px;color:#60768d}.card:disabled{opacity:.65;cursor:default}.stars{color:#e8ab00;letter-spacing:3px}.primary{padding:14px 28px;border:3px solid white;border-radius:20px;background:linear-gradient(#72db35,#23ac42);box-shadow:0 4px 0 #12782a;color:white;font-weight:900;font-size:18px}.secondary{padding:12px 20px;border:2px solid #bfdfed;border-radius:16px;background:white;color:#1f5884;font-weight:800}.actions{display:flex;justify-content:center;gap:12px;margin-top:22px;flex-wrap:wrap}.welcome{text-align:center;max-width:550px;margin:auto}.welcome h2{font-size:40px}.welcome .big{font-size:60px}.tool-card{padding:18px}.tool-card .symbol{font-size:36px;margin:8px 0}.tool-card.selected{border-color:#48b95e}.tool-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}#loading{position:absolute;inset:0;background:#dff5ffed;z-index:20;display:flex;align-items:center;justify-content:center;gap:20px;flex-direction:column}#loading[hidden]{display:none}.spinner{width:45px;height:45px;border:5px solid #acdcea;border-top-color:#0b9ad9;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}#toast{position:absolute;top:45%;left:50%;transform:translate(-50%,-50%);background:#103d72e8;color:white;padding:16px 24px;border:2px solid white;border-radius:20px;pointer-events:none;opacity:0;transition:opacity .2s;text-align:center;max-width:90%}

/* Compact controls around a protected, uniformly scaled scene. */
#playArea{position:absolute;inset:0;overflow:hidden}#scene{width:100%;height:100%}
header{top:max(10px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));display:grid;grid-template-columns:64px minmax(165px,240px) 1fr 64px 64px;grid-template-areas:"home meter title sound pause" ". . mission . .";gap:8px 12px;align-items:center}
header>a{grid-area:home}header .meter{grid-area:meter;min-width:0;font-size:18px;padding:10px 14px}h1{grid-area:title;font-size:clamp(22px,3vw,40px);padding:10px 18px;transform:none;letter-spacing:-1px;text-align:center}h1 span{font-size:8px;letter-spacing:2px}#sound{grid-area:sound}#pause{grid-area:pause}
#mission{grid-area:mission;position:static;justify-self:center;display:flex;flex-direction:row;align-items:center;gap:10px;padding:5px 12px;border-radius:14px;white-space:nowrap}#mission span{font-size:12px}#timer{font-size:17px}#target{font-size:11px}
footer{left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));display:grid;grid-template-columns:auto 1fr;gap:8px;align-items:end}
#hint{position:static;grid-column:1/-1;justify-self:center;transform:none;margin:0;max-width:100%;padding:5px 12px;font-size:12px;white-space:normal;text-align:center;min-height:26px}
.stages{display:flex;gap:8px;align-items:center;justify-self:start}.actions-right{display:flex;gap:10px;justify-self:end}
.stage{min-height:56px;padding:10px 18px;border:3px solid white;border-radius:18px;background:linear-gradient(#e9faff,#9bd8ef);color:#164b78;font:800 15px ui-rounded,system-ui,sans-serif;box-shadow:inset 0 3px #fff9,0 4px #24739b88;white-space:nowrap}
.stage[aria-pressed=true]{background:linear-gradient(#44c6ff,#0874c8);color:white}.stage:disabled{opacity:.65;cursor:default}.stage[aria-pressed=true]:disabled{opacity:1}
footer .square{height:66px;min-width:76px;font-size:28px}footer .square span{font-size:11px}
#toast{top:auto;bottom:90px;padding:8px 14px;font-size:12px;transform:translateX(-50%);max-width:80%}header .meter,header h1,#mission{pointer-events:none}
.panel-head{position:sticky;top:-24px;background:#f2faff;z-index:2;padding:4px 0}.panel-head button{width:44px;height:44px;flex-shrink:0}
@media(max-width:700px){header{grid-template-columns:44px minmax(0,1fr) 44px 44px;grid-template-areas:"home title sound pause" "meter meter mission mission";gap:7px;left:8px;right:8px;top:max(8px,env(safe-area-inset-top))}.square{min-width:44px;height:44px;padding:4px;border-radius:15px;font-size:25px;border-width:2px}h1{font-size:clamp(15px,4.4vw,23px);padding:9px 4px;letter-spacing:-.7px;width:100%;border-width:2px;margin:0}h1 span{display:none}header .meter{padding:5px 8px;font-size:12px;border-width:2px;border-radius:14px}.track{height:9px;margin-top:4px}#mission{padding:4px 7px;gap:4px;justify-self:stretch;flex-wrap:wrap;justify-content:space-between;border-width:2px}#mission span{width:100%;font-size:10px;overflow:hidden;text-overflow:ellipsis}#timer{font-size:12px}#target{font-size:9px}footer{left:8px;right:8px;bottom:max(8px,env(safe-area-inset-bottom));gap:6px}.stages{gap:5px}.stage{font-size:12px;padding:6px 8px;min-height:44px;border-width:2px;border-radius:14px}.actions-right{gap:5px}footer .square{height:48px;min-width:48px;font-size:23px;padding:4px}footer .square span{font-size:9px}#hint{font-size:10px;padding:4px 8px;min-height:24px}dialog{padding:16px}.panel-head{top:-16px}.cards{grid-template-columns:repeat(2,1fr);gap:8px}.card strong{font-size:14px}.card .copy{padding:8px}.welcome h2{font-size:28px}.welcome .big{font-size:40px}.tool-grid{grid-template-columns:1fr}}
@media(orientation:portrait) and (max-width:400px){.stages{flex-direction:column;gap:4px}.stage{min-height:36px;width:104px;font-size:11px;padding:4px 7px}.actions-right{gap:7px}footer .square{min-width:52px;height:56px}#toast{bottom:120px}}
@media(orientation:landscape) and (max-height:550px){header{grid-template-columns:42px minmax(115px,160px) 1fr minmax(110px,150px) 42px 42px;grid-template-areas:"home meter title mission sound pause";gap:7px;top:max(6px,env(safe-area-inset-top));left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right))}.square{min-width:42px;height:42px;font-size:24px;border-width:2px;padding:4px}h1{font-size:clamp(14px,2.7vw,23px);padding:8px 4px;border-width:2px;letter-spacing:-.6px}h1 span{display:none}header .meter{font-size:11px;padding:5px 7px;border-width:2px}.track{height:9px;margin-top:4px}#mission{padding:4px 6px;flex-wrap:wrap;justify-content:space-between;gap:2px}#mission span{width:100%;font-size:10px}#timer{font-size:12px}#target{font-size:9px}footer{bottom:max(6px,env(safe-area-inset-bottom));gap:4px}.stage{min-height:44px;padding:5px 12px;font-size:12px;border-width:2px}footer .square{height:46px;min-width:58px;font-size:23px}footer .square span{font-size:9px}#hint{font-size:10px;min-height:20px;padding:3px 8px}#toast{bottom:65px}dialog{max-height:94dvh;padding:14px}.panel-head{top:-14px}.welcome .big{display:none}.welcome h2{font-size:25px}.welcome p{font-size:13px;line-height:1.4;margin:6px 0}.actions{margin-top:12px}.primary,.secondary{padding:9px 16px;font-size:14px}}

@media(orientation:portrait) and (max-width:700px){header{display:flex;flex-wrap:wrap;align-items:center}header>a{order:0;width:44px}h1{order:1;flex:1;width:auto}#sound{order:2;width:44px}#pause{order:3;width:44px}header .meter{order:4;flex:0 0 calc(50% - 4px);margin:0}#mission{order:5;flex:0 0 calc(50% - 4px);min-width:0}#mission span{font-size:10px}}

#rotateNotice{display:none;position:fixed;inset:0;z-index:9999;align-items:center;justify-content:center;padding:24px;background:#0a345c99;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}.rotateCard{max-width:420px;padding:24px 36px;border:3px solid white;border-radius:24px;background:#f5fcff;color:#163e70;text-align:center;font-size:clamp(18px,3vw,25px);box-shadow:0 12px 45px #1238}.rotateCard div{font-size:44px;margin-bottom:10px}footer{grid-template-columns:1fr}.actions-right{grid-column:1;justify-self:end}
@media (orientation:landscape){.portrait-only-device #rotateNotice{display:flex}.portrait-only-device dialog{visibility:hidden}}

.landmark-preview{display:block;position:relative;overflow:hidden;aspect-ratio:16/9;background:var(--landmark-backdrop) var(--landmark-x) var(--landmark-y)/cover}
.landmark-preview img{position:absolute;left:var(--landmark-x);transform:translateX(-50%);top:0;height:calc(var(--landmark-y) + 5%);object-fit:contain;object-position:center bottom}
.landmark-card .location{font-size:11px;line-height:1.25;color:#476a86}
