/* ==========================================================
   Ya Rayah, le jeu — Stylesheet
   4:3 stage · cinematic freeze overlays · JOUER button
   ========================================================== */

/* ================================
   Écran de chargement
   ================================ */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0a0a0a;            /* letterbox autour du 4:3 */
  overflow: hidden;
  display: block;
}
/* Scène 4:3 centrée (comme le reste du jeu) */
.loading-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(100vw, calc(100vh * 4 / 3));
  height: min(100vh, calc(100vw * 3 / 4));
  overflow: hidden;
  background: #7bc043;           /* vert du logo dès le 1er paint */
}
.loading-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 108%;
  height: 108%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  transition: transform .16s ease-out;   /* suit la souris en douceur */
  will-change: transform;
  user-select: none;
  pointer-events: none;
}
/* Grain animé "qui bout" par-dessus l'image */
.loading-grain {
  position: absolute;
  inset: -25%;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 130px 130px;
  opacity: .17;
  mix-blend-mode: overlay;
  animation: loadingGrain .55s steps(5) infinite;
  image-rendering: pixelated;
}
@keyframes loadingGrain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-5%, 4%); }
  40%  { transform: translate(4%, -5%); }
  60%  { transform: translate(-4%, 3%); }
  80%  { transform: translate(3%, 5%); }
  100% { transform: translate(0, 0); }
}
/* Petite barre façon pixel/grain */
.loading-bar-wrap {
  position: absolute;
  left: 50%;
  bottom: 7%;
  transform: translateX(-50%);
  width: clamp(90px, 15vw, 170px);
  height: 7px;
  padding: 1px;
  background: rgba(0, 0, 0, .38);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .28);
  overflow: hidden;
  image-rendering: pixelated;
}
.loading-bar {
  height: 100%;
  width: 0%;
  /* segments pixel */
  background:
    repeating-linear-gradient(90deg,
      #ffffff 0 3px,
      rgba(255, 255, 255, .5) 3px 5px);
  image-rendering: pixelated;
  transition: width .2s linear;
}
.loading-screen.is-done {
  opacity: 0;
  transition: opacity .55s ease;
  pointer-events: none;
}

