/* v3.2 gameplay recovery, continue, and difficulty presentation. */
.continue-modal {
  position: fixed;
  inset: 0;
  z-index: 1900;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 35%, rgba(0,255,157,0.14), transparent 36%),
    rgba(0,0,0,0.88);
  backdrop-filter: blur(10px);
}
.continue-modal.show { display: flex; }
.continue-card {
  width: min(420px, 94vw);
  border-radius: 18px;
  border: 1px solid rgba(0,255,157,0.48);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.055), transparent 22%),
    rgba(3,10,14,0.96);
  box-shadow: 0 24px 70px rgba(0,0,0,0.72), 0 0 34px rgba(0,255,157,0.13);
  padding: 22px 18px;
  text-align: center;
}
.continue-kicker {
  color: var(--neon, #00ff9d);
  font-size: 0.58rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.continue-card h3 {
  margin: 8px 0 8px;
  font-size: 1.1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.continue-card p {
  margin: 0 auto 16px;
  max-width: 33ch;
  font-size: 0.66rem;
  line-height: 1.6;
  opacity: 0.82;
}
.continue-costs {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}
.continue-costs .btn,
.continue-quit { width: 100%; }
.continue-quit { opacity: 0.78; }

body.damage-immune .arcade-canvas-wrap {
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.06),
    inset 0 0 34px rgba(102,230,255,0.16),
    0 0 24px rgba(102,230,255,0.16),
    0 12px 30px rgba(0,0,0,0.6);
}
body.damage-immune .arcade-frame-overlay {
  background:
    radial-gradient(circle at 50% 70%, rgba(110,235,255,0.12), transparent 45%),
    linear-gradient(180deg, rgba(255,255,255,0.055), transparent 18%, transparent 82%, rgba(0,0,0,0.18));
}

body.difficulty-casual .arcade-shell {
  --difficulty-accent: rgba(96,232,255,0.55);
}
body.difficulty-standard .arcade-shell {
  --difficulty-accent: rgba(0,255,157,0.52);
}
body.difficulty-hard .arcade-shell {
  --difficulty-accent: rgba(255,92,105,0.60);
}
body.difficulty-hard .arcade-canvas-wrap {
  border-color: rgba(255,92,105,0.20);
}

@media (max-width: 640px) {
  .continue-card { padding: 18px 14px; }
  .continue-card h3 { font-size: 0.94rem; }
}

/* v3.9.1 — iPhone audio placement + collision-free bottom controls. */
.arcade-stage-toolbar{
  position:relative!important;
  z-index:12!important;
}
.arcade-stage-toolbar .arcade-mute-btn{
  position:static!important;
  inset:auto!important;
  pointer-events:auto!important;
}
.mobile-controls .ctrl-label{
  display:block;
  max-width:100%;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:clip;
  pointer-events:none;
}
body.touch-ui .mobile-controls{
  display:grid!important;
  grid-template-columns:
    minmax(68px,1.05fr)
    minmax(44px,.82fr)
    minmax(42px,.76fr)
    minmax(56px,1.08fr)!important;
  align-items:stretch!important;
  gap:4px!important;
  /* v4.6.29.142 — stay in-flow inside bottom dock (no fixed bottom/transform).
     Fixed bottom + chrome clearance crushed the stage after .140. */
  position:relative!important;
  left:auto!important;
  right:auto!important;
  top:auto!important;
  bottom:auto!important;
  transform:none!important;
  width:100%!important;
  max-width:100%!important;
  margin:9px 0 max(8px, env(safe-area-inset-bottom, 0px))!important;
  padding:6px!important;
  box-sizing:border-box!important;
  border-radius:18px!important;
}
/* Classic bottom dock already clears home-indicator — zero extra bottom margin. */
body.touch-ui.arcade-bottom-dock-active:not(.gauntlet-active) .mobile-controls{
  margin:6px 0 0!important;
}
body.touch-ui .mobile-controls .ctrl{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  height:54px!important;
  padding:5px 2px!important;
  margin:0!important;
  box-sizing:border-box!important;
  font-size:clamp(.45rem,2.25vw,.62rem)!important;
  line-height:1.05!important;
  letter-spacing:.025em!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  touch-action:manipulation!important;
}
body.touch-ui .mobile-controls .ctrl-move{
  font-size:clamp(.76rem,4vw,1.05rem)!important;
}
body.touch-ui .mobile-controls .ctrl-special{
  font-size:clamp(.41rem,2.05vw,.58rem)!important;
}
body.touch-ui .mobile-controls .arcade-move-stick{
  display:grid!important;
  min-height:54px!important;
}
body.touch-ui.big-touch .mobile-controls .ctrl{
  height:60px!important;
}
body.left-handed .mobile-controls .arcade-move-stick,
body.left-handed .mobile-controls .ctrl { direction: ltr; }

@media(max-width:360px){
  .arcade-stage-toolbar{min-height:32px!important;margin-bottom:5px!important}
  .arcade-stage-toolbar .arcade-mute-btn{
    min-width:100px!important;
    min-height:31px!important;
    padding:5px 9px!important;
    font-size:.48rem!important;
  }
  body.touch-ui .mobile-controls{
    width:calc(100vw - 8px)!important;
    gap:3px!important;
    padding:5px!important;
  }
  body.touch-ui .mobile-controls .ctrl{
    height:50px!important;
    font-size:.43rem!important;
  }
  body.touch-ui .mobile-controls .ctrl-special{
    font-size:.39rem!important;
  }
}

