*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
button{touch-action:manipulation}
:root{--sat:env(safe-area-inset-top,0px);--sab:env(safe-area-inset-bottom,0px);--sal:env(safe-area-inset-left,0px);--sar:env(safe-area-inset-right,0px)}
html,body{margin:0;height:100%;background:#05030f;overflow:hidden;overscroll-behavior:none;touch-action:manipulation;-webkit-text-size-adjust:100%;text-size-adjust:100%;font-family:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;color:#fff}
html,body{position:fixed;inset:0;width:100%}
#wrap{position:absolute;top:0;left:0;overflow:hidden;contain:strict;background:#0b0620;touch-action:none;width:100%;height:100%}
canvas{display:block;width:100%;height:100%;touch-action:none}
.hidden{display:none!important}
.screen{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:calc(5% + var(--sat)) calc(5% + var(--sar)) calc(14% + var(--sab)) calc(5% + var(--sal));overflow:hidden;text-align:center;background:rgba(5,3,15,.30)}
.screen .top,.screen .bottom{display:flex;flex-direction:column;align-items:center;width:100%}
.logo{width:26vmin;max-width:104px;border-radius:50%;box-shadow:0 0 28px rgba(82,148,255,.55),0 0 28px rgba(109,58,255,.4)}
h1{margin:8px 0 0;font-size:clamp(30px,9.5vw,46px);line-height:1;font-weight:900;letter-spacing:1px;text-shadow:0 3px 0 #000,0 0 22px rgba(99,102,241,.55);-webkit-text-stroke:1px #000}
h1 span{color:#8ab4ff;display:block}
h1.small{font-size:clamp(26px,8.2vw,40px)}h1.small span{display:inline}
.tag{margin:8px 0 0;font-weight:800;font-size:clamp(13px,4.2vw,20px);text-shadow:0 2px 0 #000;max-width:94vw;text-wrap:balance;line-height:1.15}
.tag b{color:#39ff6a}.tag i{color:#ff3340;font-style:normal}.tag em{color:#fff;font-style:normal}
.btn{appearance:none;border:0;border-radius:16px;padding:14px 30px;font-weight:900;font-size:clamp(18px,5.4vw,24px);line-height:1;font-family:inherit;color:#ffffff;background:linear-gradient(180deg,#5294ff 0%,#6d3aff 100%);box-shadow:0 5px 0 #2e177a,0 0 22px rgba(99,102,241,.55);border:1.5px solid #b8d4ff;cursor:pointer;text-transform:uppercase;letter-spacing:1px;min-height:50px;text-shadow:0 1px 2px rgba(12,6,48,.6)}
.btn:active{transform:translateY(3px);box-shadow:0 2px 0 #2e177a}
.btn.pulse{animation:pulse 1.2s ease-in-out infinite}
@keyframes pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.07)}}
.hint{font-size:12.5px;opacity:.95;line-height:1.5;margin:12px 0 0;text-shadow:0 1px 0 #000,0 0 6px #000,0 0 10px #000}
.hint kbd{background:#ffffff22;border-radius:5px;padding:1px 6px;font-family:inherit;font-weight:700}
.best{margin:8px 0 0;font-weight:800;font-size:15px;color:#ffd24a;text-shadow:0 2px 0 #000}
.legal{margin:8px 0 0;font-size:11.5px;opacity:.65;text-shadow:0 1px 0 #000}
.card{width:100%;max-width:300px;background:rgba(10,8,28,.93);border-radius:20px;padding:16px 16px 12px;box-shadow:0 0 0 2px #6e8efb,0 0 30px rgba(124,58,237,.45)}
.card .lbl{font-weight:800;font-size:13px;letter-spacing:3px;color:#b8c8ff}
.card .big{font-weight:900;font-size:clamp(44px,15vw,64px);line-height:1.05;color:#fff;text-shadow:0 3px 0 #000,0 0 24px rgba(99,102,241,.55)}
.newbest{display:inline-block;margin:4px 0 2px;padding:3px 12px;border-radius:99px;background:#ffd24a;color:#3a2a00;font-weight:900;font-size:13px;letter-spacing:1px}
.card .row{display:flex;justify-content:space-between;align-items:center;font-size:15px;padding:6px 4px;border-top:1px solid #ffffff1a}
.card .row span{opacity:.8}.card .row b{font-weight:900}
.iconbtn{position:absolute;top:calc(8px + var(--sat));right:calc(8px + var(--sar));z-index:20;width:46px;height:46px;border-radius:13px;border:1px solid #ffffff55;background:#000a;color:#fff;font-size:20px;padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer}
#hud{position:absolute;inset:0;pointer-events:none;z-index:6}
#hudCoins{position:absolute;top:calc(76px + var(--sat));left:calc(12px + var(--sal));display:flex;align-items:center;gap:6px;font-weight:800;font-size:15px;text-shadow:0 2px 0 #000,0 0 6px #000}
#hudCoins img{display:block}

#over{background:rgba(5,3,15,.62)}#over .top{padding-top:34px}
.legal{text-shadow:0 1px 0 #000,0 0 6px #000}

.pus{list-style:none;margin:0;padding:0;font-size:13.5px;line-height:1.35}
.pus li{margin:0;display:flex;align-items:center;gap:10px;padding:8px 0;border-top:1px solid #ffffff1a}.pus li:first-child{border-top:0}
.pus li>span{flex:1 1 auto;min-width:0}.pus li>span b{display:block;font-size:14.5px;letter-spacing:.3px}
.pus canvas{flex:none;width:72px;height:60px;display:block}
.pus b{font-weight:900}
.pu-diamond b{color:#7df3ff}
.pu-zoom b{color:#df8cff}
.pu-air b{color:#ffa53d}

.thrusttag{position:absolute;left:calc(8px + var(--sal));top:calc(8px + var(--sat));z-index:20;background:#000a;color:#fff;border:1px solid #ffffff55;border-radius:10px;padding:7px 10px;font:700 12px system-ui,sans-serif;cursor:pointer}

/* v8: ONE link ("Learn more about BotCoin") on the title + game-over screens; a real <a> (game.js never flaps or restarts from it). Its href comes from LEARN_URL in game.js. */
.links{width:100%;max-width:340px;margin:10px 0 0;display:flex;justify-content:center;pointer-events:auto}
.lbtn{appearance:none;display:inline-flex;align-items:center;justify-content:center;text-align:center;width:100%;min-height:42px;padding:9px 14px;border-radius:12px;border:1.5px solid #6e8efb;background:rgba(10,8,28,.82);color:#d4e0ff;font:800 13px/1.15 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;text-decoration:none;cursor:pointer;touch-action:manipulation}
.lbtn:active{transform:translateY(1px);filter:brightness(1.15)}
.lbtn:focus-visible{outline:2px solid #fff;outline-offset:2px}
#over .links{margin-top:12px}


/* v16/v20: title screen like BOTZ Coin Rush: logo + title + tagline on top, Moon art centred in #titleAnchor, Robo at the free-band centre (TITLE_ROBO_DY=0, CEO t1208u; was parked above the lettering), navy panel at the bottom. */
#title{background:linear-gradient(rgba(5,3,15,.38),rgba(5,3,15,0) 34%,rgba(5,3,15,0) 62%,rgba(5,3,15,.5));padding:calc(2.2% + var(--sat)) calc(5% + var(--sar)) calc(3% + var(--sab)) calc(5% + var(--sal))}
#title .logo{width:60px;height:60px;max-width:none;box-shadow:0 0 18px rgba(82,148,255,.55),0 0 18px rgba(109,58,255,.4)}
#title h1{margin:7px 0 0;font-size:clamp(23px,6.9vw,34px);white-space:nowrap;color:#fff;text-shadow:0 2px 3px rgba(0,0,0,.7);-webkit-text-stroke:0}
#title h1 b{font-weight:900;color:#fff}#title h1 span{display:inline;color:#fff}
#title .tag{margin:5px auto 0}
.anchor{flex:1 1 auto;width:100%;min-height:40px}
.bzpanel{width:100%;max-width:340px;margin:0 auto;background:#111a2e;border-radius:20px;padding:14px 14px 11px;display:flex;flex-direction:column;align-items:stretch;gap:9px;border:1.5px solid rgba(110,145,255,.65);box-shadow:0 8px 26px #000a,0 0 20px rgba(109,58,255,.35),0 0 0 1px #ffffff14 inset}
.bzpanel .btn{min-height:46px}
.btn.flat{align-self:center;min-width:130px;background:linear-gradient(180deg,#5294ff 0%,#6d3aff 100%);color:#ffffff;box-shadow:0 4px 0 #2e177a,0 0 20px rgba(99,102,241,.55);border:1.5px solid #b8d4ff;border-radius:16px;font-weight:800;letter-spacing:.8px;text-transform:uppercase;min-height:50px;font-size:19px;padding:12px 34px;text-shadow:0 1px 2px rgba(12,6,48,.6)}
.btn.flat:active{transform:translateY(3px);box-shadow:0 1px 0 #2e177a;background:linear-gradient(180deg,#4588f5 0%,#5c2fe0 100%)}
.btn.outl{appearance:none;background:#0d1426;color:#fff;border:1.5px solid #6e8efb;box-shadow:none;border-radius:14px;font-size:15px;font-weight:600;letter-spacing:.2px;text-transform:none;padding:10px 12px;min-height:46px;display:inline-flex;align-items:center;justify-content:center;gap:6px;text-decoration:none;text-align:center;line-height:1.15;white-space:nowrap;cursor:pointer}
.btn.outl:active{transform:none;box-shadow:none;background:#1a2040;border-color:#8b5cf6}
.bzrow2{display:flex;gap:9px}.bzrow2 .btn{flex:1 1 0;min-width:0;padding:10px 4px;font-size:clamp(12px,3.7vw,14.5px);gap:5px}
.ico{font-style:normal;display:inline-block}.ico-pad::before{content:"\1F3AE"}.ico-bolt::before{content:"\26A1"}
.bzlearn{width:100%}.bzlearn::before{content:"\1F916";margin-right:6px}
#title .links{margin:0;max-width:none}
.bzbest{margin:-2px 0 0;font-weight:800;font-size:14px;color:#ffd24a;text-align:center;text-shadow:0 1px 0 #000}.bzbest:empty{display:none}
.bzfree{font-size:12px;color:#98a1b4;text-align:center;line-height:1.3}
@media (max-height:700px){.bzpanel{padding:9px 12px 8px;gap:6px}.bzpanel .btn.flat{min-height:42px;padding:8px 30px;font-size:17px}.bzpanel .btn.outl{min-height:38px;padding:6px 8px;font-size:14px}.bzfree{font-size:11px}#title .logo{width:44px;height:44px}}
@media (max-width:340px){.bzrow2 .btn{font-size:12px;gap:4px}}
.modal{position:absolute;inset:0;z-index:30;display:flex;align-items:center;justify-content:center;padding:5%;background:rgba(5,3,15,.84);touch-action:manipulation}
.mcard{width:100%;max-width:340px;max-height:92%;overflow:auto;background:#111a2e;border-radius:20px;padding:16px 16px 14px;border:1.5px solid rgba(110,145,255,.65);box-shadow:0 10px 30px #000c,0 0 20px rgba(109,58,255,.35),0 0 0 1px #ffffff14 inset;text-align:left}
.mcard h2{margin:0 0 8px;font-size:21px;font-weight:900;text-align:center;letter-spacing:.5px}
.mcard .btn.flat{display:flex;margin:12px auto 0}
.howl{margin:0;padding:0 0 0 18px;font-size:13.5px;line-height:1.4}.howl li{margin:0 0 7px}.howl kbd{background:#ffffff22;border-radius:5px;padding:1px 6px;font-family:inherit;font-weight:700}
.mnote{margin:6px 0 0;font-size:12px;color:#98a1b4;text-align:center}
.mnote a{color:#a8c0ff;text-decoration:underline}

/* arcade: Leaderboard tile in the title row (three-up), game-over submit panel, leaderboard sheet */
.ico-cup::before{content:"\1F3C6"}
.bzrow3{gap:7px}.bzrow3 .btn{flex-direction:column;gap:3px;padding:8px 2px;min-height:54px;font-size:clamp(11.5px,3.4vw,13.5px);line-height:1.1}.bzrow3 .ico{font-size:19px;line-height:1}
.bzlb{margin-top:8px;min-height:40px;padding:6px 18px;font-size:14px;gap:6px}
.subbox{width:100%;max-width:300px;background:rgba(10,8,28,.93);border-radius:16px;padding:9px 12px 10px;border:1.5px solid rgba(110,145,255,.65);box-shadow:0 8px 26px #000a,0 0 20px rgba(109,58,255,.35),0 0 0 1px #ffffff14 inset;text-align:center}
.sbmsg{margin:0;font-size:14px;font-weight:700;line-height:1.3;color:#cfd6e6}.sbmsg:empty{display:none}.sbmsg.ok{color:#8ab4ff}.sbmsg.bad{color:#ff8a93}
#sbForm{margin-top:7px;display:flex;flex-direction:column;gap:7px}
.sbrow{display:flex;gap:8px;align-items:stretch}
#sbHandle{flex:1 1 auto;min-width:0;height:42px;border-radius:12px;border:1.5px solid #6e8efb;background:#0d1426;color:#fff;font-weight:600;font-size:16px;line-height:1;font-family:inherit;padding:0 12px;outline:none}
#sbHandle:focus{border-color:#a8c0ff}#sbHandle[readonly]{opacity:.75}
.sbrow .btn.flat{flex:0 0 auto;width:auto;min-width:0;min-height:42px;padding:0 12px;font-size:13px;letter-spacing:.2px;white-space:nowrap}
.sbchk{display:flex;gap:8px;align-items:flex-start;text-align:left;font-size:12.5px;line-height:1.3;color:#b8c0d2}.sbchk input{width:18px;height:18px;margin:1px 0 0;accent-color:#6d3aff;flex:0 0 auto}.sbchk a{color:#a8c0ff}
#sbX{min-height:40px;font-size:14px}
#sbWallet,#sbWalIn{width:100%;box-sizing:border-box;height:40px;border-radius:12px;border:1.5px solid #6e8efb88;background:#0d1426;color:#fff;font-weight:600;font-size:14px;line-height:1;font-family:inherit;padding:0 12px;outline:none}
#sbWalIn{flex:1 1 auto;min-width:0;width:auto;border-color:#6e8efb}#sbWallet:focus,#sbWalIn:focus{border-color:#a8c0ff}
.sbwal{margin-top:7px;display:flex;flex-direction:column;gap:6px;align-items:center}
.sbwalmsg{margin:0;font-size:12.5px;line-height:1.3;color:#b8c0d2}.sbwalmsg.ok{color:#8ab4ff}.sbwalmsg.bad{color:#ff8a93}
.sblink{appearance:none;background:none;border:0;color:#a8c0ff;text-decoration:underline;font:inherit;font-size:13px;font-weight:700;padding:6px 8px;cursor:pointer}
.sbwal .sbrow{width:100%}.sbfine{margin:0;font-size:11px;line-height:1.3;color:#8d96aa}
.lbtabs{display:flex;gap:6px;margin:0 0 8px}.lbtabs button{flex:1 1 0;appearance:none;border:1.5px solid #6e8efb66;background:#0d1426;color:#cfd6e6;border-radius:10px;padding:8px 2px;font-weight:700;font-size:12.5px;line-height:1.1;font-family:inherit;cursor:pointer}.lbtabs button.on{background:linear-gradient(180deg,#5294ff 0%,#6d3aff 100%);color:#fff;border-color:#6e8efb}
.lbsub{margin:0 0 6px;font-size:12px;color:#98a1b4;text-align:center;min-height:15px}
.lbrows{list-style:none;margin:0;padding:0}.lbrows li{display:flex;align-items:center;gap:8px;padding:7px 8px;border-radius:10px;font-size:14px}.lbrows li:nth-child(odd){background:#ffffff0d}
.lbrows .rk{flex:0 0 36px;font-weight:900;color:#ffd24a}.lbrows .nm{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}.lbrows b{font-weight:900;color:#fff}
.lbrows li.you{background:rgba(109,58,255,.18);box-shadow:0 0 0 1px #6e8efbaa inset}.lbyou{margin-top:6px}
.vf{font-style:normal;color:#8ab4ff;margin-left:4px;font-weight:900}

/* v18: "Back to BotCoin Arcade". A real <a href="/"> (same tab). Top-left corner (the sound button owns top-right), outside the thrust zone's way: press() ignores anything inside an <a>. Title/over = "< BotCoin Arcade"; while playing it shrinks to a faint "<" chip; tapping it mid-run pauses the run and asks once (#mLeave). */
.backbtn{position:absolute;top:calc(8px + var(--sat));left:calc(8px + var(--sal));z-index:20;height:46px;min-width:46px;padding:0 13px 0 10px;border-radius:13px;border:1px solid #ffffff55;background:#000a;color:#fff;display:inline-flex;align-items:center;justify-content:center;gap:5px;font:800 13px/1 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;text-decoration:none;cursor:pointer;touch-action:manipulation}
.backbtn .bk-ar{font-style:normal;font-size:24px;line-height:1;margin-top:-2px;color:#8ab4ff}
.backbtn .bk-short{display:none}
.backbtn:active{transform:translateY(1px);filter:brightness(1.2)}
.backbtn:focus-visible{outline:2px solid #fff;outline-offset:2px}
#wrap.playing .backbtn{min-width:40px;height:40px;padding:0 10px;opacity:.8;border-radius:12px}
#wrap.playing .backbtn .bk-long,#wrap.playing .backbtn .bk-short{display:none}
@media (max-width:350px){.backbtn .bk-long{display:none}.backbtn .bk-short{display:inline}}
.lbtn-back{border-color:#6e8efb;color:#d4e0ff}
#over .links+.links{margin-top:8px}
.bzback{width:100%;margin-top:9px;display:flex}
#mLeave .btn.flat{width:100%;margin-top:12px;display:flex;justify-content:center;text-align:center}
#mLeave .mnote{font-size:13.5px;color:#c9d2e6;margin:4px 0 0}

/* v19/v21: clean arcade chrome — cosmic blue/purple (CEO t1279u). GAME OVER stays red (t1209u). Gameplay canvas untouched. */
html,body{background:#000}
#wrap{background:#000}
.logo,#title .logo{box-shadow:none;filter:none}
h1{text-shadow:0 2px 0 #000}
.card .big{text-shadow:0 2px 0 #000}
.card,.subbox{background:rgba(0,0,0,.9);box-shadow:0 0 0 2px #6e8efb,0 0 30px rgba(124,58,237,.45)}
.bzpanel,.mcard{background:rgba(0,0,0,.92);border:1.5px solid rgba(110,145,255,.65);box-shadow:0 8px 26px #000a,0 0 20px rgba(109,58,255,.35),0 0 0 1px #ffffff14 inset}
.btn.flat{background:linear-gradient(180deg,#5294ff 0%,#6d3aff 100%);color:#ffffff;font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace;font-weight:900;letter-spacing:.18em;border:1.5px solid #b8d4ff;text-shadow:0 1px 2px rgba(12,6,48,.6);box-shadow:0 4px 0 #2e177a,0 0 20px rgba(99,102,241,.55)}
.btn.flat:active{background:linear-gradient(180deg,#4588f5 0%,#5c2fe0 100%);box-shadow:0 1px 0 #2e177a;transform:translateY(3px)}
#btnStart{background:linear-gradient(180deg,#5294ff 0%,#6d3aff 100%);color:#fff;border:1.5px solid #b8d4ff;box-shadow:0 4px 0 #2e177a,0 0 20px rgba(99,102,241,.55);text-shadow:0 1px 2px rgba(12,6,48,.6)}
#btnStart:active{background:linear-gradient(180deg,#4588f5 0%,#5c2fe0 100%);box-shadow:0 1px 0 #2e177a}
.btn.outl,.lbtabs button,#sbHandle,#sbWallet,#sbWalIn{background:#000;border-color:#6e8efb}
.btn.outl:active{background:#12183a;border-color:#8b5cf6}
.lbtabs button.on{background:linear-gradient(180deg,#5294ff 0%,#6d3aff 100%);color:#fff;border-color:#6e8efb}
.backbtn,.iconbtn,.thrusttag{background:#000c;border:1.5px solid #6e8efb99}
.lbtn{background:#000;border-color:#6e8efb;color:#d4e0ff}
.modal{background:rgba(0,0,0,.86)}
#over{background:rgba(0,0,0,.6)}
.sbelig{margin:0;font-size:12.5px;line-height:1.3;color:#cfd6e6;font-weight:700}
.xtos{margin:-2px 0 0;font-size:11px;line-height:1.35;color:#9aa3b5;text-align:center}.xtos a{color:#a8c0ff}
#sbX.hidden+.xtos{display:none}
h1.gameover{color:#ff3340;font-weight:900;letter-spacing:1px;text-shadow:0 2px 0 #000;-webkit-text-stroke:0}

/* v24: the complete score + identity panel must not clip on short screens. */
#wrap:not(.playing){touch-action:pan-y}
#over{overflow-y:auto;touch-action:pan-y;justify-content:flex-start;gap:14px;padding-bottom:24px;overscroll-behavior:contain}
#over>*{flex-shrink:0}
#sbAuth{display:flex;flex-direction:column;gap:7px;margin-top:7px}
#sbX:disabled{opacity:.55;cursor:not-allowed}

/* Temporary standalone-beta flag: Moon only. The hub and other sites are unchanged. */
body.moon-standalone #btnBack,body.moon-standalone #btnLeave,body.moon-standalone #linksB{display:none!important}

/* v26: opt-in practice diagnostics only; no layout changes to the game. */
.perf-panel{position:fixed;left:8px;bottom:8px;z-index:50;max-width:380px;width:calc(100vw - 16px);max-height:40vh;overflow:auto;padding:10px 12px;background:#060916ed;border:1px solid #b3a1ff;border-radius:9px;color:#e8edff;font:11px/1.4 ui-monospace,monospace;text-align:left;contain:content}.perf-panel strong{color:#c8baff}.perf-panel pre{white-space:pre-wrap;margin:5px 0;font:inherit}.perf-panel button{border:1px solid #9d8add;background:#18132f;color:#fff;padding:6px 10px;border-radius:5px;font:inherit;cursor:pointer;min-height:32px}
