/* Banzai Rush : shoot'em up vertical (zone de jeu 2:3 en canvas, interface HTML autour). */
:root {
  --bg: #05010d;
  --ink: #f4f1ff;
  --muted: #9b93c4;
  --red: #ff2a4a;
  --orange: #ff8a1f;
  --gold: #ffcf4a;
  --cyan: #36e6ff;
  --pink: #ff5ad1;
  --violet: #8b5cff;
  --panel: rgba(12, 4, 28, 0.86);
  --ui-scale: 1;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: var(--bg); color: var(--ink);
  font-family: 'Audiowide', system-ui, sans-serif;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none; overscroll-behavior: none;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }

#g2 { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #12052a 0%, var(--bg) 70%); }

/* ------------------------------------------------------------------ zone de jeu */
.g2-play { position: absolute; z-index: 2; }
.g2-screen {
  position: absolute; inset: 0; overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 0 40px rgba(0,0,0,0.8);
  background: #000;
}
#g2-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: auto; }

/* Ambilight : copie réduite du jeu, floutée et saturée derrière la zone de jeu */
#g2-ambilight {
  position: absolute; left: -32%; top: -10%; width: 164%; height: 120%;
  filter: blur(56px) saturate(2) brightness(1.25);
  opacity: 0; transition: opacity .6s;
  pointer-events: none; z-index: -1;
}
#g2.ambilight-on #g2-ambilight { opacity: 0.85; }

.g2-scanlines {
  position: absolute; inset: 0; pointer-events: none; display: none; z-index: 3;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,0.22) 3px, rgba(0,0,0,0) 4px);
  box-shadow: inset 0 0 90px rgba(0,0,0,0.65);
}
#g2.scanlines-on .g2-scanlines { display: block; }

.g2-pause-btn {
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%); z-index: 6;
  width: 38px; height: 30px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.25);
  background: rgba(10,0,25,0.45); color: #fff; font-size: 13px; cursor: pointer; display: none;
}
#g2[data-state="play"] .g2-pause-btn, #g2[data-state="dying"] .g2-pause-btn { display: block; }