@font-face {
  font-family: 'Oceanside Typewriter';
  src: url('../assets/fonts/oceanside-typewriter/OceansideTypewriter.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../assets/fonts/satoshi/Satoshi-Variable.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('../assets/fonts/satoshi/Satoshi-VariableItalic.woff2') format('woff2');
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Array';
  src: url('../assets/fonts/array/Array-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Array';
  src: url('../assets/fonts/array/Array-Bold.woff2') format('woff2');
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Impact Quiz';
  src: url('../assets/fonts/impact/impact.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Almarena Mono';
  src: url('../assets/fonts/almarena/almarena-mono-display-light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Lower Resolution';
  src: url('../assets/fonts/lower-resolution/LowerResolution.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Lyrics Stencil';
  src: url('../assets/fonts/lyrics-stencil/lomidrevostencilmessy.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Avenir Next LT Pro';
  src: url('../assets/fonts/avenir-next/AvenirNextLTPro.otf') format('opentype');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Array Wide';
  src: url('../assets/fonts/array/Array-BoldWide.woff2') format('woff2');
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aesthet Nova';
  src: url('../assets/fonts/aesthet-nova/AesthetNova-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aesthet Nova';
  src: url('../assets/fonts/aesthet-nova/AesthetNova-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aesthet Nova';
  src: url('../assets/fonts/aesthet-nova/AesthetNova-Medium.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aesthet Nova';
  src: url('../assets/fonts/aesthet-nova/AesthetNova-Black.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --black:       #000000;
  --black-rich:  #060608;
  --gold:        #d4a24e;
  --gold-bright: #eabb5e;
  --gold-dim:    rgba(212,162,78,.25);
  --bet-blue:    #8bdfff;
  --white:       #f2efea;
  --white-dim:   #8a8680;
  --white-muted: #4a4744;
  --font-display: 'Satoshi', system-ui, sans-serif;
  --font-body:    'Satoshi', system-ui, sans-serif;
  --font-array:   'Array', 'Satoshi', system-ui, sans-serif;
  --font-array-wide: 'Array Wide', 'Array', 'Satoshi', system-ui, sans-serif;
  --font-lyrics: 'Lyrics Stencil', 'Array Wide', 'Array', sans-serif;
  --font-quiz: 'Avenir Next LT Pro', 'Satoshi', system-ui, sans-serif;
  --font-bet: 'Array', 'Satoshi', system-ui, sans-serif;
  --ease-out:    cubic-bezier(.22,1,.36,1);
  --ease-smooth: cubic-bezier(.4,0,.2,1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ================================
   4:3 Stage
   ================================ */
#app {
  position: relative;
  width: 100%;
  max-width: calc(100vh * 4 / 3);
  aspect-ratio: 4 / 3;
  max-height: 100vh;
  overflow: hidden;
  background: var(--black);
}

/* ================================
   Shared: Image button (no chrome)
   Used for both JOUER (intro) and ÉCOUTER (freeze)
   ================================ */
.jouer-btn,
.ecouter-btn {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 0;
  transition: transform .25s var(--ease-smooth), filter .25s;
}
.jouer-btn:hover,
.ecouter-btn:hover {
  filter: brightness(1.12);
}
.jouer-btn:active,
.ecouter-btn:active {
  transform: scale(.94);
}
.jouer-btn img,
.ecouter-btn img {
  height: auto;
  display: block;
}

/* ================================
   Shared: Next arrow (minimal)
   ================================ */
.next-arrow-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .2s, transform .2s;
  opacity: .45;
}
.next-arrow-btn:hover {
  opacity: 1;
}
.next-arrow-btn:active {
  opacity: .6;
}
.next-arrow-btn svg {
  width: 40px; height: 40px;
  fill: none;
  stroke: var(--white);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ================================
   Shared: Freeze overlay
   Full-screen container shown after video ends.
   Contains: title image + JOUER + arrow
   ================================ */
.freeze-overlay {
  position: absolute; inset: 0;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  /* No transition on hide — instant disappear prevents content flash */
}
.freeze-overlay.visible {
  opacity: 1;
  pointer-events: auto;
  transition: opacity .5s var(--ease-smooth);
}

/* Title image — covers the full 4:3 stage */
.title-image {
  position: absolute;
  right: clamp(3.5rem, 6vw, 4.5rem);
  bottom: clamp(.45rem, 1.6vh, .85rem);
  width: min(clamp(350px, 58vw, 600px), calc(100% - clamp(4.5rem, 8vw, 6rem)));
  height: auto;
  max-height: 84%;
  object-fit: contain;
  object-position: right bottom;
  display: block;
  z-index: 0;
}

/* Écouter inside freeze */
.freeze-ecouter {
  position: absolute;
  left: clamp(2rem, 4vw, 2.5rem);
  bottom: clamp(.35rem, 1.8vh, 1rem);
  transform: none;
  z-index: 2;
}
.freeze-ecouter:hover {
  filter: brightness(1.12);
}
.freeze-ecouter:active {
  transform: scale(.94);
}
.freeze-ecouter img {
  width: clamp(145px, 23vw, 230px);
}

/* Full-screen navigation artwork supplied with the arrow already positioned. */
.music-next-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  z-index: 6;
  pointer-events: none;
  user-select: none;
  transform: translateX(-1cm);
}

/* Transparent hit area over the arrow drawn into the full-screen artwork. */
.music-next-hotspot {
  position: absolute;
  right: 1cm;
  top: 42.45%;
  width: 11.25%;
  height: 15.2%;
  z-index: 7;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  appearance: none;
  cursor: pointer;
  transform: none;
  opacity: 1;
}
.music-next-hotspot:hover,
.music-next-hotspot:active {
  transform: none;
  opacity: 1;
}
.music-next-hotspot:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: -4px;
}
/* ================================
   SCREEN: Intro
   ================================ */
.intro-screen {
  position: absolute; inset: 0;
  background: var(--black);
  z-index: 10;
}

.intro-screen video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  background: var(--black);
}

/* Full-screen sticker sequence over Nayra's opening freeze frame. */
.intro-stickers {
  position: absolute;
  left: -4%;
  bottom: 0;
  width: 94%;
  height: 94%;
  transform: translateX(1.5cm);
  object-fit: fill;
  display: block;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}
.intro-stickers.hidden {
  display: none;
}

/* Intro first-freeze play — same position/size as écouter */
.intro-play-wrap {
  position: absolute;
  left: clamp(2rem, 4vw, 2.5rem);
  bottom: clamp(.35rem, 1.8vh, 1rem);
  z-index: 3;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}
.intro-play-wrap.ready {
  animation: fadeUp .7s var(--ease-out) .15s forwards;
  pointer-events: auto;
}
.intro-play-wrap.hidden {
  opacity: 0 !important;
  pointer-events: none;
  animation: none;
}
.intro-play-wrap .jouer-btn img {
  width: clamp(145px, 23vw, 230px);
}

/* ================================
   SCREEN: Video Selector
   ================================ */
.video-screen {
  position: absolute; inset: 0;
  background: var(--black);
}

.vs-layer {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  background: var(--black);
}


/* ================================
   SCREEN: Gameplay — V1
   ================================ */
.gameplay-screen {
  position: absolute; inset: 0;
  background: var(--black);
  display: flex;
  flex-direction: column;
}

.gp-stage {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.gp-stage.hidden { opacity: 0; pointer-events: none; }

/* --- Announcement overlay --- */
.gp-announce {
  position: absolute; inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.gp-announce.visible {
  opacity: 1;
  pointer-events: auto;
}
.announce-text {
  font-family: var(--font-body);
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: .12em;
  text-transform: uppercase;
  animation: fadeIn .3s ease-out;
}

/* --- Progress bar --- */
.gp-progress-wrap {
  /* Barre de temps par épreuve masquée à la demande. */
  display: none;
  height: 4px;
  background: rgba(255,255,255,.08);
  flex-shrink: 0;
}
.gp-progress-wrap.hidden { opacity: 0; }
.gp-progress-bar {
  height: 100%;
  background: var(--gold);
  width: 0%;
  transition: width .15s linear;
}

/* --- V1 shared elements --- */
.v1-header {
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--white-muted);
  text-align: center;
  padding: 1.2rem 0 .5rem;
  flex-shrink: 0;
}

.v1-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: 1rem;
}

.v1-placeholder-icon {
  font-size: clamp(2rem, 6vw, 3.5rem);
  opacity: .3;
}

/* --- Intro title image --- */
.v1-intro-title {
  position: absolute; inset: 0;
}
.v1-title-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Tap to play fallback --- */
.gp-tap-btn {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 500;
  padding: .8rem 2rem;
  border-radius: 10px;
  border: none;
  background: var(--gold);
  color: var(--black);
  cursor: pointer;
}
.gp-tap-btn:hover { background: var(--gold-bright); }

/* ================================
   V1: Quiz
   ================================ */
.quiz-container {
  flex: 1;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(.4rem, 1.5vw, 1rem);
}

.quiz-cassette-frame {
  position: relative;
  width: min(100%, calc((100vh - 56px) * 1.241486));
  max-width: 100%;
  aspect-ratio: 1604 / 1292;
  overflow: hidden;
  background: var(--black);
}

.quiz-cassette-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  pointer-events: none;
}

.quiz-transition-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0;
  pointer-events: none;
  z-index: 8;
  transition: opacity .2s ease;
}
.quiz-transition-video.is-active {
  opacity: 1;
}

.quiz-meta {
  position: absolute;
  right: 8.2%;
  top: 9.6%;
  display: flex;
  gap: .5rem;
  align-items: center;
  justify-content: flex-end;
  font-family: var(--font-quiz);
  font-size: clamp(.72rem, 1.7vw, 1.15rem);
  font-weight: 900;
  color: rgba(20, 18, 15, .9);
  z-index: 2;
  transition: none;
}

.quiz-question {
  font-family: var(--font-quiz);
  font-size: clamp(0.78rem, 2vw, 1.65rem);
  color: rgba(16, 14, 12, .95);
  text-align: center;
  line-height: 1.02;
  position: absolute;
  left: 8.5%;
  top: 16.4%;
  width: 83%;
  min-height: 15.5%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-wrap: balance;
  text-transform: uppercase;
  padding: 1.5% 2%;
  box-sizing: border-box;
  text-shadow: 1px 0 0 rgba(0, 0, 0, .32), 0 1px 0 rgba(0, 0, 0, .32);
  z-index: 2;
  transition: none;
}

.quiz-answers {
  position: absolute;
  inset: 0;
  z-index: 3;
  transition: none;
}

.quiz-question-finished {
  top: 36%;
  align-items: center;
  font-size: clamp(1.7rem, 4.4vw, 3.2rem);
}

.quiz-answer {
  position: absolute;
  font-family: var(--font-quiz);
  font-size: clamp(.8rem, 1.9vw, 1.55rem);
  font-weight: 900;
  color: rgba(20, 18, 15, .92);
  background: transparent;
  border: 0;
  border-radius: 4%;
  padding: 2% 3%;
  cursor: pointer;
  transition: none;
  text-align: center;
  line-height: 1.02;
  display: flex;
  align-items: center;
  justify-content: center;
  text-wrap: balance;
  overflow-wrap: anywhere;
  overflow: hidden;
  text-transform: lowercase;
  text-shadow: 1px 0 0 rgba(0, 0, 0, .32), 0 1px 0 rgba(0, 0, 0, .32);
  -webkit-tap-highlight-color: transparent;
}
.quiz-answer:hover:not(:disabled),
.quiz-answer:active:not(:disabled) { transform: none; }
.quiz-answer:disabled { cursor: default; }

.quiz-answer-text {
  position: relative;
  z-index: 2;
}

.quiz-answer-ripple {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16%;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.35);
  background: radial-gradient(circle,
    rgba(255,255,255,.9) 0%,
    rgba(255,255,255,.48) 28%,
    rgba(255,255,255,.16) 58%,
    transparent 74%);
  filter: blur(1px);
}

.quiz-answer-ripple.is-active {
  animation: none;
}

/* Boîtes alignées sur la dernière frame de la nouvelle transition du quiz. */
.quiz-answer-0 {
  left: 7.61%;
  top: 36.15%;
  width: 40.9%;
  height: 21.98%;
}
.quiz-answer-1 {
  left: 51.12%;
  top: 36.22%;
  width: 41.15%;
  height: 21.9%;
}
.quiz-answer-2 {
  left: 7.61%;
  top: 61.69%;
  width: 40.84%;
  height: 22.37%;
}
.quiz-answer-3 {
  left: 51.12%;
  top: 61.61%;
  width: 41.15%;
  height: 22.45%;
}

.quiz-answer.correct {
  background: transparent !important;
  opacity: 1 !important;
}

/* Calque vert détouré qui suit la forme dessinée de la bonne réponse. */
.quiz-correct-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

.quiz-correct-overlay.visible {
  animation: quizCorrectLight .55s ease-out both;
}

@keyframes quizCorrectLight {
  0% { opacity: 0; }
  35% { opacity: 1; }
  55% { opacity: .65; }
  100% { opacity: 1; }
}

/* L'explication remplace la question : texte vert + petit clignotement. */
.quiz-question.is-answer-reveal {
  color: #1d8a4a;
  text-shadow: 1px 0 0 rgba(10, 60, 30, .25), 0 1px 0 rgba(10, 60, 30, .25);
  animation: quizAnswerRevealBlink .6s steps(1, end) both;
}

@keyframes quizAnswerRevealBlink {
  0% { opacity: 0; }
  18% { opacity: 1; }
  36% { opacity: 0; }
  54% { opacity: 1; }
  72% { opacity: .35; }
  100% { opacity: 1; }
}
.quiz-answer.wrong {
  background: rgba(0,0,0,.05) !important;
  opacity: 1 !important;
}

.quiz-done {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--white);
}
.quiz-final-score {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--gold);
}

/* Quiz explanation — appears after answer */
.quiz-explanation {
  font-family: var(--font-quiz);
  font-size: clamp(.66rem, 1.25vw, .98rem);
  font-weight: 900;
  color: rgba(16, 14, 12, .9);
  text-align: center;
  position: absolute;
  left: 10%;
  top: 86%;
  width: 80%;
  min-height: 4%;
  opacity: 0;
  transition: none;
  line-height: 1.25;
  padding: 0 .5rem;
  z-index: 4;
}
.quiz-explanation.visible { opacity: 1; }
.quiz-explanation.is-correct { color: #3ec9a7; top: 87.2%; }
.quiz-explanation.is-wrong   { color: #e8a838; }
.quiz-cassette-frame.is-exiting .quiz-meta,
.quiz-cassette-frame.is-exiting .quiz-question,
.quiz-cassette-frame.is-exiting .quiz-answers,
.quiz-cassette-frame.is-exiting .quiz-explanation {
  opacity: 0 !important;
  transform: none;
  pointer-events: none;
}
.quiz-cassette-frame.is-entering .quiz-meta,
.quiz-cassette-frame.is-entering .quiz-question,
.quiz-cassette-frame.is-entering .quiz-answers {
  animation: none;
}

/* ================================
   V1: Geo map guesser
   ================================ */
.geo-game {
  position: absolute;
  inset: 0;
  background: #000;
  overflow: hidden;
  display: block;
}

.geo-map-frame {
  position: absolute;
  --geo-frame-gap: 0px;
  left: 50%;
  top: 50%;
  width: min(
    calc(100vw - (var(--geo-frame-gap) * 2)),
    calc((100vh - (var(--geo-frame-gap) * 2)) * 4 / 3)
  );
  height: auto;
  aspect-ratio: 4 / 3;
  transform: translate(-50%, -50%);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #000;
  overflow: hidden;
  cursor: none;
  display: block;
  box-shadow: none;
}

.geo-map-frame.is-locked {
  cursor: default;
}

.geo-game.is-cinematic .geo-map-frame,
.geo-game.is-cinematic .geo-country-panel,
.geo-game.is-cinematic .geo-cursor {
  pointer-events: none;
}

.geo-cinematic-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 60;
  background: #000;
}

.geo-map-layer {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  transition: transform .08s ease-out;
  will-change: transform;
}

.geo-map-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
}

.geo-click-reference {
  display: none;
}

.geo-flag {
  background: rgba(255, 247, 226, .96);
  border: 3px solid rgba(36, 30, 58, .88);
  color: #25213e;
  clip-path: polygon(0 0, 96% 0, 100% 50%, 96% 100%, 0 100%, 3% 50%);
  box-shadow: 0 7px 0 rgba(255,255,255,.56), 0 12px 26px rgba(29,21,44,.22);
}

.geo-title {
  position: absolute;
  left: 50%;
  top: clamp(.45rem, 1.9vh, 1.05rem);
  transform: translateX(-50%);
  width: min(86vw, 920px);
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .04em .36em;
  padding: clamp(.42rem, 1.05vw, .72rem) clamp(1rem, 2.6vw, 2rem);
  text-align: center;
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.85vw, 2.95rem);
  font-weight: 900;
  line-height: .96;
  text-transform: uppercase;
  filter: drop-shadow(0 4px 0 rgba(255,255,255,.75)) drop-shadow(0 7px 11px rgba(0,0,0,.22));
  pointer-events: none;
  animation: geoFlagFloat 3.4s ease-in-out infinite;
}

.geo-title-word {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.geo-title-letter {
  display: inline-block;
  color: var(--geo-letter-color);
  animation: geoLetterBounce 1.8s ease-in-out infinite;
  animation-delay: var(--geo-letter-delay);
  transform-origin: 50% 80%;
}

.geo-title-space {
  width: .42em;
}

.geo-rhythm-card {
  position: absolute;
  left: 50%;
  bottom: clamp(.6rem, 3vh, 1.5rem);
  transform: translateX(-50%) rotate(-1deg);
  z-index: 5;
  display: flex;
  align-items: baseline;
  gap: .45rem;
  padding: .45rem .8rem;
  border-radius: 8px;
  background: rgba(255, 244, 223, .88);
  color: #25213e;
  box-shadow: 0 5px 14px rgba(0,0,0,.18);
  font-family: var(--font-body);
}

.geo-rhythm-card span {
  font-size: clamp(.55rem, 1.4vw, .8rem);
  text-transform: uppercase;
  font-weight: 800;
  color: #d93472;
}

.geo-rhythm-card strong {
  font-size: clamp(.78rem, 2.1vw, 1.15rem);
}

.geo-cursor {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 220%;
  height: 220%;
  aspect-ratio: 4 / 3;
  z-index: 30;
  opacity: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(255,174,70,.5)) drop-shadow(0 0 18px rgba(255,255,255,.18));
  transition: opacity .12s ease;
}

.geo-cursor.visible {
  opacity: 1;
}

.geo-cursor-frame {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.geo-country-panel {
  position: absolute;
  right: clamp(-2.8rem, -3.5vw, -1.4rem);
  top: clamp(-0.9rem, -1.4vw, 0.3rem);
  width: clamp(210px, 25vw, 360px);
  aspect-ratio: 1604 / 1292;
  z-index: 31;
  pointer-events: none;
}

.geo-country-panel-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.geo-country-name {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48%;
  transform: translate(-50%, -50%);
  color: #fff1dc;
  font-family: 'Almarena Mono', monospace;
  font-size: clamp(.7rem, 1.28vw, 1.15rem);
  font-weight: 300;
  line-height: .94;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 0 rgba(44, 8, 2, .88), 0 0 13px rgba(255, 69, 22, .7);
}

.geo-country-panel.is-locked .geo-country-name {
  color: #fff8eb;
  text-shadow: 0 2px 0 rgba(44, 8, 2, .92), 0 0 18px rgba(255, 69, 22, .88);
}

.geo-panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  transform: none;
  z-index: 12;
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}

.geo-panel.visible {
  opacity: 1;
}

.geo-panel-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.geo-panel-content {
  position: absolute;
  left: 50%;
  top: 81.8%;
  z-index: 2;
  width: min(37vw, 535px);
  min-height: clamp(112px, 16vh, 170px);
  padding: 0 clamp(.45rem, 1.1vw, 1rem);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  justify-items: center;
  align-items: center;
  gap: .18rem;
  text-align: center;
  font-family: var(--font-array);
  font-weight: 900;
  color: #fff2d2;
  line-height: .92;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 0 rgba(65,24,0,.9), 0 0 16px rgba(255,146,39,.72);
  opacity: 0;
  transition: opacity .18s ease;
}

.geo-panel-content.visible {
  opacity: 1;
}

.geo-panel-content .geo-label-main {
  font-size: clamp(.76rem, 1.55vw, 1.55rem);
}

.geo-panel-content .geo-label-detail {
  font-family: var(--font-array);
  font-size: clamp(.48rem, .82vw, .7rem);
  color: #ffe3a3;
  text-shadow: 0 2px 0 rgba(65,24,0,.82), 0 0 10px rgba(255,146,39,.58);
}

.geo-click-marker,
.geo-target-marker {
  position: absolute;
  width: clamp(100px, 12vw, 190px);
  aspect-ratio: 1;
  border-radius: 0;
  z-index: 7;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.72);
  pointer-events: none;
}

.geo-click-marker {
  filter: brightness(1.08);
}

.geo-target-marker {
  filter: hue-rotate(8deg) saturate(1.08) brightness(1.12);
}

.geo-marker-frame {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 10px rgba(255,174,70,.72)) drop-shadow(0 0 20px rgba(255,255,255,.24));
}

