@font-face{font-family:Gugi;src:url(gugi.woff2) format("woff2");font-display:swap}
:root{color-scheme:dark;--ink:#201938;--yellow:#ffe34d;--gold:#ffb73b;--paper:#fff4d8;--panel:rgba(28,23,50,.91);--muted:#d3cbdf;font-family:system-ui,-apple-system,"Malgun Gothic",sans-serif;font-weight:750}
*{box-sizing:border-box}
html,body,#game{width:100%;height:100%;margin:0;overflow:hidden;overscroll-behavior:none;background:#242141}
#game{position:relative;isolation:isolate;touch-action:none;user-select:none;-webkit-user-select:none}
[hidden]{display:none!important}
button{font:inherit;border:0;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:none;color:inherit}
button:focus-visible{outline:3px solid white;outline-offset:4px}
button:disabled{cursor:wait;opacity:.75}
#world,#vignette,#popups,#hud,.overlay{position:absolute;inset:0;width:100%;height:100%}
#world{display:block}
#vignette{pointer-events:none;background:radial-gradient(ellipse at 52% 44%,transparent 48%,#1c142e50 100%);box-shadow:inset 0 0 90px #170f2452}
#popups,#hud{pointer-events:none}
#hud button,#move{pointer-events:auto}
.overlay{display:grid;align-items:center;z-index:5}
#opening{background:linear-gradient(90deg,#1b1537 0%,#251937eb 22%,#31244991 45%,transparent 76%),linear-gradient(0deg,#1e163bb0,transparent 35%)}
.splash{padding:0 0 1.5vh max(6vw,calc(env(safe-area-inset-left) + 22px));width:min(56vw,750px)}
.wordmark{color:var(--paper);font-size:clamp(11px,1.1vw,16px);font-weight:900;letter-spacing:.28em;display:flex;align-items:center;gap:10px;margin:0 0 19px 7px}
.wordmark i,.eyebrow i{width:12px;height:12px;background:var(--yellow);transform:rotate(45deg);border-radius:2px}
h1{margin:0 0 24px;font-family:Gugi,system-ui,sans-serif;font-weight:normal;font-size:clamp(65px,10.8vw,169px);letter-spacing:-.115em;line-height:.84;transform:rotate(-6deg);transform-origin:15% 50%;white-space:nowrap;paint-order:stroke fill;-webkit-text-stroke:.07em #27183f;text-shadow:.032em .062em #b44f65,.065em .1em #251934}
h1 span,h1 strong{display:block;font-weight:inherit}
h1 span{color:#fff5d9}
h1 strong{color:var(--yellow);font-size:1.2em;margin-left:.06em;text-shadow:.036em .065em #f18c36,.055em .105em #a74554,.073em .145em #251934}
.splash p{margin:32px 0 21px 7px;font-size:clamp(14px,1.52vw,21px);color:#fff0d7;letter-spacing:-.045em}
.primary{min-width:232px;min-height:57px;display:inline-flex;align-items:center;justify-content:center;gap:22px;padding:12px 23px;border-radius:10px;background:var(--yellow);color:var(--ink);font-weight:950;font-size:20px;box-shadow:0 5px #de8536,0 8px 0 2px #251635;transition:transform .12s,background .12s}
.primary:active{transform:translateY(3px)}
.primary:hover:not(:disabled){background:#fff19a}
.primary .arrow{font-size:23px;line-height:1}
.opening-controls{margin:19px 0 0 6px;color:#e8dcee;font-size:12px;letter-spacing:-.02em}
kbd{display:inline-block;padding:2px 5px;border-radius:4px;color:#fff4dc;background:#fff1;border:1px solid #fff3;font:800 .86em system-ui;vertical-align:1px;margin-right:2px}
.touch{display:none}
#loadError{font-size:14px;line-height:1.5}
.top{position:absolute;top:max(17px,env(safe-area-inset-top));left:max(20px,env(safe-area-inset-left));right:max(20px,env(safe-area-inset-right));display:grid;grid-template-columns:1fr auto 1fr;align-items:start;gap:12px}
.score-panel,.location,.tank,#toast,.menu-card{background:var(--panel);border:1px solid #c4adf349;box-shadow:0 4px 0 #140e2d97,0 12px 25px #1e17302e}
.score-panel{position:relative;justify-self:start;min-width:159px;padding:10px 14px 8px;border-radius:10px;display:grid}
.eyebrow{font-size:11px;display:flex;gap:7px;align-items:center;color:#efe7ef}
.eyebrow i{width:7px;height:7px}
#score{font-size:36px;color:var(--paper);line-height:1.13;font-style:italic;letter-spacing:-.055em;font-weight:950;font-variant-numeric:tabular-nums}
#record{font-size:10px;color:var(--muted);font-variant-numeric:tabular-nums}
#combo{position:absolute;left:0;top:calc(100% + 11px);display:flex;align-items:center;min-width:100%;height:42px;gap:7px;padding:2px 11px 7px;color:var(--ink);background:var(--yellow);border-radius:7px;box-shadow:0 3px #e18e45;overflow:hidden;transform:rotate(-3deg)}
#combo b{font-size:28px;font-weight:950;font-style:italic}
#combo span{font-size:12px;white-space:nowrap}
#comboTime{position:absolute;bottom:0;left:0;width:100%;height:3px;background:#a7544b;transform-origin:left}
.location{padding:8px 12px 9px;border-radius:10px;text-align:center;white-space:nowrap}
.location div{display:flex;align-items:center;justify-content:center;gap:7px;font-size:14px}
.location small{display:block;margin-top:5px;color:var(--muted);font-size:10px}
.location .zone-progress{gap:3px;margin-top:5px}
.zone-progress i{width:11px;height:3px;border-radius:3px;background:#9c83b957}
.zone-progress i.done{background:var(--yellow)}
#sector{display:inline-block;background:#61508a;color:#fff0de;padding:2px 5px;border-radius:4px;font:900 10px system-ui}
.map-panel{justify-self:end;display:grid;grid-template-columns:44px 44px;gap:6px;justify-items:end}
.icon{width:44px;height:44px;display:grid;place-items:center;background:var(--panel);border:1px solid #c5a9f353;border-radius:9px;box-shadow:0 3px #170f2cbd;font-size:23px}
.icon[aria-pressed=true]{color:#b8abcd;text-decoration:line-through}
.pause-glyph{width:14px;height:16px;border-left:4px solid var(--paper);border-right:4px solid var(--paper)}
#map{grid-column:span 2;width:86px;height:86px;border:1px solid #c5a9f353;border-radius:10px;background:var(--panel);box-shadow:0 3px #170f2caa}
.bottom{position:absolute;bottom:max(23px,env(safe-area-inset-bottom));left:max(23px,env(safe-area-inset-left));right:max(23px,env(safe-area-inset-right));display:grid;grid-template-columns:1fr auto 1fr;align-items:end;gap:10px}
.move{position:relative;display:grid;justify-items:center;align-content:center;width:151px;height:148px;margin:0 0 -11px -11px;color:#fff2d9;font-size:10px;font-weight:900}
#stickBase{position:relative;width:104px;height:104px;border:2px solid #ffeeca66;background:#21183a82;border-radius:50%;box-shadow:inset 0 0 0 6px #fff1,0 4px #150d2b64;display:grid;place-items:center}
#stickBase::before,#stickBase::after{content:"";position:absolute;background:#ffecb849;left:50%;top:50%;transform:translate(-50%,-50%)}
#stickBase::before{width:86%;height:1px}
#stickBase::after{height:86%;width:1px}
#stick{width:42px;height:42px;border-radius:50%;z-index:1;border:2px solid #fff4d8c2;background:#988791;box-shadow:0 3px #241b3c, inset 0 4px #ffffff45}
.move>span{line-height:22px;text-shadow:0 2px #1c1334}
.tank{align-self:end;width:clamp(180px,23vw,320px);padding:11px 13px 9px;border-radius:10px}
.tank div:first-child{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;color:var(--paper)}
.tank b{color:var(--yellow);font-variant-numeric:tabular-nums}
.tank .meter{height:11px;background:#100d20;border:1px solid #886cb057;border-radius:3px;overflow:hidden;margin-top:7px}
.meter i{width:100%;height:100%;display:block;transform-origin:left;background:repeating-linear-gradient(110deg,#ffe15a 0 13px,#ffc348 13px 21px);box-shadow:inset 0 2px #fff6}
.tank small{display:block;color:var(--muted);margin-top:6px;font-size:10px;text-align:center}
.actions{display:flex;gap:12px;align-items:end;justify-self:end}
#fire,#boost{display:grid;justify-items:center;align-content:center;border-radius:50%;color:var(--ink);transition:transform .1s;outline-offset:3px}
#fire{width:96px;height:96px;background:radial-gradient(circle at 36% 25%,#fff1a3,var(--yellow) 53%,#ffc843);border:3px solid #fff2bc;box-shadow:0 6px #e4923d,0 8px 0 2px #241839,inset 0 -5px #ef9e3266;font-family:Gugi,system-ui;font-size:21px;line-height:1.18}
#fire.on,#fire:active,#boost:active{transform:translateY(4px) scale(.96)}
.jet-icon{width:30px;height:22px;display:block;position:relative;transform:rotate(-33deg);margin:0 0 4px}
.jet-icon::before,.jet-icon::after{content:"";position:absolute;background:var(--ink);border-radius:50px}
.jet-icon::before{width:25px;height:5px;top:8px;left:5px;box-shadow:-5px -7px var(--ink),-5px 7px var(--ink)}
.jet-icon::after{width:5px;height:5px;top:8px;left:-3px}
#boost{width:63px;height:63px;gap:1px;padding:0;background:#302347;border:2px solid #b99cdc;box-shadow:0 4px #201433;color:var(--paper);font-size:11px}
#boost small{font:800 10px system-ui;color:#d7c4ec}
#boost.ready,#boost.active{background:#804dd7;border-color:#e4cbff;box-shadow:0 0 19px #d597ff,0 4px #48297a}
.bolt{display:block;width:13px;height:16px;background:#ddbbff;clip-path:polygon(48% 0,100% 0,68% 39%,98% 39%,24% 100%,37% 55%,0 55%)}
#toast{position:absolute;top:23%;left:50%;transform:translateX(-50%);text-align:center;white-space:nowrap;padding:9px 17px;border-left:3px solid var(--yellow);border-radius:5px;color:var(--paper);font-size:13px}
#toast.hint{top:auto;bottom:calc(max(23px,env(safe-area-inset-bottom)) + 113px);font-size:12px}
.pop{position:absolute;font:normal clamp(21px,3.7vw,46px)/1 Gugi,system-ui;white-space:nowrap;color:var(--yellow);paint-order:stroke fill;-webkit-text-stroke:.16em #281938;text-shadow:2px 4px #271734;will-change:transform,opacity}
.pop.big{color:#fff1d4;font-size:clamp(34px,5.8vw,76px)}
#menu{place-items:center;background:#140d2bc2}
.menu-card{padding:29px 22px 23px;width:min(calc(100vw - 32px),350px);text-align:center;border-radius:17px}
.menu-card h2{font:normal 35px Gugi,system-ui;color:var(--paper);margin:0 0 24px}
.menu-card .primary{width:100%;min-width:0}
.menu-options{display:flex;justify-content:center;gap:6px;margin:17px 0 7px}
.menu-options button,.secondary{border-radius:7px;border:1px solid #a88bce52;background:#a88bce23;padding:8px 10px;min-height:44px;color:var(--paper);font-size:13px}
.secondary{background:transparent;border-color:transparent;color:#ddd0e5}
.noscript{position:absolute;z-index:8;bottom:12px;left:20px;color:#fff}
@media (pointer:coarse){.desktop{display:none!important}.touch{display:inline}}
@media (max-width:680px) and (orientation:portrait){
  #opening{align-items:start;background:linear-gradient(180deg,#24183de8,#281f4078 37%,transparent 68%,#211639b0)}
  .splash{width:100%;padding:clamp(34px,9.5dvh,96px) 16px 0 max(22px,6vw,env(safe-area-inset-left))}
  .wordmark{margin-bottom:17px}
  h1{font-size:clamp(58px,15.7vw,101px);margin-bottom:20px;line-height:.87}
  .splash p{margin-top:24px;margin-bottom:16px}
  .primary{min-width:193px;min-height:50px;font-size:18px}
  .opening-controls{margin-top:16px}
  .top{left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));top:max(10px,env(safe-area-inset-top));gap:4px}
  .score-panel{min-width:auto;padding:8px 8px 7px}
  #score{font-size:clamp(22px,7vw,30px)}
  .eyebrow,#record{font-size:9px}
  .location{padding:7px 6px}
  .location div{font-size:clamp(10px,3.1vw,14px);gap:4px}
  .location small{font-size:9px}
  .map-panel{grid-template-columns:44px 44px;gap:3px}
  #map{width:64px;height:64px}
  .bottom{left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));grid-template-columns:1fr 1fr;gap:7px}
  .tank{grid-row:1;grid-column:span 2;justify-self:center;width:clamp(125px,44vw,220px);padding:7px 9px 9px}
  .tank .meter{height:8px;margin-top:4px}
  .tank small{display:none}
  .move{margin:-12px 0 -8px -5px;width:133px;height:122px}
  #stickBase{width:92px;height:92px}
  #stick{width:38px;height:38px}
  .actions{gap:8px;margin:0 4px 5px 0}
  #fire{width:82px;height:82px;font-size:18px}
  #boost{width:53px;height:53px}
  #toast.hint{bottom:calc(max(14px,env(safe-area-inset-bottom)) + 173px)}
}
@media (max-height:480px) and (orientation:landscape){
  .splash{padding-bottom:0}
  .wordmark{margin-bottom:10px}
  h1{font-size:clamp(49px,18dvh,86px);margin-bottom:9px}
  .splash p{margin:16px 0 12px 7px;font-size:13px}
  .primary{min-height:42px;min-width:172px;font-size:16px}
  .opening-controls{margin-top:12px}
  .top{top:max(8px,env(safe-area-inset-top))}
  .score-panel{padding:6px 10px;min-width:120px}
  #score{font-size:27px}
  #map{width:58px;height:58px}
  .bottom{bottom:max(11px,env(safe-area-inset-bottom))}
  .move{height:101px;width:116px}
  #stickBase{width:72px;height:72px}
  #stick{width:32px;height:32px}
  #fire{width:73px;height:73px;font-size:17px}
  #boost{width:50px;height:50px}
  .tank{padding:6px 10px}
}
@media (prefers-reduced-motion:reduce){button{transition:none!important}}
