/* Lava Bridge Dash - portrait 9:16 layout, lava canyon HUD (big score, cyan PERFECT xN pill, gem counter, HOLD TO BUILD hint, round pause) */
@font-face{font-family:"LBD Montserrat";src:url("montserrat-800.woff2") format("woff2");font-weight:800;font-style:normal;font-display:swap}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{width:100%;height:100%;overflow:hidden;background:#140810;font-family:"LBD Montserrat","Montserrat","Segoe UI",system-ui,sans-serif;font-weight:800;color:#fff;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:none;overscroll-behavior:none}
body{display:flex;align-items:center;justify-content:center;background:radial-gradient(circle at 50% 35%,#4a1830,#140810 70%)}
#frame{position:relative;height:100vh;height:100dvh;width:min(100vw,calc(100dvh * 9 / 16));overflow:hidden;background:#2a0f1e;box-shadow:0 0 40px rgba(255,110,30,.35),0 0 80px rgba(63,230,255,.12)}
@media (min-width:700px){#frame{height:96dvh;width:calc(96dvh * 9 / 16);border-radius:18px}}
canvas{display:block;width:100%;height:100%}
.hidden{display:none!important}

/* ---------- HUD ---------- */
#hud{position:absolute;inset:0;pointer-events:none;z-index:3}
.hud-top{position:absolute;left:0;right:0;top:0;padding:calc(12px + env(safe-area-inset-top)) 12px 0}
.hud-score{display:flex;flex-direction:column;align-items:center}
.hud-score b{font-size:64px;line-height:.95;color:#fff;text-shadow:0 4px 0 rgba(40,10,30,.75),0 0 14px rgba(255,255,255,.25);font-variant-numeric:tabular-nums}
.perfect-pill{margin-top:8px;padding:7px 16px 6px;border-radius:12px;border:2.5px solid #3fe6ff;background:rgba(18,26,48,.82);box-shadow:0 0 12px rgba(63,230,255,.7),inset 0 0 10px rgba(63,230,255,.25);font-size:19px;letter-spacing:.6px;color:#fff;text-shadow:0 2px 3px rgba(0,0,0,.5)}
.perfect-pill span{color:#3fe6ff;text-shadow:0 0 8px rgba(63,230,255,.8)}
.perfect-pill.bump{animation:pillBump .45s}
@keyframes pillBump{40%{transform:scale(1.2)}}
.hud-gems{position:absolute;right:12px;top:calc(14px + env(safe-area-inset-top));display:flex;align-items:center;gap:7px;padding-bottom:6px;border-bottom:2px solid rgba(255,255,255,.55)}
.hud-gems .gem{width:30px;height:26px;filter:drop-shadow(0 0 5px rgba(63,230,255,.8))}
.hud-gems b{font-size:22px;text-shadow:0 2px 3px rgba(0,0,0,.6);font-variant-numeric:tabular-nums}
.hold-hint{position:absolute;left:0;right:0;bottom:calc(18px + env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:center;gap:8px;transition:opacity .35s}
.hh-text{font-size:17px;letter-spacing:.6px;text-shadow:0 2px 5px rgba(0,0,0,.8)}
.hh-btn{width:54px;height:54px;border-radius:12px;border:2.5px solid #3fe6ff;background:rgba(14,22,40,.8);box-shadow:0 0 12px rgba(63,230,255,.6);display:flex;align-items:center;justify-content:center;animation:hhPress 1.2s infinite}
.hh-btn svg{width:40px;height:40px}
@keyframes hhPress{50%{transform:scale(.9);box-shadow:0 0 20px rgba(63,230,255,.95)}}
.hold-hint.dim{opacity:0}
.icon-btn{pointer-events:auto;width:46px;height:46px;border-radius:12px;border:2px solid rgba(255,255,255,.85);background:rgba(40,12,24,.55);color:#fff;font-size:18px;font-weight:800;cursor:pointer;font-family:inherit}
.round-btn{position:absolute;right:14px;bottom:calc(14px + env(safe-area-inset-bottom));width:52px;height:52px;border-radius:50%;background:rgba(40,12,24,.72);border:2px solid rgba(255,150,60,.75);display:flex;align-items:center;justify-content:center;box-shadow:0 0 10px rgba(255,130,40,.35)}
.round-btn svg{width:24px;height:24px}
.mute{position:absolute;right:17px;bottom:calc(78px + env(safe-area-inset-bottom));width:46px;height:46px;border-radius:50%;z-index:5;font-size:17px;background:rgba(40,12,24,.6);border-color:rgba(63,230,255,.7)}
#banner{position:absolute;left:0;right:0;top:27%;text-align:center;font-size:40px;letter-spacing:2px;color:#ffd24a;text-shadow:0 0 14px rgba(255,140,30,.95),0 3px 0 #6a1a08;pointer-events:none;z-index:3;animation:bannerIn .35s ease-out}
#banner small{display:block;font-size:20px;color:#3fe6ff;letter-spacing:1px;margin-top:4px;text-shadow:0 0 10px rgba(63,230,255,.8)}
@keyframes bannerIn{from{transform:scale(.6);opacity:0}}
#floaters{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:3}
.floater{position:absolute;font-size:22px;color:#8ff4ff;text-shadow:0 0 8px rgba(255,140,30,.8),0 2px 0 #3a0a10;animation:floatUp .9s ease-out forwards;transform:translate(-50%,-50%);white-space:nowrap}
@keyframes floatUp{to{opacity:0;margin-top:-70px}}

/* ---------- start / over / pause overlays ---------- */
.overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:13px;background:linear-gradient(180deg,rgba(40,10,40,.2),rgba(24,6,14,.8));text-align:center;padding:24px;cursor:pointer;z-index:4}
.logo{font-size:44px;line-height:.98;color:#fff;letter-spacing:2px;text-shadow:0 4px 0 #6a1a10,0 0 18px rgba(255,150,40,.6)}
.logo span{display:block;color:#ff9a2a;font-size:72px;letter-spacing:5px;margin-top:2px;text-shadow:0 4px 0 #6a1a08,0 0 22px rgba(255,120,20,.85)}
.logo.small{font-size:42px;color:#fff}
.tag{font-size:15px;line-height:1.45;text-shadow:0 2px 4px rgba(0,0,0,.7)}
.big-btn{font-weight:800;font-size:21px;font-family:inherit;padding:14px 32px;border-radius:16px;border:3px solid #fff;background:linear-gradient(#ffa63a,#e2541a);color:#fff;box-shadow:0 0 18px rgba(255,120,30,.6),0 5px 0 #7a2208;cursor:pointer;text-shadow:0 2px 0 rgba(0,0,0,.25)}
.pulse{animation:pulse 1s infinite}
@keyframes pulse{50%{transform:scale(1.06)}}
.hint{font-size:11.5px;opacity:.9;line-height:1.4}
.best-line,.final{font-size:20px}
.final b{color:#ffd24a;font-size:36px;text-shadow:0 0 10px rgba(255,150,30,.7)}
.final.small{font-size:15px}
.new-best{color:#3fe6ff;font-size:22px;animation:pulse .6s infinite}

/* Approved portrait standard UI: help overlay + pause menu + hide status chip (lava orange / basalt / cyan theme) */
.htp-panel{position:absolute;inset:0;z-index:2147483000;width:auto;height:auto;border-radius:0;background:linear-gradient(170deg,#3a1428,#24101c 45%,#140810);color:#fff0e6;font-size:16px;font-weight:400;font-family:"Segoe UI",system-ui,sans-serif;cursor:auto;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;touch-action:pan-y;user-select:text;-webkit-user-select:text;padding:calc(16px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) calc(18px + env(safe-area-inset-left));text-align:left;border:2px solid #ff8a2a;scrollbar-width:thin;scrollbar-color:#ff8a2a #24101c;scrollbar-gutter:stable}
.htp-panel::-webkit-scrollbar{width:10px}
.htp-panel::-webkit-scrollbar-track{background:#24101c;border-radius:10px}
.htp-panel::-webkit-scrollbar-thumb{background:linear-gradient(#3fe6ff,#ff8a2a);border:2px solid #24101c;border-radius:10px}
.htp-panel::-webkit-scrollbar-thumb:hover{background:#3fe6ff}
.htp-panel[hidden]{display:none}
.htp-inner{max-width:640px;margin:0 auto;line-height:1.5}
.htp-panel h1,.htp-panel #htpTitle{font-family:"LBD Montserrat","Segoe UI",sans-serif;font-weight:800;font-size:23px;line-height:1.2;margin:8px 0 12px;color:#ff9a2a;text-shadow:0 0 10px rgba(255,130,30,.5)}
.htp-panel h2{font-family:"LBD Montserrat","Segoe UI",sans-serif;font-weight:800;font-size:18px;margin:20px 0 6px;color:#3fe6ff;border-bottom:1px solid rgba(255,138,42,.5);padding-bottom:6px}
.htp-panel h3,.htp-panel b{color:#ffd9a8}
.htp-panel p,.htp-panel li{margin:0 0 8px;line-height:1.6}
.htp-panel ul{padding-left:20px}
.htp-panel a{color:#8ff0ff}
.htp-close{position:sticky;top:0;float:right;font-family:inherit;font-weight:800;font-size:15px;padding:10px 14px;border-radius:12px;border:2px solid #fff;background:linear-gradient(#ffa63a,#e2541a);color:#fff;cursor:pointer;box-shadow:0 0 10px rgba(255,120,30,.5)}
.htp-done{display:block;margin:24px auto 8px}
body.htp-lock{overflow:hidden}
#htpBtn{width:auto;height:auto;border-radius:16px;font-size:19px;background:linear-gradient(#3fe6ff,#1a8fd0);box-shadow:0 0 16px rgba(63,230,255,.55),0 5px 0 #0d3e6e}
#resumeBtn,#mainMenuBtn{width:auto;height:auto;min-width:220px;font-size:20px;border-radius:16px;border:3px solid #fff}
#resumeBtn{background:linear-gradient(#3fe6ff,#1a8fd0);box-shadow:0 0 16px rgba(63,230,255,.55),0 5px 0 #0d3e6e}
#mainMenuBtn{background:linear-gradient(#ffa63a,#e2541a);box-shadow:0 0 14px rgba(255,120,30,.5),0 5px 0 #7a2208}
#pauseScreen button:focus-visible,.htp-panel button:focus-visible,.htp-panel a:focus-visible,#startScreen button:focus-visible,#hud button:focus-visible{outline:3px solid #3fe6ff;outline-offset:3px}
/* Clear bottom space for future ads: hide shared gate chip without editing shared gate scripts. */
#ifs-gate-chip,.player-tag{display:none!important}
@media (max-height:500px) and (orientation:landscape){#startScreen,#overScreen,#pauseScreen{gap:5px;padding:6px 10px}#startScreen .tag,#startScreen .hint{display:none}.logo{font-size:22px}.logo span{font-size:34px;letter-spacing:3px}.logo.small{font-size:24px}#startScreen .big-btn,#overScreen .big-btn,#pauseScreen .big-btn{font-size:14px;padding:7px 14px;white-space:nowrap;border-width:2px;border-radius:12px;min-width:0}.best-line,.final{font-size:14px}.final b{font-size:22px}.final.small{font-size:12px}.new-best{font-size:14px}.mute{bottom:auto;top:calc(8px + env(safe-area-inset-top))}}