.geo-click-marker.visible,
.geo-target-marker.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity .18s ease, transform .28s ease;
}

.geo-selection-label,
.geo-reveal-label {
  display: none;
}

.geo-selection-label,
.geo-reveal-label {
  position: absolute;
  left: 50%;
  top: auto;
  bottom: clamp(4.6rem, 10vh, 6.6rem);
  transform: translateX(-50%) translateY(-8px) rotate(.8deg);
  z-index: 8;
  display: grid;
  gap: .16rem;
  width: max-content;
  max-width: min(88vw, 980px);
  padding: .58rem 1.3rem .66rem;
  font-family: var(--font-body);
  font-size: clamp(.95rem, 2.55vw, 1.85rem);
  font-weight: 900;
  line-height: 1.02;
  text-align: center;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .28s ease;
}

.geo-reveal-label {
  background: rgba(255, 238, 171, .96);
  max-width: min(92vw, 1160px);
  padding: clamp(.72rem, 1.8vw, 1.2rem) clamp(1.4rem, 3.2vw, 2.6rem);
  font-size: clamp(1.22rem, 3.35vw, 3.05rem);
}

.geo-reveal-label.is-success {
  background: rgba(224, 255, 199, .96);
}

.geo-label-main,
.geo-label-detail {
  display: block;
}

