/* =========================================================
   Character popups (9 "You've discovered ..." popups)
   Keeps frame + character + text locked together at any
   screen size. Only applies inside .character-popup.
   Reference look: 400 x 767 screen.
   ========================================================= */

.character-popup {
  /* Size of the popup "stage" (same ratio as the frame image 1179 x 2556) */
  --cp-w: min(100vw, 60vh);
}

/* The stage: one box, fixed ratio, centered on screen */
.character-popup .character-blue-container,
.character-popup .character-red-container,
.character-popup .character-orange-container {
  position: absolute;
  left: calc(50% - var(--cp-w) / 2);
  top: calc(50% - var(--cp-w) * 1.16875);
  width: var(--cp-w);
  height: calc(var(--cp-w) * 2556 / 1179);
  margin: 0;
}

/* Frame image fills the stage */
.character-popup .badge-full.character-top {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Text strip: fixed position inside the frame */
.character-popup .character-top .window-bottom {
  top: calc(var(--cp-w) * 1.285) !important;
  bottom: auto !important;
  left: 0;
  width: 100%;
}

/* Character layer = the stage */
.character-popup .badge-overlay {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin-top: 0 !important;
}

/* Character: fixed position inside the frame */
.character-popup .badge-overlay .badge-flip-container {
  top: calc(var(--cp-w) * 1.12);
}
