/* wingsuit.css - stage, HUD, touch buttons and menu panels for Wingsuit Glide 3D. Everything is scoped under #stage so the
   site frame styles cannot leak in. System fonts only; no images. */
.wg-toolbar{display:flex;gap:8px;justify-content:center;margin:.5rem 0 0}
.wg-toolbar button{min-height:44px;padding:.55rem 1.1rem;border:0;border-radius:10px;background:#0E7490;color:#fff;font:700 .9rem/1 var(--wgf);cursor:pointer;touch-action:manipulation}
.wg-toolbar button:focus-visible{outline:3px solid #fbbf24;outline-offset:2px}
.stage,.wg-toolbar{--wgf:'Plus Jakarta Sans',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif}
.stage{position:relative;width:100%;aspect-ratio:9/14;max-height:84vh;background:#0b1630;border-radius:12px;overflow:hidden;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;color:#eaf2ff;font-family:'Plus Jakarta Sans',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif}
.stage:fullscreen{width:100vw;height:100vh;max-height:none;aspect-ratio:auto;border-radius:0}
.stage:-webkit-full-screen{width:100vw;height:100vh;max-height:none;aspect-ratio:auto;border-radius:0}
.stage.is-big,html.pip-immersive .stage{position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;max-height:none;aspect-ratio:auto;border-radius:0;z-index:2147483000}
html.wgl-big{overflow:hidden}
#stage canvas#game{position:absolute;inset:0;width:100%;height:100%;display:block;margin:0;border-radius:0;box-shadow:none;max-width:none}
#stage .layer{position:absolute;inset:0}
#vig{pointer-events:none;z-index:1;opacity:0;background:radial-gradient(ellipse at center,rgba(0,0,0,0) 55%,rgba(10,20,40,.7) 100%);transition:opacity .2s}
#touch{z-index:2;touch-action:none}
#stick-base,#stick-knob{position:absolute;left:0;top:0;pointer-events:none;z-index:3;opacity:0;border-radius:50%}
#stick-base{width:80px;height:80px;border:2px solid rgba(255,255,255,.5);background:rgba(255,255,255,.08)}
#stick-knob{width:40px;height:40px;background:rgba(255,255,255,.55);box-shadow:0 0 12px rgba(120,200,255,.6)}
#hud{z-index:4;pointer-events:none;display:none}
#hud.on{display:block}
#hud button{pointer-events:auto}
.h-top{position:absolute;top:calc(6px + env(safe-area-inset-top));left:8px;right:8px;display:flex;justify-content:space-between;align-items:flex-start;gap:6px;text-shadow:0 1px 3px rgba(0,0,0,.7)}
.h-left{min-width:86px}.h-score{font:800 1.5rem/1 var(--wgf)}.h-combo{font:700 .78rem/1.3 var(--wgf);color:#ffd23f;min-height:1em}
.h-mid{text-align:center;font:700 .78rem/1.35 var(--wgf);flex:1}.h-gap{color:#ff9d9d}.h-gap.ahead{color:#8dffb0}
.h-pause{width:46px;height:46px;border-radius:12px;border:1px solid rgba(255,255,255,.35);background:rgba(10,20,40,.5);color:#fff;font:800 .95rem/1 var(--wgf);touch-action:manipulation}
.h-meter{position:absolute;top:calc(58px + env(safe-area-inset-top));left:8px;display:flex;align-items:center;gap:6px;width:150px}
.h-meter .bar,.wbar{flex:1;height:8px;border-radius:5px;background:rgba(255,255,255,.18);overflow:hidden}
.h-meter .bar i{display:block;height:100%;width:0;background:linear-gradient(90deg,#4ade80,#fde047,#fb923c)}
.h-meter b{font:800 .8rem/1 var(--wgf);min-width:2.6em}.h-meter b.hot{color:#fde047}
.h-lives{position:absolute;top:calc(76px + env(safe-area-inset-top));left:8px;font:700 .75rem/1 var(--wgf);color:#ff9d9d;letter-spacing:.05em}
.h-chip{position:absolute;top:calc(56px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);padding:4px 10px;border-radius:99px;background:rgba(10,20,40,.55);font:700 .75rem/1.2 var(--wgf);white-space:nowrap}
.h-chip:empty{display:none}
.h-cue{position:absolute;top:34%;left:0;right:0;text-align:center;font:800 1.5rem/1.1 var(--wgf);opacity:0;text-shadow:0 2px 6px rgba(0,0,0,.7)}
.h-cue.on{opacity:1}.h-cue.warn{color:#ff6b6b;animation:wgblink .5s steps(2) infinite}.h-cue.info{color:#fde047}
.h-hint,.h-toast{position:absolute;left:12px;right:12px;text-align:center;padding:8px 12px;border-radius:12px;background:rgba(10,20,40,.72);font:600 .88rem/1.35 var(--wgf);opacity:0;transition:opacity .25s}
.h-hint{top:calc(92px + env(safe-area-inset-top))}.h-toast{top:46%}
.h-hint.on,.h-toast.on{opacity:1}
.h-pop{position:absolute;left:0;right:0;top:44%;text-align:center;font:800 1.2rem/1 var(--wgf);opacity:0;text-shadow:0 2px 5px rgba(0,0,0,.7)}
.h-pop.on{animation:wgpop 1.1s ease-out forwards}.h-pop.k-perfect{color:#fff;font-size:1.45rem}.h-pop.k-ring{color:#ffd23f}.h-pop.k-miss{color:#ff8080}.h-pop.k-landing{color:#8dffb0;font-size:1.5rem}.h-pop.k-flip,.h-pop.k-roll,.h-pop.k-fall,.h-pop.k-nearmiss{color:#7dd3fc}
.h-info{position:absolute;left:8px;bottom:calc(76px + env(safe-area-inset-bottom));font:700 .72rem/1.35 var(--wgf);text-shadow:0 1px 3px rgba(0,0,0,.8);opacity:.92}
.h-info .gold{color:#ffe14d}
.h-btns{position:absolute;left:0;right:0;bottom:calc(8px + env(safe-area-inset-bottom));display:flex;gap:6px;justify-content:center;padding:0 8px}
.tbtn{flex:1;min-width:52px;max-width:92px;height:58px;border-radius:14px;border:1px solid rgba(255,255,255,.4);background:rgba(10,20,40,.55);color:#fff;font:800 .7rem/1 var(--wgf);letter-spacing:.03em;touch-action:none;-webkit-user-select:none;user-select:none}
.tbtn.big{flex:1.35;background:rgba(14,116,144,.78);border-color:rgba(165,243,252,.7)}
.tbtn.on{background:rgba(255,255,255,.35)}.tbtn.dim{opacity:.55}.tbtn.pulse{animation:wgpulse .8s ease-in-out infinite;border-color:#fde047}
#notice{position:absolute;z-index:6;top:8px;left:10px;right:10px;padding:8px 12px;border-radius:12px;background:rgba(15,23,42,.92);color:#fff;font:600 .82rem/1.35 var(--wgf);text-align:center;display:none}
#notice.on{display:block}
#screens{z-index:5;display:none;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;touch-action:pan-y;background:linear-gradient(rgba(6,14,32,.55),rgba(6,14,32,.86))}
#screens.on{display:block}
#fade{z-index:7;background:#05070d;opacity:1;pointer-events:none;transition:none}
#nogl,#lost{position:absolute;inset:0;z-index:9;display:flex;align-items:center;justify-content:center;text-align:center;padding:24px;background:#0b1630;font:600 1rem/1.5 var(--wgf)}
#nogl[hidden],#lost[hidden],#loading[hidden],#exitbig[hidden]{display:none}
#loading{position:absolute;inset:0;z-index:8;display:flex;align-items:center;justify-content:center;background:#0b1630;font:700 1rem/1 var(--wgf);pointer-events:none}
#exitbig{position:absolute;z-index:8;left:50%;transform:translateX(-50%);bottom:calc(2px + env(safe-area-inset-bottom));min-height:26px;padding:3px 14px;border-radius:99px;border:1px solid rgba(255,255,255,.3);background:rgba(10,20,40,.55);color:#fff;font:700 .7rem/1 var(--wgf);opacity:.8}
#stage .wpanel{min-height:100%;padding:16px 14px 20px;display:flex;flex-direction:column;gap:10px}
#stage h2{font:800 1.4rem/1.15 var(--wgf);margin:2px 0;color:#fff}
#stage .logo{text-align:center;margin-top:14px;line-height:.95}#stage .logo span{display:block;font:800 1rem/1 var(--wgf);letter-spacing:.35em;color:#a5f3fc}#stage .logo b{display:block;font:900 2.5rem/1 var(--wgf);color:#fff;text-shadow:0 3px 0 #0E7490}
#stage .tag,#stage .note{font:500 .85rem/1.45 var(--wgf);color:#cfe0f7;margin:0}#stage .tag{text-align:center}
#stage .coins{text-align:center;font:800 1rem/1 var(--wgf);color:#ffe14d}
#stage .stack{display:flex;flex-direction:column;gap:8px;margin-top:4px}
#stage .row4{display:grid;grid-template-columns:1fr 1fr;gap:8px}#stage .row2{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#stage .wbtn{min-height:46px;padding:.6rem 1rem;border-radius:12px;border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.1);color:#fff;font:700 .95rem/1.1 var(--wgf);cursor:pointer;text-align:center;touch-action:manipulation;text-decoration:none;box-shadow:none}
#stage .wbtn.small{min-height:44px;font-size:.85rem}#stage .wbtn.big{min-height:56px;font-size:1.15rem}
#stage .wbtn.primary{background:linear-gradient(#0ea5c6,#0E7490);border-color:#67e8f9}#stage .wbtn.accent{background:linear-gradient(#f59e0b,#d97706);border-color:#fcd34d;color:#1a1204}
#stage .wbtn.ghost{background:transparent}#stage .wbtn.dim{opacity:.6}#stage .wbtn.danger{background:#b91c1c;border-color:#fca5a5}
#stage .wbtn:focus-visible,#stage .chip:focus-visible,#stage .card:focus-visible{outline:3px solid #fde047;outline-offset:2px}
#stage .cards{display:flex;flex-direction:column;gap:8px}
#stage .card{text-align:left;padding:10px 12px;border-radius:12px;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.09);color:#fff;font-family:inherit;min-height:60px;cursor:pointer;touch-action:manipulation}
#stage .card.locked{opacity:.5;cursor:default}#stage .c-name{font:800 1rem/1.2 var(--wgf)}#stage .c-meta{font:500 .75rem/1.4 var(--wgf);color:#b6cbe8}
#stage .c-row{display:flex;align-items:center;gap:6px;font:600 .72rem/1 var(--wgf);color:#b6cbe8;margin-top:4px}#stage .c-row .best{margin-left:auto;color:#fff;font-weight:800}#stage .c-lock{font:600 .72rem/1.4 var(--wgf);color:#fca5a5;margin-top:3px}
#stage .pips{display:inline-flex;gap:3px}#stage .pips i{width:11px;height:11px;border-radius:50%;background:rgba(255,255,255,.2)}
#stage .pips i.on{background:#cd7f32}#stage .pips i.on.m2{background:#c0c7d0}#stage .pips i.on.m3{background:#ffd23f}#stage .pips.lv i.on{background:#4ade80}
#stage .lbl{font:800 .72rem/1 var(--wgf);letter-spacing:.12em;text-transform:uppercase;color:#7dd3fc;margin-top:6px}
#stage .chips{display:flex;flex-wrap:wrap;gap:6px}#stage .chip{min-height:44px;padding:.4rem .9rem;border-radius:99px;border:1px solid rgba(255,255,255,.3);background:rgba(255,255,255,.08);color:#fff;font:700 .85rem/1 var(--wgf);cursor:pointer;touch-action:manipulation}
#stage .chip.on{background:#0E7490;border-color:#67e8f9}
#stage .big-stat{text-align:center}#stage .big-stat b{display:block;font:900 2.6rem/1 var(--wgf);color:#fff}#stage .big-stat span{font:700 .8rem/1 var(--wgf);color:#7dd3fc;text-transform:uppercase;letter-spacing:.1em}
#stage .medals{display:flex;gap:16px;justify-content:center;font:700 .8rem/1 var(--wgf)}#stage .md{display:flex;flex-direction:column;align-items:center;gap:6px}
#stage .stats{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}#stage .st{background:rgba(255,255,255,.08);border-radius:10px;padding:6px 2px;text-align:center}#stage .st b{display:block;font:800 .95rem/1.2 var(--wgf)}#stage .st span{font:600 .62rem/1.2 var(--wgf);color:#b6cbe8}
#stage .earn{text-align:center;font:800 1.1rem/1 var(--wgf);color:#ffe14d}
#stage .toast-line{padding:7px 10px;border-radius:10px;background:rgba(14,116,144,.5);font:600 .8rem/1.35 var(--wgf)}#stage .toast-line.ach{background:rgba(180,120,10,.5)}
#stage .suits{display:grid;grid-template-columns:1fr 1fr;gap:8px}#stage .suit{display:flex;flex-direction:column;gap:5px;align-items:stretch;padding:8px;border-radius:12px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.2)}
#stage .suit.eq{border-color:#4ade80}#stage .suit canvas{align-self:center;width:72px;height:72px}#stage .sname{font:800 .95rem/1 var(--wgf);text-align:center}
#stage .sbar{display:flex;align-items:center;gap:6px;font:600 .62rem/1 var(--wgf);color:#b6cbe8}#stage .sbar span{width:34px}#stage .sbar .bar{flex:1;height:6px;border-radius:4px;background:rgba(255,255,255,.15);overflow:hidden}#stage .sbar i{display:block;height:100%;background:#38bdf8}
#stage .tagon{text-align:center;font:800 .8rem/1 var(--wgf);color:#4ade80;padding:.6rem 0}
#stage .ups{display:flex;flex-direction:column;gap:6px}#stage .up{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:12px;background:rgba(255,255,255,.08)}#stage .un{flex:1;display:flex;flex-direction:column;font-family:inherit}#stage .un b{font-size:.85rem}#stage .un span{font-size:.68rem;color:#b6cbe8}
#stage .mlist{display:flex;flex-direction:column;gap:6px}#stage .mis{display:flex;justify-content:space-between;gap:8px;padding:9px 10px;border-radius:10px;background:rgba(255,255,255,.08);font:500 .8rem/1.35 var(--wgf)}#stage .mis.ok{background:rgba(34,197,94,.22)}#stage .mis b{color:#ffe14d;white-space:nowrap}
#stage .slide{display:flex;flex-direction:column;gap:4px;font:600 .8rem/1 var(--wgf)}#stage .slide input{width:100%;min-height:44px}
#stage .hrow{display:flex;flex-direction:column;gap:2px;padding:7px 10px;border-radius:10px;background:rgba(255,255,255,.08);font-family:inherit}#stage .hrow b{font-size:.85rem;color:#a5f3fc}#stage .hrow span{font-size:.8rem;line-height:1.4}
#stage .sr{position:absolute;left:-9999px}
@keyframes wgpop{0%{opacity:0;transform:translateY(14px) scale(.8)}15%{opacity:1;transform:translateY(0) scale(1.1)}70%{opacity:1}100%{opacity:0;transform:translateY(-34px)}}
@keyframes wgblink{50%{opacity:.35}}
@keyframes wgpulse{50%{background:rgba(253,224,71,.4)}}
@media (min-width:640px){.stage{max-height:80vh}}
@media (orientation:landscape) and (max-height:520px){.h-info{display:none}.h-hint{top:calc(60px + env(safe-area-inset-top))}.tbtn{height:50px}.h-cue{top:28%}#stage .logo b{font-size:1.9rem}}
@media (prefers-reduced-motion:reduce){.h-pop.on{animation-duration:.01s}.tbtn.pulse,.h-cue.warn{animation:none}}
.wg-guide{max-width:44rem;margin:1.5rem auto;padding:1rem;line-height:1.7}
.wg-guide h2{font-size:1.35rem;margin-bottom:.6rem}.wg-guide h3{font-size:1.05rem;margin:1.2rem 0 .4rem}.wg-guide ul{padding-left:1.2rem}
#stage .note.tip{border-left:3px solid #67e8f9;padding-left:8px;color:#e6f4ff}
/* full screen under the shared shell: the dock (top, or a left rail in short landscape) owns the top edge, so the whole play
   area (canvas, HUD, menus, stick) starts below it. The shell's own Full screen button replaces Play big. */
html.pip-immersive{--wg-top:calc(var(--pip-dock-h,52px) + env(safe-area-inset-top,0px))}
html.pip-immersive #stage canvas#game{top:var(--wg-top);bottom:0;height:calc(100% - var(--wg-top))}
html.pip-immersive #stage .layer,html.pip-immersive #stage #loading,html.pip-immersive #stage #nogl,html.pip-immersive #stage #lost{top:var(--wg-top);bottom:0}
html.pip-immersive #stick-base,html.pip-immersive #stick-knob{top:var(--wg-top)}
html.pip-immersive #notice{top:calc(var(--wg-top) + 6px)}
html.pip-immersive .h-top{top:6px}
html.pip-immersive .h-meter{top:58px}
html.pip-immersive .h-lives{top:76px}
html.pip-immersive #exitbig,html.pip-immersive .wg-toolbar{display:none}
html.pip-immersive .stage{overflow:hidden}
html.pip-immersive #stage .tbtn{min-height:44px}
html.pip-immersive #screens{padding-bottom:env(safe-area-inset-bottom,0px)}
.h-pause,.tbtn{transition:transform .08s ease-out,background-color .12s}
.tbtn:active,.h-pause:active{transform:scale(.94);background:rgba(30,60,100,.7)}
.h-score{text-shadow:0 2px 6px rgba(0,0,0,.65)}
.wg-toolbar[hidden]{display:none}
/* landscape full screen: the shell dock sits at the left, so the stage already starts beside it and nothing is needed on top */
@media (orientation:landscape){html.pip-immersive,html.pip-native{--wg-top:env(safe-area-inset-top,0px)}html.pip-immersive #stage,html.pip-native #stage{overflow:hidden}html.pip-native #stage canvas#game{height:100%}}