.geo-label-detail {
  font-family: var(--font-body);
  font-size: clamp(.68rem, 1.55vw, 1rem);
  font-weight: 900;
  letter-spacing: 0;
  color: #d93472;
}

.geo-reveal-label .geo-label-detail {
  margin-top: .14rem;
  font-size: clamp(.78rem, 1.8vw, 1.24rem);
}

.geo-selection-label.visible,
.geo-reveal-label.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0) rotate(.8deg);
  animation: geoFeedbackPop .42s ease-out both;
}

.geo-map-frame.is-revealing .geo-target-marker {
  animation: geoTargetPulse .72s ease-out infinite alternate;
}

.geo-confetti {
  position: absolute;
  left: 50%;
  bottom: clamp(5.4rem, 12vh, 7.4rem);
  z-index: 9;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.geo-confetti.visible {
  opacity: 1;
}

.geo-confetti span {
  position: absolute;
  left: 0;
  top: 0;
  width: clamp(7px, 1vw, 12px);
  height: clamp(10px, 1.45vw, 18px);
  border-radius: 2px;
  background: var(--geo-confetti-color);
  opacity: 0;
  transform: translate(-50%, -50%) rotate(0deg) scale(.6);
}

.geo-confetti.visible span {
  animation: geoConfettiBurst .95s cubic-bezier(.12,.82,.18,1) forwards;
}

.geo-game.is-entering .geo-title,
.geo-game.is-entering .geo-rhythm-card {
  animation: quizTextIn .38s ease-out both, geoFlagFloat 3.4s ease-in-out .38s infinite;
}

.geo-game.is-entering .geo-rhythm-card {
  animation: quizTextIn .38s ease-out both;
}

/* ================================
   V1: Bet (slider)
   ================================ */
.bet-game {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
  color: var(--white);
  font-family: var(--font-bet);
}

.bet-score-video,
.bet-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
  pointer-events: none;
  user-select: none;
}