/* ------------------------------------------------------------------ panneaux latéraux */
.g2-panel {
  /* pas de z-index : le panneau ne crée pas de contexte d'empilement, ce qui permet
     au fond (psy) de rester sous le glow Ambilight et aux infos de passer par-dessus */
  position: absolute; top: 0; bottom: 0; width: var(--play-left);
  display: none; overflow: hidden;
}
#g2.wide .g2-panel { display: flex; align-items: center; justify-content: center; }
.g2-panel-left { left: 0; }
.g2-panel-right { right: 0; }
.g2-panel-inner {
  position: relative; z-index: 4; /* au-dessus de .g2-play (glow Ambilight) */
  width: min(280px, 86%);
  display: flex; flex-direction: column; gap: calc(14px * var(--ui-scale));
  font-size: calc(14px * var(--ui-scale));
}
#g2.touch-pad .g2-panel { align-items: flex-start; padding-top: 12px; }
#g2.touch-pad .g2-panel-inner { gap: 6px; font-size: calc(11px * var(--ui-scale)); }
#g2.touch-pad .g2-logo, #g2.touch-pad .g2-diff { display: none; }
.g2-panel-left .g2-panel-inner { text-align: right; }
.g2-logo {
  font-family: 'Press Start 2P', monospace; font-size: 1.5em; line-height: 1.35;
  background: linear-gradient(180deg, #fff3a6, var(--orange) 55%, var(--red));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 10px rgba(255,80,40,0.6));
  margin-bottom: .4em;
}
.g2-box {
  background: var(--panel); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: .7em .9em;
  box-shadow: 0 0 20px rgba(0,0,0,0.4), inset 0 0 20px rgba(139,92,255,0.08);
  backdrop-filter: blur(4px);
}
.g2-label { font-size: .72em; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.g2-label.mt { margin-top: .5em; }
.g2-value { font-family: 'Press Start 2P', monospace; font-size: 1.15em; margin-top: .35em; color: #fff; }
.g2-score { font-size: 1.35em; color: var(--gold); text-shadow: 0 0 12px rgba(255,207,74,0.5); }
.g2-small { font-size: .85em; }
.g2-sub { font-size: .72em; color: var(--muted); margin-top: .3em; }
.g2-icons { margin-top: .4em; min-height: 1em; }
.g2-icons i { display: inline-block; width: 1em; height: 1em; margin-left: .25em; }
.g2-icons b { font-size: .8em; margin-left: .3em; }
.g2-ic-life { background: url('../images/game02/sprite/player-1.webp') center/contain no-repeat; height: 1.3em !important; }
.g2-ic-bomb { border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6c8, var(--orange) 55%, #7a2000); box-shadow: 0 0 6px var(--orange); }
.g2-speed-meter { display: flex; gap: .35em; margin-top: .5em; }
.g2-speed-meter i {
  flex: 1; height: .8em; border-radius: 3px; background: rgba(255,255,255,0.1);
  transition: background .3s, box-shadow .3s;
}
.g2-speed-meter i.on:nth-child(1) { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.g2-speed-meter i.on:nth-child(2) { background: var(--pink); box-shadow: 0 0 10px var(--pink); }
.g2-speed-meter i.on:nth-child(3) { background: var(--red); box-shadow: 0 0 14px var(--red); }
.g2-mult { font-size: 1.8em; color: var(--cyan); transition: color .3s, text-shadow .3s; }
#g2.speed-2 .g2-mult { color: var(--pink); text-shadow: 0 0 14px var(--pink); }
#g2.speed-3 .g2-mult { color: var(--red); text-shadow: 0 0 18px var(--red); animation: g2-beat .45s infinite; }
.g2-gauge { height: .5em; margin-top: .5em; border-radius: 3px; background: rgba(255,255,255,0.1); overflow: hidden; }
.g2-gauge div { height: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--cyan), var(--pink)); }
.g2-gauge-time { height: .22em; margin-top: .35em; }
.g2-gauge-time div { background: rgba(255,255,255,0.7); }
.g2-power { display: flex; gap: .35em; margin-top: .5em; }
.g2-power i { flex: 1; height: .8em; border-radius: 3px; background: rgba(255,255,255,0.1); }
.g2-power i.on { background: linear-gradient(90deg, var(--red), var(--orange)); box-shadow: 0 0 8px var(--red); }

/* Effet psychédélique des côtés : visible dès la 1re accélération, de plus en plus fort */
.g2-psy { position: absolute; inset: 0; opacity: 0; transition: opacity .8s; pointer-events: none; }
.g2-psy span {
  position: absolute; left: 50%; top: 50%; width: 260vmax; height: 260vmax; margin: -130vmax 0 0 -130vmax;
  background: repeating-conic-gradient(from 0deg, #ff2a6d 0deg, #ffcf4a 9deg, #36e6ff 18deg, #8b5cff 27deg, #ff2a6d 36deg);
  animation: g2-spin var(--psy-dur, 14s) linear infinite;
  filter: blur(3px) saturate(1.3);
}
.g2-psy span + span {
  background: repeating-radial-gradient(circle at center, rgba(255,90,209,0.85) 0, rgba(5,1,13,0) 5vmin, rgba(54,230,255,0.75) 10vmin, rgba(5,1,13,0) 15vmin, rgba(255,207,74,0.6) 20vmin, rgba(5,1,13,0) 25vmin);
  animation: g2-zoom var(--psy-zoom, 3s) ease-in-out infinite alternate;
  mix-blend-mode: overlay; filter: blur(2px);
}
.g2-panel::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(5,1,13,0.75), rgba(5,1,13,0.35) 50%, rgba(5,1,13,0.75));
}
#g2.speed-1 .g2-psy { opacity: .22; --psy-dur: 16s; --psy-zoom: 3.2s; }
#g2.speed-2 .g2-psy { opacity: .42; --psy-dur: 8s; --psy-zoom: 1.8s; }
#g2.speed-3 .g2-psy { opacity: .7; --psy-dur: 3.5s; --psy-zoom: .9s; animation: g2-hue 2.4s linear infinite; }
.g2-panel-right .g2-psy span { animation-direction: reverse; }
@keyframes g2-spin { to { transform: rotate(360deg); } }
@keyframes g2-zoom { from { transform: scale(1); } to { transform: scale(1.5); } }
@keyframes g2-hue { to { filter: hue-rotate(360deg); } }
@keyframes g2-beat { 50% { transform: scale(1.12); } }

/* flash des côtés au changement de vitesse */
/* animé sur les enfants et pas sur .g2-panel : un filter sur le panneau recréerait un
   contexte d'empilement et repasserait les infos sous le glow pendant le flash */
#g2.flash-up .g2-psy, #g2.flash-up .g2-panel-inner { animation: g2-flash-up .7s ease-out; }
#g2.flash-down .g2-psy, #g2.flash-down .g2-panel-inner { animation: g2-flash-down .8s ease-out; }
#g2.flash-banzai .g2-psy, #g2.flash-banzai .g2-panel-inner, #g2.flash-banzai .g2-screen { animation: g2-flash-banzai 1.4s ease-out; }
@keyframes g2-flash-up { 0% { filter: brightness(2.2) saturate(2); } 100% { filter: none; } }
@keyframes g2-flash-down { 0% { filter: grayscale(1) brightness(.5); } 100% { filter: none; } }
@keyframes g2-flash-banzai {
  0%, 20%, 40% { filter: brightness(2.4) hue-rotate(0deg) saturate(2.5); }
  10%, 30% { filter: brightness(1.2) hue-rotate(180deg) saturate(3); }
  100% { filter: none; }
}

/* ------------------------------------------------------------------ annonces */
.g2-speed-banner {
  position: absolute; left: 0; right: 0; top: 34%; z-index: 4; text-align: center;
  pointer-events: none; opacity: 0;
}
.g2-speed-banner.show { opacity: 1; }
.g2-speed-banner.anim { animation: g2-banner 1.8s cubic-bezier(.2,1.4,.4,1) forwards; }
.g2-speed-main {
  font-family: 'Press Start 2P', monospace; font-size: calc(26px * var(--ui-scale));
  color: #fff; letter-spacing: .04em;
  text-shadow: 0 0 6px var(--cyan), 0 0 22px var(--cyan), 4px 4px 0 #0a0030;
}
.g2-speed-sub {
  margin-top: .8em; font-size: calc(14px * var(--ui-scale)); color: var(--cyan); letter-spacing: .1em;
  white-space: pre-line; line-height: 1.5;
  text-shadow: 0 0 8px rgba(54,230,255,0.8), 2px 2px 0 #000;
}
.g2-speed-banner.lv2 .g2-speed-main { text-shadow: 0 0 6px var(--pink), 0 0 22px var(--pink), 4px 4px 0 #2a0020; }
.g2-speed-banner.lv2 .g2-speed-sub { color: var(--pink); }
.g2-speed-banner.down .g2-speed-main { color: #b8c0e0; text-shadow: 0 0 10px #4a5a90, 4px 4px 0 #000; }
.g2-speed-banner.down .g2-speed-sub { color: #9aa6d0; }
.g2-speed-banner.banzai.anim { animation: g2-banzai 2.6s cubic-bezier(.2,1.6,.3,1) forwards; }
.g2-speed-banner.banzai .g2-speed-main {
  font-size: calc(38px * var(--ui-scale));
  background: linear-gradient(180deg, #fff6b0, var(--gold) 40%, var(--red) 75%, #7a0018);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(0 0 14px rgba(255,42,74,0.9)) drop-shadow(4px 4px 0 #1a0008);
}
.g2-speed-banner.banzai .g2-speed-sub { color: var(--gold); }
@keyframes g2-banner {
  0% { transform: scale(2.4); opacity: 0; filter: blur(6px); }
  18% { transform: scale(1); opacity: 1; filter: none; }
  80% { transform: scale(1); opacity: 1; }
  100% { transform: scale(.9) translateY(-30px); opacity: 0; }
}
@keyframes g2-banzai {
  0% { transform: scale(4) rotate(-8deg); opacity: 0; }
  14% { transform: scale(1) rotate(0); opacity: 1; }
  20% { transform: scale(1.15); } 26% { transform: scale(1); }
  32% { transform: scale(1.1); } 38% { transform: scale(1); }
  85% { opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; filter: blur(4px); }
}

.g2-center-msg {
  position: absolute; left: 0; right: 0; top: 42%; text-align: center; z-index: 4;
  pointer-events: none; opacity: 0; transition: opacity .3s;
}
.g2-center-msg.show { opacity: 1; }
.g2-center-msg .t { font-family: 'Press Start 2P', monospace; font-size: calc(24px * var(--ui-scale)); color: #fff; text-shadow: 0 0 14px var(--violet), 3px 3px 0 #000; }
.g2-center-msg .s { margin-top: .9em; font-size: calc(14px * var(--ui-scale)); color: var(--gold); letter-spacing: .12em; text-shadow: 2px 2px 0 #000; }
.g2-center-msg.warn .t { color: var(--red); text-shadow: 0 0 14px var(--red), 3px 3px 0 #000; animation: g2-blink .35s steps(2) infinite; }
.g2-center-msg.warn.big .t { font-size: calc(32px * var(--ui-scale)); }
.g2-center-msg.warn::before, .g2-center-msg.warn::after {
  content: ''; display: block; height: 10px; margin: 14px 0;
  background: repeating-linear-gradient(45deg, var(--red) 0 12px, transparent 12px 24px);
  animation: g2-stripes .6s linear infinite; opacity: .8;
}
@keyframes g2-blink { 50% { opacity: .25; } }
@keyframes g2-stripes { to { background-position: 34px 0; } }

/* ------------------------------------------------------------------ overlays et menus */
.g2-overlay {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px; text-align: center;
  background: rgba(5,1,13,0.55);
  font-size: calc(15px * var(--ui-scale));
}
.g2-title { background: radial-gradient(ellipse at 50% 40%, rgba(40,10,80,0.35), rgba(5,1,13,0.7)); }
.g2-game-title { margin: 0 0 .2em; line-height: 1; font-weight: normal; }
.g2-game-title span {
  display: block; font-family: 'Press Start 2P', monospace; font-size: calc(48px * var(--ui-scale));
  background: linear-gradient(180deg, #fff6b0, var(--gold) 35%, var(--orange) 60%, var(--red));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 16px rgba(255,90,40,0.7)) drop-shadow(5px 5px 0 #200010);
  animation: g2-title-in 1s cubic-bezier(.2,1.4,.4,1) both;
}
.g2-game-title span + span {
  margin-top: .25em; font-size: calc(54px * var(--ui-scale));
  background: linear-gradient(180deg, #e9fdff, var(--cyan) 45%, var(--violet));
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 16px rgba(54,230,255,0.7)) drop-shadow(5px 5px 0 #000830);
  animation-delay: .15s;
}
@keyframes g2-title-in { from { transform: translateY(-40px) scale(1.4); opacity: 0; } }
.g2-title-sub { color: var(--muted); letter-spacing: .3em; text-transform: uppercase; font-size: .75em; margin: 1em 0 2.2em; }
.g2-start {
  font-family: 'Press Start 2P', monospace; font-size: 1.15em; text-transform: uppercase;
  background: none; border: 0; padding: .7em 1.2em; cursor: pointer; color: #fff;
  text-shadow: 0 0 10px var(--pink), 3px 3px 0 #000;
  animation: g2-pulse 1.1s ease-in-out infinite;
}
@keyframes g2-pulse { 50% { opacity: .45; transform: scale(.96); } }
.g2-title-diff { margin: .5em 0 1.6em; font-size: .75em; letter-spacing: .15em; text-transform: uppercase; }
.g2-title-diff.easy { color: #6dff9e; } .g2-title-diff.normal { color: var(--gold); } .g2-title-diff.difficult { color: var(--red); }
.g2-menu { display: flex; flex-direction: column; gap: .6em; align-items: center; }
.g2-btn {
  display: inline-block; min-width: 15em; padding: .65em 1.2em; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.3); border-radius: 999px;
  background: rgba(20,8,45,0.65); color: #fff; text-decoration: none;
  font-size: .82em; letter-spacing: .1em; text-transform: uppercase;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.g2-btn i { margin-right: .5em; }
.g2-btn:hover, .g2-btn.g2-focus {
  background: rgba(255,42,109,0.25); border-color: var(--pink); color: #fff;
  box-shadow: 0 0 16px rgba(255,90,209,0.5);
}
.g2-start.g2-focus { color: var(--gold); }
.g2-credit { margin-top: 2em; font-size: .7em; color: var(--cyan); opacity: .8; }
.g2-alert { font-size: .75em; padding: .5em 1em; border-radius: 8px; background: rgba(54,230,255,0.15); border: 1px solid rgba(54,230,255,0.5); margin-bottom: 1em; }
.g2-alert-error { background: rgba(255,42,74,0.15); border-color: rgba(255,42,74,0.6); }

.g2-dialog {
  width: min(94%, 430px); max-height: 94%; overflow: auto;
  background: rgba(12,4,30,0.94); border: 1px solid rgba(139,92,255,0.5); border-radius: 14px;
  padding: 1.2em 1.1em; box-shadow: 0 0 40px rgba(139,92,255,0.35);
  display: flex; flex-direction: column; align-items: center; gap: .6em;
  touch-action: pan-y;
}
.g2-dialog-wide { width: min(96%, 470px); text-align: left; align-items: stretch; }
.g2-dialog h2 { font-family: 'Press Start 2P', monospace; font-size: 1.05em; margin: 0 0 .6em; color: var(--gold); text-align: center; }
.g2-set-row { width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4em; padding: .45em .6em; border-radius: 8px; border: 1px solid transparent; }
.g2-set-row.focused { border-color: var(--pink); background: rgba(255,90,209,0.08); }
.g2-set-label { font-size: .8em; text-transform: uppercase; letter-spacing: .08em; }
.g2-set-values { display: flex; gap: .3em; }
.g2-set-values button {
  border: 1px solid rgba(255,255,255,0.25); background: transparent; border-radius: 6px;
  padding: .35em .6em; font-size: .72em; cursor: pointer; color: var(--muted);
}
.g2-set-values button.active { color: #fff; border-color: var(--cyan); background: rgba(54,230,255,0.18); box-shadow: 0 0 10px rgba(54,230,255,0.35); }
.g2-set-hint { font-size: .65em; color: var(--muted); }
.g2-help { font-size: .62em; color: var(--muted); }
.g2-close { font-size: .9em; margin-top: .4em; animation: none; }
.g2-touch-only { display: none !important; }
html.is-touch .g2-touch-only { display: flex !important; }
html.is-touch .g2-no-touch { display: none; }

.g2-controls { font-size: calc(14px * var(--ui-scale)); }
.g2-ctrl-grid { display: grid; gap: .6em; }
.g2-ctrl-grid section, .g2-rules { background: rgba(255,255,255,0.04); border-radius: 10px; padding: .6em .8em; }
.g2-ctrl-grid h3, .g2-rules h3 { font-size: .8em; margin: 0 0 .4em; color: var(--cyan); text-transform: uppercase; letter-spacing: .1em; }
.g2-ctrl-grid ul, .g2-rules ol { margin: 0; padding-left: 1.1em; font-family: system-ui, sans-serif; font-size: .8em; line-height: 1.6; }
.g2-rules p { margin: .3em 0; font-family: system-ui, sans-serif; font-size: .8em; line-height: 1.45; }
kbd { display: inline-block; min-width: 1.6em; padding: 0 .3em; border-radius: 4px; border: 1px solid rgba(255,255,255,0.4); background: rgba(255,255,255,0.1); font-size: .85em; text-align: center; margin-right: .15em; }
.pad-a, .pad-b { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 50%; font-size: .85em; color: #fff; }
.pad-a { background: #1f9d4a; } .pad-b { background: #c8283c; }
.g2-banzai-word { color: var(--red); font-weight: bold; }
.g2-items span { display: inline-block; padding: 0 .4em; border-radius: 4px; font-family: 'Press Start 2P', monospace; font-size: .8em; }
.g2-item-p { background: #ff3b6b; } .g2-item-b { background: #ffb321; color: #000; } .g2-item-1 { background: #36ff8a; color: #000; }

.g2-clear { background: rgba(5,1,13,0.45); }
.g2-clear-title { font-family: 'Press Start 2P', monospace; font-size: calc(26px * var(--ui-scale)); color: var(--gold); text-shadow: 0 0 16px var(--orange), 3px 3px 0 #000; margin-bottom: 1.2em; animation: g2-title-in .8s cubic-bezier(.2,1.4,.4,1) both; }
.g2-tally { width: min(92%, 400px); }
.g2-tally .row { display: grid; grid-template-columns: 1fr auto auto; gap: .8em; padding: .45em 0; border-bottom: 1px dashed rgba(255,255,255,0.15); font-size: .78em; text-align: left; opacity: 0; animation: g2-row .4s ease-out forwards; }
.g2-tally .row span:nth-child(2) { color: var(--muted); }
.g2-tally .row b { font-family: 'Press Start 2P', monospace; font-weight: normal; color: var(--cyan); min-width: 6em; text-align: right; }
.g2-tally .row.total { border: 0; font-size: .95em; } .g2-tally .row.total b { color: var(--gold); }
@keyframes g2-row { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: none; } }
.g2-continue { margin-top: 1.6em; font-size: .8em; opacity: 0; transition: opacity .3s; }
.g2-continue.show { opacity: 1; animation: g2-pulse 1.1s ease-in-out infinite; }

.g2-over { background: rgba(5,1,13,0.72); gap: .7em; }
.g2-over-title { font-family: 'Press Start 2P', monospace; font-size: calc(30px * var(--ui-scale)); color: var(--red); text-shadow: 0 0 18px var(--red), 4px 4px 0 #000; margin-bottom: .4em; }
.g2-over-title.win { color: var(--gold); text-shadow: 0 0 18px var(--orange), 4px 4px 0 #000; }
.g2-over-score { font-size: .95em; }
.g2-over-score b { display: block; font-family: 'Press Start 2P', monospace; font-size: 1.5em; color: var(--gold); margin: .4em 0; }
.g2-over-score small { display: block; color: var(--muted); font-size: .7em; letter-spacing: .1em; }
.g2-over-msg { font-size: .72em; color: var(--cyan); min-height: 1.2em; margin-bottom: .6em; }
.g2-over-msg a { color: var(--gold); }
.g2-reward { max-width: 92%; margin: .6em auto 0; padding: .7em .9em; border: 1px solid var(--gold); border-radius: 8px; background: rgba(20,6,30,0.85); box-shadow: 0 0 16px rgba(255,190,40,0.25); }
.g2-reward[hidden], .g2-reward [hidden] { display: none !important; }
.g2-reward-title { font-family: 'Press Start 2P', monospace; font-size: .7em; color: var(--gold); margin-bottom: .6em; }
.g2-reward p { font-size: .7em; line-height: 1.45; margin: 0 0 .6em; }
.g2-reward p b { color: var(--gold); }
.g2-reward-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .4em; }
.g2-reward-row .g2-btn { min-width: 0; font-size: .68em; padding: .5em .8em; margin: 0; }
.g2-reward .g2-reward-done { color: var(--cyan); margin: .2em 0 0; }

/* ------------------------------------------------------------------ manette virtuelle */
.g2-vpad { display: none; }
#g2.touch-pad .g2-vpad {
  display: flex; position: absolute; z-index: 7; left: 0; right: 0; bottom: 0;
  justify-content: space-between; align-items: center;
  padding: 0 max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  pointer-events: none;
}
#g2.touch-pad.portrait .g2-vpad { top: var(--play-bottom); padding-top: 6px; }
#g2.touch-pad:not(.portrait) .g2-vpad { top: auto; height: 50%; align-items: flex-end; }
.g2-dpad, .g2-vbtn { pointer-events: auto; touch-action: none; }
.g2-dpad {
  position: relative; width: 132px; height: 132px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.08), rgba(255,255,255,0.03) 60%, rgba(139,92,255,0.15));
  border: 2px solid rgba(255,255,255,0.22);
}
.g2-stick {
  position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.55), rgba(139,92,255,0.45));
  border: 1px solid rgba(255,255,255,0.5);
}
.g2-vbtns { display: flex; gap: 14px; align-items: flex-end; }
.g2-vbtn {
  width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; align-content: center;
  font-family: 'Press Start 2P', monospace; font-size: 18px; color: #fff;
  border: 2px solid rgba(255,255,255,0.35);
}
.g2-vbtn small { font-family: system-ui, sans-serif; font-size: 9px; text-transform: uppercase; opacity: .75; margin-top: 4px; }
.g2-va { background: rgba(31,157,74,0.55); width: 82px; height: 82px; margin-bottom: 18px; }
.g2-vb { background: rgba(200,40,60,0.55); }
.g2-vbtn.pressed { transform: scale(.92); filter: brightness(1.5); }

@media (max-height: 420px) {
  .g2-dpad { width: 112px; height: 112px; }
  .g2-va { width: 70px; height: 70px; margin-bottom: 10px; }
  .g2-vb { width: 58px; height: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  .g2-psy span { animation: none !important; }
}
