:root{--black:#080808;--white:#f5f4ef;--sand:#d8cfbf;--blue:#0799b1;--line:rgba(255,255,255,.22);--pad:clamp(18px,4vw,64px);--sans:Arial,"Helvetica Neue","Noto Sans JP",sans-serif}
*{box-sizing:border-box}html{background:var(--black)}body{margin:0;background:var(--black);color:var(--white);font-family:var(--sans);line-height:1.5}button,a{font:inherit}a{color:inherit;text-decoration:none}.game-header{height:72px;display:flex;align-items:center;justify-content:space-between;padding:0 var(--pad);border-bottom:1px solid rgba(255,255,255,.15);position:relative;z-index:4}.game-wordmark{font-weight:800;letter-spacing:-.04em;font-size:clamp(16px,2vw,23px)}.game-wordmark span{font-weight:400}.back-link{font-size:10px;letter-spacing:.16em}.game-shell{padding:45px var(--pad) 70px;max-width:1500px;margin:auto}.game-intro{display:grid;grid-template-columns:1.2fr .8fr;gap:50px;align-items:end;margin-bottom:38px}.game-kicker{grid-column:1/-1;margin:0;font-size:10px;letter-spacing:.17em}.game-intro h1{font-size:clamp(54px,8.5vw,126px);letter-spacing:-.075em;line-height:.78;margin:0}.game-copy{font-size:clamp(15px,1.6vw,21px);margin:0 0 4px}.game-panel{border:1px solid rgba(255,255,255,.25);background:#111;position:relative;overflow:hidden}.select-screen{padding:clamp(24px,4vw,58px)}.select-head{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid rgba(255,255,255,.22);padding-bottom:14px;margin-bottom:24px;font-size:10px;letter-spacing:.16em}.select-head p{margin:0;font-weight:700}.select-head span{opacity:.65}.pilot-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.pilot-card{appearance:none;border:1px solid rgba(255,255,255,.18);background:#0a0a0a;color:#fff;padding:20px 12px 16px;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;cursor:pointer;transition:.2s}.pilot-card:hover,.pilot-card.is-selected{border-color:#fff;background:#181818}.pilot-card.is-selected{box-shadow:inset 0 -5px 0 var(--blue)}.pilot-card strong{font-size:18px;margin-top:17px}.pilot-card small{font-size:9px;letter-spacing:.16em;margin-top:4px}.pilot-card em{font-style:normal;font-size:11px;opacity:.68;margin-top:8px}.pilot-preview{height:118px;width:100%;display:block;position:relative;margin:auto}.pilot-preview:before,.pilot-preview:after,.pilot-preview i:before,.pilot-preview i:after{content:"";position:absolute}.pilot-preview:before,.pilot-preview:after{width:8px;height:10px;background:#fff;border-radius:50%;top:34px;z-index:3}.pilot-preview:before{left:calc(50% - 16px)}.pilot-preview:after{left:calc(50% + 8px)}.pilot-preview i:before,.pilot-preview i:after{width:3px;height:3px;background:#111;border-radius:50%;top:37px;z-index:4}.pilot-preview i:before{left:calc(50% - 13px)}.pilot-preview i:after{left:calc(50% + 11px)}.pilot-gari{background:linear-gradient(#36c3da,#0799b1);width:58px;border-radius:10px 10px 4px 4px}.pilot-gari b{position:absolute;width:16px;height:36px;background:#b99166;left:21px;bottom:-25px;border-radius:0 0 6px 6px}.pilot-pino{width:88px;height:88px;margin-top:15px;border-radius:50% 50% 43% 43%;background:#513022;box-shadow:inset 0 -13px 0 rgba(0,0,0,.18)}.pilot-pino:before,.pilot-pino:after{top:28px}.pilot-pino i:before,.pilot-pino i:after{top:31px}.pilot-papico{width:118px;background:linear-gradient(90deg,transparent 5%,#f2e0c3 5%,#f2e0c3 43%,transparent 43%,transparent 57%,#f2e0c3 57%,#f2e0c3 95%,transparent 95%);border-radius:25px}.pilot-papico b:before,.pilot-papico b:after{content:"";position:absolute;top:-10px;width:24px;height:28px;background:#b7e2e7;border-radius:8px 8px 2px 2px}.pilot-papico b:before{left:15px}.pilot-papico b:after{right:15px}.pilot-papico:before{left:26px}.pilot-papico:after{left:auto;right:26px}.pilot-papico i:before{left:29px}.pilot-papico i:after{left:auto;right:29px}.pilot-seventeen{width:88px;height:88px;border-radius:50%;background:conic-gradient(#f0c7cc,#f1d689,#a9d9cc,#c5b6dc,#f0c7cc);margin-top:0}.pilot-seventeen b{position:absolute;left:19px;top:73px;width:50px;height:47px;background:repeating-linear-gradient(45deg,#c89456 0 3px,#e4bc80 3px 6px);clip-path:polygon(0 0,100% 0,50% 100%)}.start-button{width:100%;min-height:58px;margin-top:28px;background:#fff;color:#050505;border:0;font-size:12px;font-weight:800;letter-spacing:.17em;cursor:pointer}.start-button:hover{background:var(--blue);color:white}.control-note{text-align:center;font-size:10px;letter-spacing:.1em;opacity:.6;margin:17px 0 0}.play-screen{background:#050505}.hud{height:54px;border-bottom:1px solid rgba(255,255,255,.18);display:flex;align-items:center;padding:0 18px;gap:28px;font-size:9px;letter-spacing:.14em}.hud div{display:flex;gap:9px;align-items:center}.hud span{opacity:.55}.hud strong{font-size:13px}.hud div:nth-child(3){margin-left:auto}.sound-button{border:1px solid rgba(255,255,255,.25);background:transparent;color:#fff;padding:7px 10px;font-size:8px;letter-spacing:.12em;cursor:pointer}.canvas-wrap{position:relative;background:#030303}.canvas-wrap canvas{display:block;width:100%;height:auto;aspect-ratio:4/3;max-height:calc(100svh - 180px);object-fit:contain;touch-action:none}.game-message{position:absolute;inset:0;background:rgba(0,0,0,.82);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;text-align:center}.game-message[hidden]{display:none}.game-message strong{font-size:clamp(40px,7vw,88px);letter-spacing:-.05em}.game-message span{font-size:12px;letter-spacing:.16em}.game-message button{min-width:220px;padding:14px 20px;background:white;color:black;border:0;font-size:11px;font-weight:700;letter-spacing:.14em;cursor:pointer}.game-message .message-sub{background:transparent;color:white;border:1px solid rgba(255,255,255,.45)}.touch-controls{display:none;grid-template-columns:1fr 1.25fr 1fr;gap:8px;padding:10px;background:#111}.touch-controls button{height:58px;border:1px solid rgba(255,255,255,.3);background:#050505;color:#fff;font-size:23px;font-weight:700;touch-action:none}.touch-controls .fire-control{background:var(--blue);border-color:var(--blue);font-size:13px;letter-spacing:.14em}.prototype-note{font-size:9px;letter-spacing:.09em;opacity:.48;margin:18px 0 0;text-align:right}@media(max-width:800px){.game-header{height:60px}.game-shell{padding-top:30px}.game-intro{grid-template-columns:1fr;gap:20px}.game-intro h1{font-size:17vw}.pilot-grid{grid-template-columns:1fr 1fr}.pilot-card{min-height:220px}.select-head span{display:none}.hud{gap:13px;padding:0 10px}.hud div{gap:4px}.sound-button{display:none}.touch-controls{display:grid}.canvas-wrap canvas{max-height:none}.prototype-note{text-align:left}.game-copy br{display:none}}@media(max-width:430px){.pilot-card{min-height:205px;padding-left:8px;padding-right:8px}.pilot-card strong{font-size:15px}.pilot-preview{transform:scale(.88)}.hud{font-size:8px}.hud strong{font-size:11px}.hud div:nth-child(3){margin-left:0}.hud{justify-content:space-between}}


/* PROTOTYPE 02 / MELT SYSTEM */
.melt-rules{margin-top:22px;border:1px solid rgba(255,255,255,.22);padding:16px 18px;display:grid;grid-template-columns:auto 1fr;gap:18px;align-items:center}.melt-rules strong{font-size:12px;letter-spacing:.16em;white-space:nowrap}.melt-rules span{font-size:11px;line-height:1.75;opacity:.72}.hud{height:64px;gap:20px}.hud div:nth-child(3){margin-left:0}.ice-hud{min-width:170px}.ice-hud i{display:block;width:74px;height:7px;border:1px solid rgba(255,255,255,.35);margin-left:3px;overflow:hidden}.ice-hud i b{display:block;width:100%;height:100%;background:#83edf8;transition:width .15s linear,background .2s}.ice-hud i b.is-low{background:#ff8b8b}.special-hud{min-width:92px}.special-hud strong{color:rgba(255,255,255,.35)}.special-hud strong.is-ready{color:#aef7ff;animation:specialPulse .65s steps(2,end) infinite}.sound-button{margin-left:auto}@keyframes specialPulse{50%{opacity:.42}}
@media(max-width:800px){.melt-rules{grid-template-columns:1fr;gap:5px}.hud{height:auto;min-height:66px;display:grid;grid-template-columns:repeat(3,auto);gap:5px 10px;padding:8px 10px}.hud div{justify-content:flex-start}.hud .ice-hud{grid-column:1/3;min-width:0}.hud .special-hud{grid-column:3;min-width:0}.ice-hud i{width:62px}.touch-controls{padding-top:8px}}
@media(max-width:430px){.hud{grid-template-columns:repeat(3,1fr)}.hud .ice-hud{grid-column:1/3}.hud span{font-size:7px}.ice-hud i{width:52px}.melt-rules span{font-size:10px}}


/* MOBILE CONTROL FIX */
body,.game-shell,.game-panel,.canvas-wrap,.touch-controls,.touch-controls button{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.game-panel,.canvas-wrap,.touch-controls{touch-action:none;overscroll-behavior:none}.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.touch-controls button{position:relative;display:flex;align-items:center;justify-content:center;appearance:none;outline:none}.touch-controls .move-control::before{content:"";display:block;width:0;height:0;border-top:13px solid transparent;border-bottom:13px solid transparent}.touch-controls .move-left::before{border-right:22px solid #fff;margin-right:4px}.touch-controls .move-right::before{border-left:22px solid #fff;margin-left:4px}.touch-controls .fire-control span{display:inline-block;transform:translateY(1px)}.touch-controls button:active{transform:translateY(1px);background:#141414}.touch-controls .fire-control:active{background:#058ea5}.touch-controls button:focus-visible{box-shadow:0 0 0 2px #fff inset,0 0 0 4px rgba(255,255,255,.18)}

/* PROTOTYPE 03 / GAP FORMATION LOOP */
.touch-controls{grid-template-columns:minmax(0,1.65fr) minmax(112px,.85fr);align-items:stretch}
.touch-controls .move-pad{display:grid;grid-template-columns:1fr 1fr;gap:8px;min-width:0}
.touch-controls .move-pad button,.touch-controls>.fire-control{width:100%;height:64px}
.touch-controls>.fire-control{font-size:14px;letter-spacing:.16em}
@media(max-width:430px){.touch-controls{grid-template-columns:minmax(0,1.7fr) minmax(96px,.8fr);gap:7px;padding:8px}.touch-controls .move-pad{gap:7px}.touch-controls .move-pad button,.touch-controls>.fire-control{height:62px}}


/* v556: MAX FREEZE + five-piece special stock */
.max-freeze-count{display:none;margin-left:3px;font-size:8px;font-weight:800;letter-spacing:.08em;color:#8ff4ff;white-space:nowrap}
.max-freeze-count.is-active{display:inline-block;animation:maxFreezePulse .75s steps(2,end) infinite}
.ice-hud i b.is-max-freeze{background:#b8fbff;box-shadow:0 0 10px rgba(131,237,248,.9)}
.touch-controls>.fire-control.is-special-ready{animation:specialButtonPulse .72s steps(2,end) infinite;box-shadow:inset 0 0 0 3px #fff,0 0 18px rgba(131,237,248,.65)}
@keyframes maxFreezePulse{50%{opacity:.45}}
@keyframes specialButtonPulse{50%{filter:brightness(1.35)}}
@media(max-width:430px){.max-freeze-count{font-size:7px}.touch-controls>.fire-control.is-special-ready{box-shadow:inset 0 0 0 2px #fff,0 0 12px rgba(131,237,248,.55)}}


/* v557: PORTRAIT CABINET + AUDIO CONTROLS */
.game-shell{max-width:980px;padding-top:28px}
.game-intro{max-width:742px;margin:0 auto 22px;grid-template-columns:minmax(0,1fr) minmax(220px,.72fr);gap:24px;align-items:end}
.game-kicker{font-size:9px}
.game-intro h1{font-size:clamp(38px,5.4vw,72px);line-height:.83;letter-spacing:-.065em}
.game-copy{font-size:clamp(13px,1.3vw,17px);line-height:1.6}
.game-panel{max-width:742px;margin:0 auto}
.select-actions{display:flex;align-items:center;gap:12px}
.select-sound{margin-left:0}
.canvas-wrap{display:flex;justify-content:center;align-items:flex-start}
.canvas-wrap canvas{width:100%;height:auto;aspect-ratio:3/4;max-height:none;object-fit:contain}
.hud{height:auto;min-height:68px;display:flex;flex-wrap:wrap;align-items:center;padding:8px 12px;gap:7px 16px}
.hud div{min-height:22px}
.hud .ice-hud{min-width:166px}
.hud .special-hud{min-width:92px}
.sound-button{display:inline-flex;align-items:center;justify-content:center;min-height:30px;white-space:nowrap}
.sound-button[aria-pressed="false"]{opacity:.55;border-style:dashed}
@media(max-width:800px){
  .game-shell{padding:20px 10px 42px}
  .game-intro{grid-template-columns:1fr;gap:8px;margin-bottom:14px}
  .game-intro h1{font-size:clamp(34px,11vw,54px);line-height:.84}
  .game-copy{font-size:12px;line-height:1.55}
  .game-kicker{font-size:8px}
  .select-actions span{display:none}
  .sound-button{display:inline-flex}
  .hud{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px 8px;padding:7px 78px 7px 8px}
  .hud div{justify-content:flex-start;min-width:0}
  .hud .ice-hud{grid-column:1/3;min-width:0}
  .hud .special-hud{grid-column:3;min-width:0}
  .hud .sound-button{position:absolute;top:7px;right:8px;margin:0;min-height:26px;padding:5px 7px}
  .canvas-wrap canvas{width:100%;max-height:none}
  .touch-controls{display:grid}
}
@media(max-width:430px){
  .game-header{height:54px;padding:0 12px}
  .game-wordmark{font-size:14px}
  .back-link{font-size:8px}
  .game-shell{padding-left:7px;padding-right:7px}
  .game-intro{padding:0 6px}
  .game-intro h1{font-size:10.5vw}
  .game-copy{font-size:11px}
  .hud{font-size:7px;letter-spacing:.08em}
  .hud strong{font-size:10px}
  .hud .sound-button{font-size:7px}
  .ice-hud i{width:46px}
}


/* v562: GAPPLUS-STYLE LOWER-FIELD 8-WAY MOVEMENT */
.touch-controls{grid-template-columns:minmax(0,1.55fr) minmax(112px,.72fr);align-items:stretch}
.touch-controls .move-stick{position:relative;min-width:0;height:112px;border:1px solid rgba(255,255,255,.3);background:radial-gradient(circle at 50% 50%,#151515 0 28%,#080808 29% 100%);overflow:hidden;touch-action:none;cursor:crosshair}
.touch-controls .move-stick::before,.touch-controls .move-stick::after{content:"";position:absolute;pointer-events:none;background:rgba(255,255,255,.08)}
.touch-controls .move-stick::before{left:50%;top:9px;bottom:9px;width:1px}
.touch-controls .move-stick::after{top:50%;left:9px;right:9px;height:1px}
.stick-arrow{position:absolute;color:rgba(255,255,255,.55);font-size:12px;line-height:1;pointer-events:none;z-index:2}.stick-up{left:50%;top:8px;transform:translateX(-50%)}.stick-right{right:9px;top:50%;transform:translateY(-50%)}.stick-down{left:50%;bottom:8px;transform:translateX(-50%)}.stick-left{left:9px;top:50%;transform:translateY(-50%)}
.stick-knob{position:absolute;left:50%;top:50%;width:45px;height:45px;margin:-22.5px 0 0 -22.5px;border:1px solid rgba(255,255,255,.72);border-radius:50%;background:#202020;box-shadow:inset 0 0 0 6px #0b0b0b;pointer-events:none;z-index:3;will-change:transform;transition:transform .045s linear}
.move-stick.is-active .stick-knob{background:#2b2b2b;border-color:#fff;transition:none}.move-stick.is-active .stick-arrow{color:#fff}
.touch-controls>.fire-control{height:112px}
@media(max-width:430px){.touch-controls{grid-template-columns:minmax(0,1.62fr) minmax(96px,.68fr)}.touch-controls .move-stick,.touch-controls>.fire-control{height:96px}.stick-knob{width:41px;height:41px;margin:-20.5px 0 0 -20.5px}.stick-arrow{font-size:10px}}
.game-message{padding:24px;overflow:auto}.game-message>strong{font-size:clamp(34px,5.5vw,68px)}.game-message button[hidden]{display:none!important}.your-hi-score{width:min(360px,88%);display:grid;grid-template-columns:1fr auto;align-items:end;gap:4px 18px;border-top:1px solid rgba(255,255,255,.42);border-bottom:1px solid rgba(255,255,255,.18);padding:13px 4px 12px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;animation:hiScoreIn .42s ease both}.your-hi-score[hidden]{display:none!important}.your-hi-score span{grid-column:1/-1;font-size:9px;letter-spacing:.2em;opacity:.62}.your-hi-score strong{font-size:clamp(31px,5vw,54px);line-height:1;letter-spacing:.06em}.your-hi-score em{font-size:10px;font-style:normal;letter-spacing:.12em;opacity:.62;padding-bottom:5px}.your-hi-score.is-new{border-color:#fff1a6}.your-hi-score.is-new span,.your-hi-score.is-new strong{color:#fff1a6;animation:newScorePulse .8s ease 2}@keyframes hiScoreIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}@keyframes newScorePulse{0%,100%{opacity:1}50%{opacity:.42}}@media(max-width:650px){.game-message{justify-content:center;padding:22px 14px;gap:12px}.game-message>strong{font-size:34px}.your-hi-score{width:min(320px,94%)}.your-hi-score strong{font-size:38px}}
\n\n/* v564: GENTLE SPEED RAMP + COMPACT MOBILE PILOT SELECT */
/* Selection must remain scrollable even though the live game locks touch input. */
.game-panel{touch-action:auto;overscroll-behavior:auto}
.play-screen,.canvas-wrap,.touch-controls{touch-action:none;overscroll-behavior:none}
.select-screen{touch-action:pan-y;overscroll-behavior:auto}

@media(max-width:650px){
  .select-screen{padding:10px 8px 12px}
  .select-head{padding-bottom:7px;margin-bottom:8px;font-size:8px}
  .select-actions{gap:6px}
  .select-sound{min-height:26px;padding:4px 7px;font-size:7px}
  .pilot-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
  .pilot-card{min-width:0;min-height:145px;padding:7px 3px 8px}
  .pilot-preview{height:76px;transform:scale(.56);transform-origin:50% 0;margin:0 auto -22px}
  .pilot-card strong{max-width:100%;font-size:11px;line-height:1.15;margin-top:4px;white-space:nowrap;letter-spacing:-.04em}
  .pilot-card small{font-size:6px;line-height:1.2;letter-spacing:.07em;margin-top:3px;white-space:nowrap}
  .pilot-card em{font-size:8px;line-height:1.2;margin-top:4px;white-space:nowrap}
  .melt-rules{display:block;margin-top:8px;padding:7px 8px}
  .melt-rules strong{display:block;font-size:8px;letter-spacing:.12em}
  .melt-rules span{display:none}
  .start-button{min-height:48px;margin-top:8px;font-size:10px}
  .control-note{font-size:7px;line-height:1.4;margin:7px 0 0}
}

@media(max-width:650px) and (max-height:760px){
  .game-header{height:46px}
  .game-shell{padding-top:8px;padding-bottom:22px}
  .game-intro{margin-bottom:7px;gap:0}
  .game-kicker,.game-copy{display:none}
  .game-intro h1{font-size:8.8vw;line-height:.84}
  .pilot-card{min-height:126px;padding-top:5px;padding-bottom:6px}
  .pilot-preview{height:66px;transform:scale(.50);margin-bottom:-27px}
  .pilot-card strong{font-size:10px}
  .pilot-card em{font-size:7px}
  .control-note{display:none}
}
@media(max-width:650px){.control-note{display:none}}


/* v565: MOBILE CABINET FIT — keep HUD, playfield and controls inside the live viewport */
@media(max-width:800px){
  body.is-playing{
    height:100vh;
    height:100dvh;
    overflow:hidden;
  }
  body.is-playing .game-header,
  body.is-playing .game-intro,
  body.is-playing .prototype-note{
    display:none!important;
  }
  body.is-playing .game-shell{
    width:100%;
    max-width:none;
    height:100vh;
    height:100dvh;
    padding:0;
    margin:0;
  }
  body.is-playing .game-panel{
    width:100%;
    max-width:none;
    height:100%;
    margin:0;
    border:0;
    overflow:hidden;
  }
  body.is-playing .play-screen{
    height:100%;
    min-height:0;
    display:grid;
    grid-template-rows:auto minmax(0,1fr) auto;
    overflow:hidden;
  }
  body.is-playing .canvas-wrap{
    width:100%;
    min-width:0;
    min-height:0;
    overflow:hidden;
    align-items:center;
    justify-content:center;
  }
  body.is-playing .canvas-wrap canvas{
    display:block;
    width:auto;
    height:100%;
    max-width:100%;
    max-height:100%;
    aspect-ratio:3/4;
    object-fit:contain;
  }
  body.is-playing .touch-controls{
    flex:0 0 auto;
    min-height:0;
    padding:7px 8px calc(7px + env(safe-area-inset-bottom));
  }
}

@media(max-width:430px){
  body.is-playing .hud{
    min-height:58px;
    padding-top:5px;
    padding-bottom:5px;
  }
  body.is-playing .touch-controls .move-stick,
  body.is-playing .touch-controls>.fire-control{
    height:84px;
  }
}

@media(max-width:650px) and (max-height:700px){
  body.is-playing .hud{
    min-height:54px;
    gap:3px 7px;
    padding:4px 70px 4px 7px;
  }
  body.is-playing .hud .sound-button{
    top:5px;
    right:6px;
    min-height:22px;
    padding:3px 5px;
  }
  body.is-playing .touch-controls .move-stick,
  body.is-playing .touch-controls>.fire-control{
    height:76px;
  }
  body.is-playing .touch-controls{
    padding-top:5px;
  }
}