/* Question en machine à écrire + barre verticale, côté droit (à côté de l'homme) */
.bet-question {
  font-family: 'Oceanside Typewriter', var(--font-bet), monospace;
  font-size: clamp(1.05rem, 2.3vw, 1.7rem);
  color: #f4eee2;
  line-height: 1.25;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .85), 0 0 22px rgba(0, 0, 0, .6);
}

.bet-vertical-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  align-self: center;
}

.bet-scale {
  font-family: 'Oceanside Typewriter', var(--font-bet), monospace;
  font-size: clamp(.8rem, 1.4vw, 1.05rem);
  color: #f4eee2;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .85);
}

.bet-slider-wrap {
  height: clamp(240px, 46vh, 470px);
  width: clamp(3rem, 5vw, 4.2rem);
  position: relative;
  display: grid;
  place-items: center;
}

.bet-slider-vertical {
  width: clamp(240px, 46vh, 470px);
  max-width: none;
  transform: rotate(-90deg);
  transform-origin: center;
}

.bet-select-zone {
  position: absolute;
  z-index: 3;
  cursor: pointer;
  touch-action: none;
}

/* Cadre lumineux autour des cases de pourcentage (cf. maquette) :
   bande claire qui couvre la case avec un liseré lumineux. */
.bet-row-highlight {
  position: absolute;
  z-index: 2;
  display: none;
  pointer-events: none;
  border-radius: 3px;
  mix-blend-mode: screen;
  box-sizing: border-box;
}

