/* Rain City Run: game styles. Everything is scoped under #stage so site CSS cannot leak in. */
[hidden]{display:none!important}
.stage{position:relative;width:100%;aspect-ratio:9/15;min-height:380px;max-height:88vh;background:#070b22;border-radius:14px;overflow:hidden;color:#e6f1ff;font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;margin:0 auto}
.stage.big{position:fixed;inset:0;z-index:2147483000;width:100vw;height:100vh;height:100dvh;max-height:none;aspect-ratio:auto;border-radius:0;min-height:0}
html.pip-big,html.pip-big body{overflow:hidden}
#stage canvas#c{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none;outline:none}
#stage #speed{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
#stage #flash{position:absolute;inset:0;background:#ff2d95;opacity:0;pointer-events:none;transition:opacity .35s}
#stage #vig{position:absolute;inset:0;pointer-events:none;opacity:0;background:radial-gradient(ellipse at center,transparent 55%,rgba(255,45,149,.55) 100%)}
#stage button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}
#stage .iconbtn{min-width:44px;min-height:44px;border-radius:12px;border:1px solid rgba(160,230,255,.35);background:rgba(10,16,48,.62);font-weight:800;font-size:15px;pointer-events:auto}
#stage #bigBtn{position:absolute;top:8px;right:8px;z-index:6;padding:0 12px;font-size:13px}
#stage #hud:not([hidden]) ~ #bigBtn{top:60px}
#stage #hud{position:absolute;inset:0;pointer-events:none}
#stage .hud-top{display:flex;align-items:flex-start;justify-content:space-between;padding:8px 8px 0;padding-top:max(8px,env(safe-area-inset-top))}
#stage .hud-l b{display:block;font:800 22px/1.1 ui-monospace,Menlo,Consolas,monospace;text-shadow:0 1px 6px #000}
#stage #hSplit{font:700 13px ui-monospace,monospace}
#stage #hSplit.ahead{color:#7dffb0}#stage #hSplit.behind{color:#ff8aa8}
#stage .hud-c{display:flex;flex-direction:column;align-items:center;font-size:12px;opacity:.85;text-shadow:0 1px 4px #000;padding-top:2px}
#stage .hud-stats{position:absolute;left:10px;top:max(58px,calc(env(safe-area-inset-top) + 50px));display:flex;flex-direction:column;gap:2px;font:700 13px ui-monospace,monospace;text-shadow:0 1px 4px #000}
#stage #hChain{color:#ffb347;font-size:15px}
#stage #reticle{position:absolute;left:50%;top:46%;width:14px;height:14px;margin:-7px;border:2px solid rgba(220,245,255,.7);border-radius:50%;opacity:0;transition:transform .12s}
#stage #reticle.on{opacity:.85}#stage #reticle.lock{border-color:#ffb347;border-radius:2px;transform:rotate(45deg) scale(1.5);background:rgba(255,179,71,.25)}#stage #reticle.grap{border-color:#ff2d95}
#stage #toast{position:absolute;left:0;right:0;top:24%;text-align:center;font-weight:800;font-size:20px;text-shadow:0 2px 8px #000;opacity:0;transition:opacity .2s;padding:0 16px}
#stage #toast.on{opacity:1}
#stage #hintBar{position:absolute;left:12px;right:12px;top:34%;text-align:center;font-size:15px;font-weight:700;padding:8px 10px;border-radius:10px;background:rgba(8,12,40,.7);opacity:0;transition:opacity .25s}
#stage #hintBar.on{opacity:1}
#stage .touch{display:none}
body.touchy #stage .touch{display:block}
#stage #stick{position:absolute;left:calc(10px + env(safe-area-inset-left));bottom:calc(14px + env(safe-area-inset-bottom));width:112px;height:112px;border-radius:50%;background:rgba(20,40,90,.38);border:2px solid rgba(160,230,255,.35);pointer-events:auto;touch-action:none}
#stage #stickKnob{position:absolute;left:50%;top:50%;width:46px;height:46px;margin:-23px;border-radius:50%;background:rgba(160,230,255,.55);border:2px solid rgba(255,255,255,.6);pointer-events:none}
#stage .tbtn{position:absolute;pointer-events:auto;touch-action:none;border-radius:50%;border:2px solid rgba(255,255,255,.4);background:rgba(20,40,90,.5);font-weight:800;font-size:13px;letter-spacing:.03em;width:64px;height:64px}
#stage .tbtn.on{background:rgba(34,230,255,.55);transform:scale(.94)}
#stage #tbJump{width:88px;height:88px;right:calc(12px + env(safe-area-inset-right));bottom:calc(16px + env(safe-area-inset-bottom));font-size:15px;background:rgba(255,45,149,.38)}
#stage #tbSlide{right:calc(108px + env(safe-area-inset-right));bottom:calc(16px + env(safe-area-inset-bottom))}
#stage #tbGrap{right:calc(20px + env(safe-area-inset-right));bottom:calc(116px + env(safe-area-inset-bottom));background:rgba(255,179,71,.3)}
#stage #screens{position:absolute;inset:0;display:none;overflow:auto;background:rgba(5,8,28,.8);-webkit-overflow-scrolling:touch;touch-action:pan-y}
#stage #screens.on{display:block}
#stage .card{margin:8% auto 16px;max-width:360px;width:calc(100% - 24px);background:rgba(14,22,60,.96);border:1px solid rgba(160,230,255,.25);border-radius:16px;padding:16px}
#stage h2{font-size:18px;margin:10px 0 8px}
#stage .card h2{margin-top:0;text-align:center}
#stage p{font-size:14px;line-height:1.4;margin:6px 0}
#stage .hint,#stage small{color:#9db4d8}
#stage .btns{display:flex;flex-direction:column;gap:8px;margin-top:12px}
#stage .btn{min-height:46px;padding:0 16px;border-radius:12px;border:1px solid rgba(160,230,255,.4);background:rgba(30,50,110,.7);font-weight:800;font-size:15px}
#stage .btn.pri{background:#ff2d95;border-color:#ff7ac0;color:#fff}
#stage .row{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:46px;padding:4px 0;border-bottom:1px solid rgba(160,230,255,.12);font-size:14px}
#stage .chips{display:flex;gap:6px;align-items:center}
#stage .chip{min-width:44px;min-height:40px;padding:0 12px;border-radius:10px;border:1px solid rgba(160,230,255,.35);background:rgba(30,50,110,.5);font-weight:700;font-size:13px;text-transform:capitalize}
#stage .chip.on{background:#0891B2;border-color:#22e6ff}
#stage .how{padding-left:18px;font-size:14px;line-height:1.45}#stage .how li{margin:7px 0}
#stage .res .big{font:800 34px ui-monospace,monospace;text-align:center;margin:4px 0 8px}
#stage .medal{width:46px;height:46px;border-radius:50%;margin:6px auto;border:4px solid #555;background:#333}
#stage .medal.m1{background:#b87333;border-color:#e8a066}#stage .medal.m2{background:#b9c3cf;border-color:#eef4fa}#stage .medal.m3{background:#e0b020;border-color:#ffe27a}
#stage .kv{display:flex;justify-content:space-between;font-size:14px;padding:3px 0}
#stage .rew{display:flex;justify-content:center;gap:16px;margin:10px 0 6px;font-weight:800;color:#ffd36a}
#stage .bar{height:8px;border-radius:5px;background:rgba(160,230,255,.15);overflow:hidden;flex:1}
#stage .bar i{display:block;height:100%;background:linear-gradient(90deg,#22e6ff,#ff2d95)}
#stage .sub{text-align:center;font-size:12px;color:#9db4d8;margin-top:3px}
#stage .note{font-size:13px;color:#cfe4ff}#stage .note.ok{color:#7dffb0}#stage .goal{font-size:13px;color:#ffd36a;text-align:center;margin-top:8px}
#stage .menu{display:flex;flex-direction:column;min-height:100%;height:100%}
#stage .mtop{display:flex;align-items:center;gap:10px;padding:10px 100px 6px 12px;padding-top:max(10px,env(safe-area-inset-top))}
#stage .logo{font-weight:900;font-size:17px;letter-spacing:.02em;color:#22e6ff;white-space:nowrap}
#stage .lvl{flex:1;display:flex;align-items:center;gap:6px;font-size:12px;min-width:60px}
#stage .shards{font-weight:800;color:#ffd36a;white-space:nowrap;font-size:14px}
#stage .mbody{flex:1;overflow:auto;padding:4px 12px 12px;-webkit-overflow-scrolling:touch;touch-action:pan-y}
#stage .mnav{display:flex;border-top:1px solid rgba(160,230,255,.2);background:rgba(8,12,40,.9);padding-bottom:env(safe-area-inset-bottom)}
#stage .nav{flex:1;min-height:50px;border:0;background:transparent;font-weight:800;font-size:13px;color:#9db4d8}
#stage .nav.on{color:#22e6ff;box-shadow:inset 0 -3px 0 #22e6ff}
#stage .modes{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#stage .mode{min-height:92px;text-align:left;padding:10px;border-radius:14px;border:1px solid rgba(160,230,255,.3);background:linear-gradient(160deg,rgba(40,60,140,.6),rgba(20,28,70,.7));display:flex;flex-direction:column;gap:4px}
#stage .mode b{font-size:15px;color:#fff}#stage .mode span{font-size:11.5px;color:#b5c8e8;line-height:1.3}
#stage .back{min-height:44px;background:none;border:0;color:#22e6ff;font-weight:800;font-size:14px;padding:0}
#stage .list{display:flex;flex-direction:column;gap:8px}
#stage .course{display:flex;align-items:center;gap:10px;text-align:left;min-height:64px;padding:10px 12px;border-radius:12px;border:1px solid rgba(160,230,255,.3);background:rgba(30,50,110,.5)}
#stage .course:disabled{opacity:.5}
#stage .course .t{flex:1;display:flex;flex-direction:column;gap:2px}#stage .course b{font-size:15px}#stage .course em{font-style:normal;font-size:12px;color:#ffd36a}
#stage .md{width:22px;height:22px;border-radius:50%;background:#333;border:3px solid #555;flex:none}
#stage .md.m1{background:#b87333;border-color:#e8a066}#stage .md.m2{background:#b9c3cf;border-color:#eef4fa}#stage .md.m3{background:#e0b020;border-color:#ffe27a}
#stage .lock{width:20px;height:20px;border-radius:5px;background:#556;flex:none}
#stage .up .t{display:flex;flex-direction:column;gap:2px;flex:1}
#stage .pips{display:flex;gap:4px;margin-top:3px}#stage .pip{width:18px;height:6px;border-radius:3px;background:rgba(160,230,255,.2)}#stage .pip.on{background:#22e6ff}
#stage .buy{min-width:64px}#stage .max{color:#7dffb0;font-weight:800}
#stage .sws{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
#stage .sw{min-height:84px;padding:8px 4px;border-radius:12px;border:1px solid rgba(160,230,255,.3);background:rgba(30,50,110,.45);display:flex;flex-direction:column;align-items:center;gap:3px}
#stage .sw i{display:block;width:30px;height:30px;border-radius:50%;border:2px solid rgba(255,255,255,.5)}#stage .sw b{font-size:12px}#stage .sw small{font-size:11px}
#stage .sw.eq{border-color:#22e6ff;box-shadow:0 0 0 1px #22e6ff}#stage .sw:disabled{opacity:.5}
#stage .mis{padding:10px;border-radius:12px;background:rgba(30,50,110,.5);display:flex;flex-direction:column;gap:5px;font-size:14px}#stage .mis.done{opacity:.65}
#stage .achs{display:grid;grid-template-columns:1fr 1fr;gap:6px}
#stage .ach{padding:8px;border-radius:10px;background:rgba(30,50,110,.35);font-size:12px;opacity:.55;display:flex;flex-direction:column;gap:2px}#stage .ach.got{opacity:1;border:1px solid #ffd36a}
@media (orientation:landscape) and (max-height:520px){#stage .card{margin-top:10px}#stage .modes{grid-template-columns:repeat(3,1fr)}#stage #tbJump{width:80px;height:80px}}
/* page copy under the game */
.pk-guide{max-width:640px;margin:0 auto;padding:1rem 1rem 1.5rem;line-height:1.6}
.pk-guide h2{font-size:1.25rem;margin:1rem 0 .5rem}.pk-guide h3{font-size:1.05rem;margin:1.1rem 0 .4rem}.pk-guide p,.pk-guide li{font-size:.95rem;color:#334155}.pk-guide ul{padding-left:1.2rem;margin:.4rem 0}.pk-guide li{margin:.3rem 0}.pk-guide a{color:#0891B2}
.pk-nojs{padding:1rem;text-align:center}
@media (prefers-reduced-motion:reduce){#stage *{transition:none!important;animation:none!important}#stage #flash{display:none}}

/* Shell full screen (native and immersive): the playfield fills the stage under the dock */
html.pip-immersive .game-wrap,html.pip-native .game-wrap{display:flex;flex-direction:column}
html.pip-immersive .game-wrap>#stage.stage,html.pip-native .game-wrap>#stage.stage{flex:1 1 0;min-height:0;width:100%;aspect-ratio:auto;max-height:none;border-radius:0}
html.pip-immersive #stage #bigBtn,html.pip-native #stage #bigBtn,html.pip-immersive .pk-nojs,html.pip-native .pk-nojs{display:none}
html.pip-immersive .pk-guide,html.pip-immersive .game-header,html.pip-immersive .ad-well,html.pip-immersive #similar-games{display:none}
.game-wrap:fullscreen,.game-wrap:-webkit-full-screen{width:100%;height:100%;background:#070b22}