.bet-row-hover,
.bet-validate-zone:hover:not(:disabled) {
  background: rgba(255, 246, 214, .38);
  border: 2px solid rgba(255, 255, 255, .55);
}

.bet-row-selected,
.bet-validate-zone.validated {
  background: rgba(255, 244, 196, .55);
  border: 2px solid rgba(255, 255, 255, .8);
  box-shadow: 0 0 10px rgba(255, 228, 140, .6);
}

/* Pourcentage en temps réel dans l'encadré vide de la machine */
.bet-pct-display {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Lower Resolution', monospace;
  font-weight: 400;
  color: #ffcf7a;
  text-shadow: 0 0 10px rgba(255, 170, 60, .75), 0 0 22px rgba(255, 130, 30, .4);
  pointer-events: none;
  user-select: none;
  line-height: 1;
  /* la police pixel a des métriques hautes : on redescend le chiffre au centre du cadre */
  padding-top: .08em;
}

.bet-pct-display.is-validated {
  color: #ffe6b0;
}

/* L'encadré VALIDER de la vidéo sert de bouton : même cadre lumineux
   que les cases de pourcentage au survol / à la validation. */
.bet-validate-zone {
  position: absolute;
  z-index: 3;
  appearance: none;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  padding: 0;
  box-sizing: border-box;
  mix-blend-mode: screen;
}

.bet-validate-zone:disabled {
  cursor: default;
}

/* Style "Oceanside" : blanc, élégant, épuré */
.bet-game .bet-value {
  font-family: 'Oceanside Typewriter', var(--font-bet), monospace;
  font-weight: 400;
  font-size: clamp(2.9rem, 7.5vw, 5rem);
  color: #ffffff;
  text-shadow: 0 3px 14px rgba(0, 0, 0, .85);
}

.bet-game .bet-value.validated {
  color: #ffffff;
  opacity: .85;
}

.bet-game .v1-slider {
  height: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .5);
}

.bet-game .v1-slider::-webkit-slider-thumb {
  width: 42px;
  height: 42px;
  background: #ffffff;
  border: none;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .6);
}

.bet-game .v1-slider::-moz-range-thumb {
  width: 42px;
  height: 42px;
  background: #ffffff;
  border: none;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .6);
}

.bet-game .v1-validate-btn {
  font-family: 'Oceanside Typewriter', var(--font-bet), monospace;
  font-weight: 400;
  font-size: clamp(.95rem, 1.9vw, 1.3rem);
  letter-spacing: .05em;
  background: transparent;
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, .85);
  border-radius: 4px;
  padding: .55rem 1.4rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .7);
}

.bet-game .v1-validate-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, .16);
  color: #ffffff;
}

.bet-game .v1-validate-btn.validated {
  background: transparent;
  border-color: rgba(255, 255, 255, .45);
  color: rgba(255, 255, 255, .75);
}

.bet-panel {
  position: absolute;
  right: clamp(.6rem, 2.5vw, 2.2rem);
  top: 50%;
  width: min(34vw, 430px);
  transform: translateY(-50%) translateX(1rem);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  padding: clamp(1rem, 3vw, 2rem);
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}

.bet-panel.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

.bet-panel .v1-slider,
.bet-panel .v1-slider-range {
  width: 100%;
}

.bet-label {
  font-family: var(--font-bet);
  font-size: clamp(1.55rem, 4.55vw, 2.65rem);
  font-weight: 900;
  color: var(--bet-blue);
  line-height: .95;
  text-shadow: 0 0 12px rgba(139,223,255,.68), 0 2px 0 rgba(0,0,0,.85);
}
.bet-value {
  font-family: var(--font-bet);
  font-size: clamp(3.3rem, 9.6vw, 5.85rem);
  font-weight: 900;
  color: var(--bet-blue);
  line-height: .9;
  text-shadow: 0 0 16px rgba(139,223,255,.76), 0 3px 0 rgba(0,0,0,.9);
}
.v1-slider {
  -webkit-appearance: none;
  width: 80%;
  max-width: 350px;
  height: 6px;
  background: rgba(255,255,255,.1);
  border-radius: 3px;
  outline: none;
}
.v1-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px; height: 26px;
  background: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.v1-slider::-moz-range-thumb {
  width: 26px; height: 26px;
  background: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}
.v1-slider-range {
  display: flex;
  justify-content: space-between;
  width: 80%;
  max-width: 350px;
  font-size: .6rem;
  color: rgba(139,223,255,.86);
}
.v1-validate-btn {
  margin-top: .6rem;
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.15vw, 1.35rem);
  font-weight: 900;
  padding: .62rem 1.5rem;
  border-radius: 8px;
  border: none;
  background: var(--bet-blue);
  color: var(--black);
  cursor: pointer;
  transition: transform .15s, background .15s, color .15s, border-color .15s;
}
.bet-game .v1-slider-range,
.bet-game .v1-validate-btn {
  font-family: var(--font-bet);
  font-weight: 900;
}

.v1-validate-btn:hover { background: #b8edff; }
.v1-validate-btn:active { transform: scale(.95); }
.v1-validate-btn.validated {
  background: rgba(139,223,255,.08);
  border: 1px solid rgba(139,223,255,.72);
  color: var(--bet-blue);
  cursor: default;
  text-shadow: 0 0 12px rgba(139,223,255,.68);
}
.v1-validate-btn:disabled { opacity: 1; }

.bet-panel.answered .bet-label,
.bet-value.validated {
  color: var(--bet-blue);
}

.bet-panel.answered .v1-slider,
.bet-panel.answered .v1-slider-range {
  opacity: .72;
}


/* ================================
   V1: Reveal image
   ================================ */
.v1-reveal-image-only {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #fff;
  overflow: hidden;
}

.score-reveal-image {
  width: min(82%, 820px);
  max-height: 86%;
  object-fit: contain;
  display: block;
  animation: scoreRevealDrop .82s cubic-bezier(.18,.88,.2,1.04) both;
}

.score-reveal-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}
.score-reveal-menu,
.score-reveal-player-score {
  position: absolute;
  bottom: clamp(.65rem, 1.6vw, 1.05rem);
  z-index: 2;
  background: transparent;
  color: #fff;
  font-family: var(--font-array);
  font-size: clamp(.78rem, 1.45vw, 1.05rem);
  font-weight: 400;
  line-height: 1;
  padding: .25rem;
  text-transform: lowercase;
}

.score-reveal-player-score {
  left: clamp(.85rem, 2vw, 1.35rem);
  transform: translateX(1.5cm);
  pointer-events: none;
}

.score-reveal-menu {
  right: clamp(.85rem, 2vw, 1.35rem);
  appearance: none;
  border: 0;
  cursor: pointer;
  transform: translateX(-1cm);
}

.score-reveal-menu:hover,
.score-reveal-menu:focus-visible {
  text-decoration: underline;
  outline: none;
}

@keyframes scoreRevealDrop {
  0% {
    transform: translateY(-118vh);
  }
  72% {
    transform: translateY(2.4vh);
  }
  100% {
    transform: translateY(0);
  }
}


/* ================================
   V1: Lyrics timing
   ================================ */
.lyrics-game {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #030303;
  color: var(--white);
  isolation: isolate;
}

.lyrics-game::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 8;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.lyrics-game.is-strobing::after {
  animation: lyricsStrobe .52s steps(1, end) both;
}

.lyrics-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.lyrics-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
  opacity: 0;
  pointer-events: none;
}

.lyrics-stop-motion-frame {
  position: absolute;
  inset: 0;
  z-index: 7;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

.lyrics-stop-motion-frame.is-active {
  opacity: 1;
}

.lyrics-instruction {
  position: absolute;
  z-index: 2;
  top: clamp(2.1rem, 8vh, 4.2rem);
  left: 50%;
  width: min(92%, 980px);
  transform: translateX(-50%);
  font-family: var(--font-lyrics);
  font-size: clamp(.72rem, 1.65vw, 1.05rem);
  font-weight: 700;
  line-height: 1.18;
  text-align: center;
  color: rgba(242,239,234,.88);
  text-transform: none;
  text-wrap: balance;
}

@keyframes lyricsStrobe {
  0% { opacity: 0; }
  8% { opacity: .92; }
  16% { opacity: 0; }
  26% { opacity: .76; }
  34% { opacity: 0; }
  48% { opacity: .64; }
  56% { opacity: 0; }
  72% { opacity: .5; }
  100% { opacity: 0; }
}

/* ================================
   V1: Drum kit
   ================================ */
.rt-container {
  position: absolute;
  inset: 0;
  font-family: var(--font-array);
  background: #000;
  overflow: hidden;
  isolation: isolate;
}

.rt-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* Consigne affichée au-dessus des 2,5 premières secondes de l'intro. */
.rt-intro-rules {
  position: absolute;
  inset: 5%;
  z-index: 3;
  width: 90%;
  height: 90%;
  object-fit: contain;
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

.rt-intro-rules.is-visible {
  opacity: 1;
  visibility: visible;
}

/* Calque des touches : au-dessus de la vidéo de fond (z0),
   en dessous des animations de frappe (z2). */
.rt-key-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

.rt-key-overlay.is-blinking {
  animation: rtKeyBlink .6s steps(1, end) infinite;
}

@keyframes rtKeyBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.rt-animation-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: transparent;
  z-index: 2;
}

.rt-hit-animation {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--rt-object-x, 50%) var(--rt-object-y, 50%);
  transform: translate(var(--rt-shift-x, 0), var(--rt-shift-y, 0)) scale(var(--rt-scale, 1));
  transform-origin: center;
  display: block;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

.rt-hit-animation-temb,
.rt-hit-animation-derbouka,
.rt-hit-animation-taarija,
.rt-hit-animation-clap,
.rt-hit-animation-cri,
.rt-hit-animation-qraqeb {
  --rt-object-x: 50%;
  --rt-object-y: 50%;
  --rt-shift-x: 0;
  --rt-shift-y: 0;
  --rt-scale: 1;
}

.rt-hit-count {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ================================
   Cinematic Intro (loop → transition → PNG)
   ================================ */
.cinematic-layer {
  position: absolute; inset: 0;
  background: var(--black);
}
.cinematic-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  background: var(--black);
  transition: opacity .3s;
}
.cinematic-intro-frame {
  position: absolute; inset: 0;
  z-index: 2;
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  transition: opacity .12s;
}

/* PNG animation overlay — transparent, above everything */
#overlay-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  pointer-events: none;
  background: transparent;
}
#overlay-container.is-active {
  display: block;
}
.overlay-frame {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}

/* ================================
   Animations
   ================================ */
@keyframes rtLayerPop {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes quizClickLight {
  0%   { opacity: .95; transform: translate(-50%, -50%) scale(.25); }
  55%  { opacity: .42; transform: translate(-50%, -50%) scale(5.2); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(8); }
}
@keyframes quizTextIn {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes geoLetterBounce {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  35%      { transform: translateY(-7px) rotate(2deg); }
  65%      { transform: translateY(2px) rotate(-2deg); }
}
@keyframes geoFlagFloat {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-.45deg); }
  50%      { transform: translateX(-50%) translateY(7px) rotate(.45deg); }
}
@keyframes geoFeedbackPop {
  from { opacity: 0; transform: translateX(-50%) scale(.82) rotate(-2deg); }
  to   { opacity: 1; transform: translateX(-50%) scale(1) rotate(.8deg); }
}
@keyframes geoTargetPulse {
  from { box-shadow: 0 0 0 2px rgba(255,255,255,.8), 0 0 16px rgba(217,52,114,.55); }
  to   { box-shadow: 0 0 0 5px rgba(255,255,255,.92), 0 0 28px rgba(217,52,114,.78); }
}
@keyframes geoConfettiBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(0deg) scale(.55);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--geo-confetti-x)), calc(-50% + var(--geo-confetti-y))) rotate(var(--geo-confetti-rot)) scale(1);
  }
}
