/* ============================================================
   CHRISTIAN 30: FULLSCREEN ZERO-SCROLL RETRO LANDING
   Inspired by "KARATE" minimal pixel game landing screen
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  /* Sky Palette (Sunset / Teal Twilight) */
  --sky-top: #250f4c;
  --sky-mid: #7b297d;
  --sky-sunset: #e65c53;
  --sky-horizon: #f8af62;
  --sky-sand: #fbf3c0;

  /* Accent & Theme */
  --purple-dark: #220b42;
  --purple-main: #7e4ed6;
  --purple-light: #cbb5f8;
  --card-bg: #fffdf2;
  --card-border: #220b42;
  --gold-accent: #f8b800;
  --gold-light: #ffeb85;
  --green-accent: #00b347;

  --font-pixel: 'Press Start 2P', monospace, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

/* STRICT FULLSCREEN VIEWPORT: PREVENTS ALL SCROLLING & PINCH */
html, body {
  width: 100%;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  position: fixed;
  font-family: var(--font-pixel);
  color: var(--purple-dark);
}

/* Safari paints its upper chrome from the theme-color, while translucent
   lower chrome can sample the root canvas. Keep that root explicitly dirt
   coloured (including CRT scanlines) beyond the dynamic page viewport. */
html {
  height: 100lvh;
  min-height: 100lvh;
  background:
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.14) 50%) 0 0 / 100% 3px,
    #bd5907;
}

body {
  /* Match the rendered paddock inside the usable Safari viewport. */
  background:
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.14) 50%) 0 0 / 100% 3px,
    linear-gradient(
      to bottom,
      #3cbcfc 0 40%,
      #079447 40% 69%,
      #bd5907 69% 100%
    );
  background-color: #3cbcfc;
}

/* Floating Audio Toggle */
.floating-audio-btn {
  position: fixed;
  top: 12px;
  right: 12px;
  background: rgba(34, 11, 66, 0.85);
  border: 2px solid var(--purple-light);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  cursor: pointer;
  z-index: 100;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.floating-audio-btn:active {
  transform: translateY(1px);
  background: #3e1675;
}

/* Outer Viewport Container */
.app-fullscreen-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ============================================================
   EXCITEBIKE GP PIT PADDOCK BACKGROUND & CRT OVERLAY
   ============================================================ */
.gp-pit-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  z-index: 0;
  pointer-events: none;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.crt-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.22) 50%),
              linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
  background-size: 100% 3px, 6px 100%;
  opacity: 0.34;
}

/* ============================================================
   SCREEN ACTS (FULLSCREEN ZERO-SCROLL SLIDES)
   ============================================================ */
.screen-act {
  position: absolute;
  inset: 0;
  z-index: 10;
  width: 100%;
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px calc(14px + env(safe-area-inset-bottom));
  opacity: 0;
  pointer-events: none;
  transform: scale(0.97);
  transition: opacity 0.3s ease, transform 0.3s ease;
  overflow: hidden;
}

.screen-act.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* ============================================================
   SCREEN 1: LANDING SCREEN (3D PIXEL TITLE + GP PIT STAGE)
   ============================================================ */
.landing-header {
  position: relative;
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 6px;
  width: 100%;
}

.btn-audio-pill {
  position: absolute;
  top: 0;
  right: 6px;
  background: #3b2d54;
  border: 1.5px solid #6d5294;
  border-radius: 999px;
  color: #ffffff;
  font-family: var(--font-pixel);
  font-size: 6px;
  letter-spacing: 0.5px;
  padding: 5px 9px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.1s ease;
}

.btn-audio-pill:active {
  transform: scale(0.92);
}

#screenRace {
  padding: 0;
}

.landing-title-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  margin-top: 2px;
  transform: skewX(-2deg);
  filter: drop-shadow(0 9px 8px rgba(35, 8, 64, 0.28));
}

.landing-title-kicker {
  position: relative;
  z-index: 2;
  color: #fff8dc;
  font-size: clamp(5px, 0.75vw, 9px);
  letter-spacing: 0.28em;
  margin-bottom: 13px;
  -webkit-text-stroke: 0.35px #fef3c7;
  text-shadow:
    0 1px 0 #facc15,
    0 2px 0 #d97706,
    1px 3px 0 #451a03;
}

.landing-pixel-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff8dc;
  font-family: var(--font-pixel);
  font-size: clamp(20px, 3.4vw, 46px);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  -webkit-text-stroke: 1px #fef3c7;
  paint-order: stroke fill;
  text-shadow:
    0 2px 0 #fef08a,
    0 4px 0 #facc15,
    0 6px 0 #f59e0b,
    0 8px 0 #d97706,
    2px 10px 0 #92400e,
    4px 12px 0 #451a03;
}

.landing-pixel-title span:last-child {
  color: #fff8dc;
  margin-top: 7px;
  letter-spacing: 0.025em;
  word-spacing: -0.48em;
}

.date-chip {
  font-size: 6px;
  color: #fef08a;
  background: #1c1917;
  border: 1.5px solid #ca8a04;
  border-radius: 999px;
  padding: 4px 12px;
  letter-spacing: 0.8px;
  margin-top: 18px;
  margin-bottom: 2px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

@media (max-height: 760px) {
  .landing-title-kicker {
    margin-bottom: 8px;
  }

  .landing-pixel-title {
    font-size: clamp(17px, 2.6vw, 30px);
    line-height: 0.94;
    text-shadow:
      0 2px 0 #fef08a,
      0 4px 0 #facc15,
      0 6px 0 #d97706,
      2px 8px 0 #451a03;
  }

  .landing-pixel-title span:last-child {
    margin-top: 5px;
  }

  .date-chip {
    margin-top: 12px;
  }
}

/* ------------------------------------------------------------
   MOBILE-FIRST INTRO FLOW
   The same title physically moves from the center to the top before the
   terms card enters, so the transition reads as one continuous scene.
   ------------------------------------------------------------ */
#screenLanding {
  justify-content: center;
}

#screenLanding .landing-header {
  position: absolute;
  top: 54%;
  left: 12px;
  width: calc(100% - 24px);
  margin: 0;
  transform: translateY(-50%);
  transform-origin: top center;
  transition: top 680ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 680ms cubic-bezier(0.22, 1, 0.36, 1);
}

#screenLanding.intro-phase .landing-pixel-title {
  font-size: clamp(28px, 8vw, 72px);
}

#screenLanding.terms-phase .landing-header {
  top: max(12px, env(safe-area-inset-top));
  transform: translateY(0);
}

#screenLanding.terms-phase .landing-pixel-title {
  font-size: clamp(18px, 3.4vw, 34px);
}

.intro-start-btn {
  position: absolute;
  z-index: 20;
  top: 78%;
  left: 50%;
  min-width: min(76vw, 310px);
  transform: translate(-50%, -50%);
  border: 3px solid #facc15;
  border-radius: 8px;
  padding: 15px 20px;
  background: linear-gradient(180deg, #16a34a, #087a35);
  color: #fff8dc;
  font-family: var(--font-pixel);
  font-size: clamp(10px, 2.8vw, 15px);
  letter-spacing: 0.08em;
  text-shadow: 2px 2px 0 #14532d;
  box-shadow: 0 5px 0 #14532d, 0 10px 24px rgba(0, 0, 0, 0.38);
  cursor: pointer;
  opacity: 1;
  transition: opacity 220ms ease, transform 220ms ease;
  animation: startPulse 1.4s steps(2, end) infinite;
}

.intro-start-btn:active {
  transform: translate(-50%, calc(-50% + 3px));
  box-shadow: 0 2px 0 #14532d, 0 5px 14px rgba(0, 0, 0, 0.32);
}

#screenLanding.terms-phase .intro-start-btn {
  opacity: 0;
  transform: translate(-50%, -35%) scale(0.92);
  pointer-events: none;
  animation: none;
}

@keyframes startPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.18); }
}

.intro-terms-layer {
  position: absolute;
  inset: 0;
  z-index: 18;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(128px, 20vh, 178px) 12px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent 0 12%, rgba(69, 26, 3, 0.08) 35%, rgba(69, 26, 3, 0.34) 100%);
  opacity: 0;
  transform: translateY(34px) scale(0.96);
  pointer-events: none;
  transition: opacity 360ms ease 180ms,
              transform 520ms cubic-bezier(0.22, 1, 0.36, 1) 140ms;
}

#screenLanding.terms-phase .intro-terms-layer {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.intro-terms-layer .terms-fullscreen-card {
  height: auto;
  max-height: 100%;
  min-height: 0;
  margin: 0;
}

.character-header {
  position: relative;
  z-index: 15;
  width: 100%;
  display: flex;
  justify-content: center;
  padding-top: max(4px, env(safe-area-inset-top));
}

.character-title-placard {
  position: relative;
  width: min(62vw, 570px);
  min-height: 51px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 7px 44px 8px;
  color: #fff8dc;
  background:
    linear-gradient(180deg, rgba(42, 39, 67, 0.98), rgba(17, 24, 39, 0.98));
  border: 2px solid #facc15;
  border-radius: 5px;
  box-shadow:
    0 4px 0 #92400e,
    0 7px 0 #451a03,
    0 11px 18px rgba(69, 26, 3, 0.28);
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px);
}

.character-title-placard::before,
.character-title-placard::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  background:
    conic-gradient(#fff8dc 25%, #451a03 0 50%, #fff8dc 0 75%, #451a03 0) 0 0 / 10px 10px;
  border: 1px solid #facc15;
}

.character-title-placard::before { left: 10px; }
.character-title-placard::after { right: 10px; }

.character-title-kicker {
  display: block;
  margin-bottom: 6px;
  color: #fef08a;
  font-size: clamp(5px, 0.62vw, 8px);
  line-height: 1;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.character-header h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  font-size: clamp(15px, 2.15vw, 25px);
  line-height: 1;
  letter-spacing: 0.025em;
  white-space: nowrap;
}

/* Real duplicated colour layers avoid an iOS Safari bug that clips a
   multi-line text-shadow to the final glyph of each flex item. */
.character-header h2 span {
  position: relative;
  isolation: isolate;
  display: block;
  padding: 0 4px 7px;
  color: #fff8dc;
  -webkit-text-stroke: 0.7px #451a03;
  paint-order: stroke fill;
}

.character-header h2 span::before,
.character-header h2 span::after {
  content: attr(data-title);
  position: absolute;
  inset: 0 4px auto;
  z-index: -1;
  color: #facc15;
  -webkit-text-stroke: 0.7px #451a03;
  paint-order: stroke fill;
  transform: translateY(3px);
}

.character-header h2 span::after {
  z-index: -2;
  color: #d97706;
  transform: translate(2px, 6px);
}

.character-screen .landing-center-stage {
  transform: none;
}

@media (max-width: 600px) {
  #screenLanding .date-chip {
    max-width: 92vw;
    font-size: 5px;
    line-height: 1.45;
  }

  .character-screen {
    padding-inline: 6px;
  }

  .character-header {
    /* Keep the centered heading below the fixed audio chip on narrow phones. */
    padding-top: calc(52px + env(safe-area-inset-top));
  }

  .character-title-placard {
    width: min(92vw, 390px);
    min-height: 76px;
    padding: 10px 52px 12px;
  }

  .character-title-placard::before,
  .character-title-placard::after {
    width: 16px;
    height: 24px;
    background-size: 8px 8px;
  }

  .character-title-placard::before { left: 12px; }
  .character-title-placard::after { right: 12px; }

  .character-title-kicker {
    font-size: clamp(5px, 1.45vw, 7px);
  }

  .character-header h2 {
    flex-direction: column;
    gap: 7px;
    font-size: clamp(15px, 4.5vw, 19px);
    line-height: 0.9;
  }

  .character-screen .pixel-platform,
  .character-screen #voxelCanvas {
    width: min(96vw, calc(100dvh - 205px));
  }

  .character-screen .outfit-pill-bar {
    max-width: 88vw;
  }
}

/* Keep the global audio control attached to the top edge of the centered
   8:5 race viewport on both portrait phones and desktop screens. */
body:has(#screenRace.active) .floating-audio-btn {
  top: max(12px, env(safe-area-inset-top));
}

@media (max-height: 740px) {
  #screenLanding.terms-phase .landing-header {
    top: max(18px, env(safe-area-inset-top));
    left: 12px;
    width: auto;
    max-width: calc(100% - 118px);
    align-items: flex-start;
    text-align: left;
  }

  #screenLanding.terms-phase .landing-title-lockup {
    align-items: flex-start;
    transform: none;
    filter: none;
  }

  #screenLanding.terms-phase .landing-title-kicker,
  #screenLanding.terms-phase .date-chip {
    display: none;
  }

  #screenLanding.terms-phase .landing-pixel-title {
    flex-direction: row;
    gap: 6px;
    font-size: clamp(9px, 2.75vw, 12px);
    line-height: 1;
    text-shadow:
      0 1px 0 #facc15,
      0 2px 0 #d97706,
      1px 3px 0 #451a03;
  }

  #screenLanding.terms-phase .landing-pixel-title span:last-child {
    margin-top: 0;
  }

  .intro-terms-layer {
    padding-top: calc(55px + env(safe-area-inset-top));
    padding-bottom: 8px;
  }

  .intro-terms-layer .terms-fullscreen-card {
    padding: 0 10px 10px;
    min-height: 0;
  }

  .intro-terms-layer .card-header-pixel {
    margin-inline: -10px;
  }

  .intro-terms-layer .terms-checklist-pixel {
    gap: 0;
    padding: 4px 6px;
  }

  .intro-terms-layer .pixel-btn {
    padding: 9px 10px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #screenLanding .landing-header,
  .intro-start-btn,
  .intro-terms-layer {
    transition-duration: 1ms;
    animation: none;
  }
}

/* Center 3D Voxel Stage */
.landing-center-stage {
  position: relative;
  width: 100%;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 0;
}

/* Tall phone layouts have generous vertical room; lower the hero so the
   canopy sits in the visual middle of the paddock instead of crowding the
   header.  Short desktop windows keep the compact centered arrangement. */
@media (min-height: 900px) {
  .landing-center-stage {
    transform: translateY(90px);
  }
}

.pixel-platform {
  position: relative;
  width: min(92vw, 760px, calc(100dvh - 210px));
  height: auto;
  /* Taller phone-first frame keeps both the canopy peak and rider in view. */
  aspect-ratio: 760 / 560;
  max-width: 760px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#voxelCanvas {
  width: min(92vw, 760px, calc(100dvh - 210px));
  height: auto;
  max-width: 760px;
  aspect-ratio: 760 / 560;
  cursor: grab;
  touch-action: none;
  z-index: 5;
}

.platform-shadow {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(34, 11, 66, 0.35) 0%, rgba(34, 11, 66, 0.08) 65%, transparent 100%);
  pointer-events: none;
}

/* Outfit Switcher Bar (Matching Reference) */
.outfit-pill-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #451a03;
  border: 2px solid #facc15;
  border-radius: 7px;
  padding: 7px 8px;
  box-shadow: 0 4px 0 #92400e, 0 7px 0 #451a03, 0 10px 18px rgba(69, 26, 3, 0.36);
  width: 100%;
  max-width: min(88vw, 500px);
  margin-top: 4px;
}

.pill-arrow {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  background: #facc15;
  border: 2px solid #451a03;
  border-radius: 4px;
  font-family: var(--font-pixel);
  color: #451a03;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 3px 0 #92400e;
}

.pill-arrow:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #92400e;
}

.selector-chevron {
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.selector-chevron-left { border-right: 8px solid #451a03; }
.selector-chevron-right { border-left: 8px solid #451a03; }

.pill-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.pill-title {
  font-size: clamp(8px, 2.15vw, 10px);
  color: #fff8dc;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.pill-sub {
  font-size: clamp(6px, 1.6vw, 8px);
  color: #fef08a;
  margin-top: 2px;
  letter-spacing: 0.3px;
}

/* Bottom Action Area: INDIETRO and INIZIA GARA (Matching Reference) */
.landing-footer-duo {
  position: relative;
  z-index: 15;
  width: 100%;
  max-width: min(88vw, 500px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.landing-footer-duo .pixel-btn {
  width: auto;
  min-height: 46px;
  padding: 10px 12px;
}

.landing-footer-duo .btn-indietro {
  flex: 0 0 auto;
}

.landing-footer-duo .btn-inizia-gara {
  flex: 1 1 auto;
}

.btn-back::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 7px solid #facc15;
  filter: drop-shadow(1px 1px 0 #7f1d1d);
}

.btn-indietro {
  background: linear-gradient(180deg, #dc4b36, #9f291f);
  border: 2px solid #451a03;
  border-radius: 6px;
  color: #ffffff;
  font-family: var(--font-pixel);
  font-size: 7.5px;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  cursor: pointer;
  box-shadow: 0 4px 0 #451a03, 0 7px 14px rgba(69, 26, 3, 0.34);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-indietro:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #450a0a;
}

.btn-inizia-gara {
  flex: 1;
  background: #15803d;
  border: 2px solid #facc15;
  border-radius: 6px;
  color: #ffffff;
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 0.8px;
  padding: 10px 16px;
  cursor: pointer;
  box-shadow: 0 4px 0 #14532d, 0 7px 0 #451a03, 0 10px 16px rgba(69, 26, 3, 0.3);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-inizia-gara:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #14532d;
}

/* ============================================================
   SCREEN 2: FULLSCREEN TERMS CARD
   ============================================================ */
.terms-fullscreen-card {
  width: 100%;
  max-width: 500px;
  height: auto;
  max-height: 90vh;
  position: relative;
  overflow: hidden auto;
  background:
    linear-gradient(90deg, rgba(250, 204, 21, 0.08) 1px, transparent 1px) 0 0 / 12px 12px,
    linear-gradient(#fff9df, #f8edc6);
  border: 4px solid #451a03;
  border-radius: 12px;
  padding: 0 14px 13px;
  box-shadow:
    0 6px 0 #d97706,
    0 10px 0 #451a03,
    0 18px 32px rgba(69, 26, 3, 0.38);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  margin: auto;
}

.card-header-pixel {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 4px solid #facc15;
  padding: 10px 14px 9px;
  margin: 0 -14px;
  justify-content: center;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.08) 0 7px, transparent 7px 14px),
    #b91c1c;
  color: #fff8dc;
  text-shadow: 2px 2px 0 #451a03;
}

.badge-icon {
  color: #facc15;
  font-size: 12px;
}

.badge-title {
  font-size: clamp(8.5px, 0.66vw, 11px);
  color: #fff8dc;
  letter-spacing: 0.06em;
}

.terms-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 2px 2px 0;
}

.terms-overline {
  display: block;
  margin-bottom: 7px;
  color: #b45309;
  font-size: clamp(8px, 0.62vw, 10px);
  letter-spacing: 0.16em;
}

.terms-h2 {
  font-size: clamp(13px, 1.15vw, 18px);
  line-height: 1.35;
  color: #fff8dc;
  -webkit-text-stroke: 0.6px #451a03;
  text-shadow: 0 2px 0 #facc15, 0 4px 0 #d97706, 2px 5px 0 #451a03;
  text-align: left;
  margin: 0 0 10px;
}

.terms-subtitle {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: clamp(11.5px, 0.82vw, 13.5px);
  font-weight: 700;
  color: #573318;
  text-align: left;
  line-height: 1.5;
  margin: 0;
}

.terms-pass-stamp {
  width: 70px;
  height: 70px;
  border: 3px solid #b91c1c;
  outline: 2px dashed #d97706;
  outline-offset: 3px;
  border-radius: 50%;
  color: #b91c1c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(5deg);
  background: rgba(255, 248, 220, 0.72);
}

.terms-pass-stamp strong {
  font-size: 24px;
  line-height: 1;
}

.terms-pass-stamp span {
  margin-top: 4px;
  font-size: 5px;
  letter-spacing: 0.08em;
}

.terms-checklist-pixel {
  list-style: none;
  width: 100%;
  background: rgba(255, 248, 220, 0.82);
  border: 2px solid #d97706;
  border-radius: 6px;
  padding: 4px 9px;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-shadow: inset 0 0 0 2px rgba(250, 204, 21, 0.22);
}

.terms-checklist-pixel li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 9px 0;
  border-bottom: 1px dashed #d5a24c;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: clamp(12px, 0.85vw, 14px);
  font-weight: 700;
  line-height: 1.42;
  color: #4a2a14;
}

.terms-checklist-pixel li:last-child {
  border-bottom: 0;
}

.chk-icon {
  width: 34px;
  height: 32px;
  display: grid;
  place-items: center;
  background: #facc15;
  border: 2px solid #92400e;
  border-radius: 3px;
  color: #451a03;
  font-size: clamp(9.5px, 0.7vw, 12px);
  box-shadow: 2px 2px 0 #d97706;
  flex-shrink: 0;
}

.chk-text strong {
  color: #7f1d1d;
}

.chk-text em {
  color: #9a3412;
  font-style: normal;
}

.terms-error-toast {
  background: #fee2e2;
  border: 2px solid #b91c1c;
  color: #7f1d1d;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  padding: 6px 8px;
  border-radius: 4px;
  width: 100%;
  text-align: center;
  animation: shakeToast 0.4s ease-in-out;
}

@keyframes shakeToast {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.card-btn-stack {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
}

.terms-choice-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #92400e;
  font-size: clamp(7.5px, 0.6vw, 9.5px);
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.terms-choice-label::before,
.terms-choice-label::after {
  content: "";
  height: 2px;
  flex: 1;
  background: repeating-linear-gradient(90deg, #d97706 0 7px, transparent 7px 12px);
}

.pixel-btn {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-pixel);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: clamp(10.5px, 0.78vw, 12.5px);
  border-radius: 6px;
  cursor: pointer;
  line-height: 1.35;
  border: 2.5px solid #451a03;
  box-shadow: 0 4px 0 #451a03;
}

.pixel-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #451a03;
}

.btn-muted {
  background: linear-gradient(180deg, #dc4b36, #9f291f);
  color: #fff8dc;
  text-shadow: 1px 1px 0 #451a03;
}

.btn-neon {
  background: linear-gradient(180deg, #16a34a 0%, #087a35 100%);
  color: #fff8dc;
  border-color: #facc15;
  text-shadow: 1px 1px 0 #14532d;
  box-shadow: 0 4px 0 #14532d, 0 6px 0 #451a03;
}

.btn-pixel-mark {
  position: relative;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
}

.btn-stop {
  background: #facc15;
  border: 2px solid #451a03;
  transform: rotate(45deg) scale(0.75);
  box-shadow: 2px 2px 0 rgba(69, 26, 3, 0.45);
}

.btn-go::before,
.btn-go::after {
  content: "";
  position: absolute;
  top: 1px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid #facc15;
  filter: drop-shadow(1px 1px 0 #14532d);
}

.btn-go::before { left: 0; }
.btn-go::after { left: 6px; }

.btn-sub-link {
  background: none;
  border: none;
  font-family: var(--font-pixel);
  font-size: 7px;
  color: #92400e;
  cursor: pointer;
  padding: 5px;
  text-align: center;
}

/* ============================================================
   SCREEN 3: FULLSCREEN RACE VIEWPORT
   ============================================================ */
.race-fullscreen-container {
  position: relative;
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  margin: auto;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  background: #3cbcfc;
}

#gameCanvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: none;
}

.race-play-ui {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}

.race-story-caption {
  position: absolute;
  top: max(188px, 28vh);
  left: 50%;
  width: min(88vw, 560px);
  transform: translateX(-50%);
  padding: 12px 16px;
  border: 2px solid #f8b800;
  border-radius: 7px;
  background: rgba(18, 5, 36, 0.9);
  box-shadow: 0 5px 0 rgba(59, 33, 7, 0.72);
  color: #fff8d2;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(15px, 3.8vw, 19px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-align: center;
  text-wrap: balance;
  transition: opacity 160ms ease, transform 160ms ease;
}

.race-story-caption.hidden {
  opacity: 0;
  transform: translate(-50%, -8px);
}

.race-story-caption.warning {
  border-color: #ff633c;
  background: rgba(99, 24, 13, 0.92);
}

.race-story-caption.success {
  border-color: #9bea5b;
  background: rgba(5, 80, 42, 0.92);
}

.race-play-ui.story-mode .race-swipe-hint,
.race-play-ui.story-mode .race-action-btn {
  display: none;
}

.race-swipe-hint {
  position: absolute;
  left: 8px;
  bottom: max(10px, calc(env(safe-area-inset-bottom) + 8px));
  max-width: 150px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  color: #fff;
  background: rgba(18, 5, 36, 0.88);
  border: 1.5px solid #f8b800;
  border-radius: 5px;
  font-size: 5px;
  line-height: 1.4;
  transition: opacity 180ms ease, transform 180ms ease;
}

.race-swipe-hint.dismissed {
  opacity: 0;
  transform: translateX(-8px);
}

.swipe-arrows {
  position: relative;
  width: 10px;
  height: 18px;
  flex: 0 0 10px;
}

.swipe-arrows::before,
.swipe-arrows::after {
  content: "";
  position: absolute;
  left: 1px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}

.swipe-arrows::before {
  top: 0;
  border-bottom: 6px solid #f8b800;
}

.swipe-arrows::after {
  bottom: 0;
  border-top: 6px solid #f8b800;
}

.race-action-btn {
  position: absolute;
  right: 8px;
  bottom: max(10px, calc(env(safe-area-inset-bottom) + 8px));
  width: 82px;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 9px 7px;
  overflow: hidden;
  isolation: isolate;
  pointer-events: auto;
  touch-action: none;
  border: 3px solid #f8b800;
  border-radius: 8px;
  background: linear-gradient(180deg, #16bd55 0%, #07843a 52%, #045928 100%);
  box-shadow:
    0 6px 0 #3b2107,
    0 8px 0 rgba(18, 5, 36, 0.48),
    inset 0 0 0 2px #fef08a,
    inset 0 -10px 0 rgba(4, 57, 31, 0.34);
  color: #fffbea;
  font-family: var(--font-pixel);
  letter-spacing: 0.04em;
  text-shadow: 2px 2px 0 #14532d;
  cursor: pointer;
}

.race-action-btn::before {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.48);
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.08) 0 5px,
    rgba(4, 70, 35, 0.2) 5px 9px
  );
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
}

.race-action-btn::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: #d9f99d;
  box-shadow: 0 3px 0 rgba(20, 83, 45, 0.45);
}

.race-action-btn > * {
  position: relative;
  z-index: 1;
}

.race-action-btn span {
  font-size: 4px;
  line-height: 1.2;
}

.race-action-btn strong {
  font-size: 9px;
  line-height: 1;
}

.race-action-btn.action-ready {
  background: linear-gradient(180deg, #ffb800 0%, #d82800 100%);
  animation: raceActionPulse 500ms steps(2, end) infinite;
}

.race-action-btn:active,
.race-action-btn.pressed {
  transform: translateY(3px);
  box-shadow:
    0 2px 0 #3b2107,
    0 3px 0 rgba(18, 5, 36, 0.42),
    inset 0 0 0 2px #fef08a,
    inset 0 8px 0 rgba(4, 57, 31, 0.34);
}

@keyframes raceActionPulse {
  50% { filter: brightness(1.35); }
}

.crt-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0.18) 3px,
    rgba(0,0,0,0.18) 4px
  );
  z-index: 5;
}

.screen-overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 5, 36, 0.94);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 16px;
  z-index: 20;
}

.freeze-banner {
  font-size: 8.5px;
  color: #ffe600;
  margin-bottom: 8px;
}

.freeze-bubble {
  font-size: 7.5px;
  line-height: 1.5;
  color: #fff;
  margin-bottom: 12px;
}

.tap-frenzy-btn {
  background: linear-gradient(180deg, #ffb800 0%, #d82800 100%);
  border: 2.5px solid #fff;
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 9.5px;
  padding: 13px 18px;
  border-radius: 8px;
  cursor: pointer;
}

/* Airborne QTE: intentionally not a modal. It is only a transparent tap target
   with one readable arcade cue over the moving race. */
.air-trick-prompt {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px 18vh;
  background: transparent;
  pointer-events: auto;
  touch-action: manipulation;
}

.air-trick-button {
  min-width: min(88vw, 360px);
  padding: 18px 16px;
  border: 0;
  background: transparent;
  color: #fff7c2;
  font-family: var(--font-pixel);
  font-size: clamp(11px, 3.7vw, 17px);
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-align: center;
  cursor: pointer;
  text-shadow:
    0 3px 0 #7c2d12,
    2px 0 0 #7c2d12,
    -2px 0 0 #7c2d12,
    0 0 12px rgba(248, 184, 0, 0.9);
  animation: airTrickPulse 420ms steps(2, end) infinite;
}

@keyframes airTrickPulse {
  50% { transform: scale(1.055); color: #f8b800; }
}

@media (max-width: 600px) {
  .race-fullscreen-container {
    border-radius: 0;
  }

  .race-swipe-hint {
    bottom: max(88px, calc(env(safe-area-inset-bottom) + 84px));
  }

  .race-story-caption {
    top: max(170px, 24vh);
    width: calc(100% - 28px);
    padding: 11px 13px;
    font-size: clamp(15px, 4.2vw, 18px);
  }

  .race-action-btn {
    left: 50%;
    right: auto;
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 14px));
    width: 132px;
    min-height: 64px;
    transform: translateX(-50%);
  }

  .race-action-btn span {
    font-size: 5px;
  }

  .race-action-btn strong {
    font-size: 12px;
  }

  .race-action-btn:active,
  .race-action-btn.pressed {
    transform: translate(-50%, 3px);
  }

  .freeze-banner {
    font-size: 9px;
    line-height: 1.5;
  }

  .freeze-bubble {
    max-width: 330px;
    font-size: 7px;
  }
}

/* ============================================================
   SCREEN 4: GIVEAWAY FULLSCREEN CARD
   ============================================================ */
#confettiCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

.giveaway-fullscreen-card {
  width: 100%;
  max-width: 520px;
  max-height: min(92dvh, 860px);
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(250, 204, 21, 0.08) 1px, transparent 1px) 0 0 / 12px 12px,
    linear-gradient(#fff9df, #f8edc6);
  border: 4px solid #451a03;
  border-radius: 12px;
  padding: 0;
  box-shadow:
    0 6px 0 #d97706,
    0 10px 0 #451a03,
    0 18px 32px rgba(69, 26, 3, 0.38);
  display: flex;
  flex-direction: column;
  margin: auto;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #4a2a14;
}

.victory-pass-header {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 4px solid #facc15;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.08) 0 7px, transparent 7px 14px),
    #b91c1c;
  color: #fff8dc;
  text-shadow: 2px 2px 0 #451a03;
}

.victory-flag {
  width: 26px;
  height: 22px;
  flex: 0 0 auto;
  border: 2px solid #451a03;
  background:
    conic-gradient(#fff 25%, #1e2029 0 50%, #fff 0 75%, #1e2029 0) 0 0 / 12px 12px;
  box-shadow: 2px 2px 0 #facc15;
}

.giveaway-tag {
  font-family: var(--font-pixel);
  font-size: clamp(8px, 1.7vw, 11px);
  line-height: 1.4;
  letter-spacing: 0.05em;
  color: #fff8dc;
}

.victory-pass-content {
  min-height: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.victory-pass-hero {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.victory-overline {
  display: block;
  margin-bottom: 6px;
  color: #b45309;
  font-family: var(--font-pixel);
  font-size: 8px;
  line-height: 1.4;
  letter-spacing: 0.12em;
}

.hero-gift-title {
  margin: 0 0 8px;
  color: #7f1d1d;
  font-family: inherit;
  font-size: clamp(22px, 5.2vw, 32px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-align: left;
}

.giveaway-desc {
  margin: 0;
  color: #573318;
  font-family: inherit;
  font-size: clamp(14px, 3.3vw, 17px);
  font-weight: 650;
  line-height: 1.48;
  text-align: left;
}

.victory-pass-stamp {
  width: 78px;
  height: 78px;
  border: 3px solid #b91c1c;
  outline: 2px dashed #d97706;
  outline-offset: 3px;
  border-radius: 50%;
  color: #b91c1c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(5deg);
  background: rgba(255, 248, 220, 0.78);
  font-family: var(--font-pixel);
}

.victory-pass-stamp strong {
  font-size: 26px;
  line-height: 1;
}

.victory-pass-stamp span {
  margin-top: 5px;
  font-size: 5px;
  letter-spacing: 0.05em;
}

/* Outdoor Crossodromo Photo Card in Screen 4 */
.track-photo-card {
  flex: 0 0 auto;
  width: 100%;
  background: #0f172a;
  border: 3px solid #d97706;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 0 #451a03;
}

.track-photo-badge {
  font-family: var(--font-pixel);
  font-size: clamp(7px, 1.5vw, 9px);
  line-height: 1.5;
  font-weight: bold;
  color: #facc15;
  background: #1e293b;
  padding: 8px 10px;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #334155;
}

.track-photo-img-box {
  position: relative;
  width: 100%;
  height: clamp(125px, 24vh, 190px);
  overflow: hidden;
}

.track-aerial-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.track-photo-caption {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: clamp(11px, 2.5vw, 13px);
  font-weight: 800;
  line-height: 1.4;
  color: #fef08a;
  background: #0f172a;
  padding: 8px 10px;
  letter-spacing: 0.02em;
  border-top: 1px solid #1e293b;
}

.giveaway-footer-note {
  flex: 0 0 auto;
  width: 100%;
  padding: 14px;
  border: 2px solid #d9b469;
  background: rgba(255,255,255,0.46);
  color: #4a2a14;
  text-align: left;
}

.giveaway-footer-note h3 {
  margin: 0 0 9px;
  color: #7f1d1d;
  font-family: var(--font-pixel);
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.08em;
}

.giveaway-footer-note p {
  margin: 0;
  font-family: inherit;
  font-size: clamp(14px, 3.15vw, 16px);
  font-weight: 600;
  line-height: 1.56;
  white-space: pre-line;
}

.victory-pass-content > .btn-sub-link {
  align-self: center;
  min-height: 40px;
  padding: 9px 14px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 600px) {
  #screenGift {
    padding: max(8px, env(safe-area-inset-top)) 8px max(12px, env(safe-area-inset-bottom));
  }

  .giveaway-fullscreen-card {
    max-height: calc(100dvh - max(20px, env(safe-area-inset-top)) - max(20px, env(safe-area-inset-bottom)));
  }

  .victory-pass-content {
    padding: 14px 12px 18px;
    gap: 12px;
  }

  .victory-pass-header {
    justify-content: flex-start;
    padding-right: 100px;
  }

  .victory-pass-hero {
    gap: 9px;
  }

  .victory-pass-stamp {
    width: 66px;
    height: 66px;
  }

  .victory-pass-stamp strong {
    font-size: 22px;
  }
}

/* ============================================================
   SCREEN 4: REAL GIFT - MOTOCROSS DORNO
   ============================================================ */
#screenGift {
  padding: 18px;
  background:
    radial-gradient(circle at 50% 8%, rgba(239, 68, 68, 0.22), transparent 34%),
    linear-gradient(155deg, #111827 0%, #260d0d 52%, #090d14 100%);
}

.giveaway-fullscreen-card {
  max-width: 720px;
  max-height: min(96dvh, 940px);
  border: 3px solid #f3b51b;
  border-radius: 14px;
  background: #f6f3eb;
  box-shadow: 0 8px 0 #771b16, 0 18px 54px rgba(0, 0, 0, 0.52);
  color: #1f2937;
}

.gift-brand-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  border-bottom: 4px solid #f3b51b;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 8px, transparent 8px 16px),
    linear-gradient(120deg, #991b1b, #c42a20 58%, #7f1d1d);
  color: #fff;
}

.gift-brand-link {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.gift-company-logo {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  object-fit: contain;
}

.gift-brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gift-brand-copy > span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  opacity: 0.82;
}

.gift-brand-copy .giveaway-tag {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(18px, 4vw, 26px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 2px 2px 0 rgba(40, 10, 10, 0.55);
}

.gift-age-mark {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #f3b51b;
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}

.victory-pass-content {
  padding: 14px 16px 18px;
  gap: 14px;
  scrollbar-color: #b91c1c #e5e1d6;
}

.gift-photo-hero,
.gift-introduction,
.gift-facts,
.gift-primary-actions,
.gift-booking-card,
.giveaway-footer-note {
  flex: 0 0 auto;
}

.gift-photo-hero {
  min-height: 245px;
  position: relative;
  overflow: hidden;
  border: 2px solid #151515;
  border-radius: 9px;
  background: #111827;
  box-shadow: 0 4px 0 #991b1b;
}

.gift-photo-hero > img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  display: block;
  object-fit: cover;
  object-position: center 46%;
}

.gift-photo-overlay {
  min-height: 245px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 62px 20px 18px;
  background: linear-gradient(180deg, transparent 26%, rgba(4, 6, 12, 0.18) 47%, rgba(5, 7, 12, 0.92) 100%);
  color: #fff;
}

.gift-photo-overlay > span {
  margin-bottom: 5px;
  color: #ffd84d;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: 0.12em;
}

.gift-photo-overlay h2 {
  max-width: 590px;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(26px, 5vw, 39px);
  font-weight: 950;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.gift-photo-overlay p {
  margin: 8px 0 0;
  font-size: clamp(14px, 2.5vw, 17px);
  font-weight: 700;
  line-height: 1.35;
}

.gift-introduction {
  padding: 2px 4px;
}

.gift-introduction p {
  margin: 0;
  color: #312e2b;
  font-size: clamp(15px, 2.7vw, 18px);
  font-weight: 620;
  line-height: 1.5;
}

.gift-introduction strong {
  color: #991b1b;
  font-weight: 900;
}

.gift-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 2px solid #d6d0c4;
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
}

.gift-facts article {
  min-width: 0;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px;
  border-right: 1px solid #ddd6c8;
}

.gift-facts article:last-child {
  border-right: 0;
}

.gift-facts span,
.gift-booking-card span,
.giveaway-footer-note h3 {
  color: #a5231b;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: 0.11em;
}

.gift-facts strong {
  margin-top: 5px;
  color: #191919;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.18;
}

.gift-facts small {
  margin-top: 3px;
  color: #5b5b5b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.gift-primary-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.gift-action {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  border: 2px solid;
  border-radius: 7px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0.035em;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 0 rgba(37, 15, 10, 0.72);
}

.gift-action-primary {
  border-color: #f3b51b;
  background: linear-gradient(#c93227, #991b1b);
  color: #fff;
}

.gift-action-secondary {
  border-color: #252934;
  background: #fff;
  color: #181b22;
}

.gift-booking-card {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 9px 18px;
  padding: 14px 16px;
  border-left: 5px solid #b91c1c;
  background: #e9e5dc;
}

.gift-booking-card > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gift-booking-card strong {
  color: #171717;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
}

.gift-contact-links {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.gift-contact-links a {
  color: #861d17;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.gift-booking-card > small {
  grid-column: 1 / -1;
  color: #55514b;
  font-size: 12px;
  font-weight: 700;
}

.giveaway-footer-note {
  padding: 14px 16px;
  border: 1px solid #d6d0c4;
  border-radius: 8px;
  background: #fff;
}

.giveaway-footer-note h3 {
  margin: 0 0 7px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.giveaway-footer-note p {
  color: #312e2b;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.victory-pass-content > .btn-sub-link {
  align-self: center;
  min-height: 42px;
  padding: 9px 16px;
  border-color: transparent;
  color: #504a43;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
  box-shadow: none;
}

@media (max-width: 600px) {
  #screenGift {
    padding: 0;
  }

  .giveaway-fullscreen-card {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .gift-brand-header {
    min-height: calc(64px + env(safe-area-inset-top));
    padding: max(8px, env(safe-area-inset-top)) 14px 8px;
  }

  .gift-company-logo {
    width: 48px;
    height: 48px;
  }

  .gift-brand-copy {
    gap: 2px;
  }

  .gift-brand-copy > span {
    font-size: 9px;
  }

  .gift-brand-copy .giveaway-tag {
    font-size: clamp(17px, 5.3vw, 22px);
  }

  .gift-age-mark {
    width: 42px;
    height: 42px;
    font-size: 20px;
  }

  .victory-pass-content {
    padding: 10px 10px max(20px, env(safe-area-inset-bottom));
    gap: 11px;
  }

  .gift-photo-hero,
  .gift-photo-overlay {
    min-height: 206px;
  }

  .gift-photo-overlay {
    padding: 50px 14px 14px;
  }

  .gift-photo-overlay > span {
    font-size: 9px;
  }

  .gift-photo-overlay h2 {
    font-size: clamp(25px, 8vw, 34px);
  }

  .gift-photo-overlay p {
    font-size: 14px;
  }

  .gift-introduction {
    padding: 2px;
  }

  .gift-introduction p {
    font-size: 15px;
    line-height: 1.45;
  }

  .gift-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gift-facts article {
    min-height: 78px;
    padding: 10px;
    border-bottom: 1px solid #ddd6c8;
  }

  .gift-facts article:nth-child(2) {
    border-right: 0;
  }

  .gift-facts article:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .gift-facts strong {
    font-size: 14px;
  }

  .gift-primary-actions {
    grid-template-columns: 1fr;
  }

  .gift-action {
    min-height: 50px;
    font-size: 12px;
  }

  .gift-booking-card {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 13px;
  }

  .gift-booking-card > small {
    grid-column: 1;
  }

  .giveaway-footer-note {
    padding: 13px;
  }
}

/* ============================================================
   FINAL GIFT: MATCH THE PIT-PASS VISUAL LANGUAGE
   ============================================================ */
#screenGift {
  padding: max(10px, env(safe-area-inset-top)) 10px max(12px, env(safe-area-inset-bottom));
  background: rgba(69, 26, 3, 0.18);
}

body:has(#screenGift.active) .floating-audio-btn {
  opacity: 0;
  pointer-events: none;
}

#screenGift .giveaway-fullscreen-card {
  width: 100%;
  max-width: 520px;
  height: auto;
  max-height: calc(100dvh - max(22px, env(safe-area-inset-top)) - max(24px, env(safe-area-inset-bottom)));
  overflow: hidden;
  border: 4px solid #451a03;
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(250, 204, 21, 0.08) 1px, transparent 1px) 0 0 / 12px 12px,
    linear-gradient(#fff9df, #f8edc6);
  box-shadow:
    0 6px 0 #d97706,
    0 10px 0 #451a03,
    0 18px 32px rgba(69, 26, 3, 0.38);
  color: #4a2a14;
}

#screenGift .gift-brand-header {
  min-height: 58px;
  padding: 7px 13px;
  border-bottom: 4px solid #facc15;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 7px, transparent 7px 14px),
    #b91c1c;
  color: #fff8dc;
  text-shadow: 2px 2px 0 #451a03;
}

#screenGift .gift-brand-link {
  gap: 9px;
}

#screenGift .gift-company-logo {
  width: 43px;
  height: 43px;
}

#screenGift .gift-brand-copy {
  gap: 5px;
}

#screenGift .gift-brand-copy > span {
  color: #facc15;
  font-family: var(--font-pixel);
  font-size: 7px;
  line-height: 1.25;
  letter-spacing: 0.1em;
  opacity: 1;
}

#screenGift .gift-brand-copy .giveaway-tag {
  color: #fff8dc;
  font-family: var(--font-pixel);
  font-size: clamp(9px, 2.3vw, 12px);
  line-height: 1.35;
  letter-spacing: 0.025em;
  text-shadow: 2px 2px 0 #451a03;
}

#screenGift .gift-age-mark {
  width: 46px;
  height: 46px;
  border: 3px solid #b91c1c;
  outline: 2px dashed #facc15;
  outline-offset: 2px;
  border-radius: 50%;
  background: #fff8dc;
  box-shadow: none;
  color: #b91c1c;
  font-family: var(--font-pixel);
  font-size: 17px;
  transform: rotate(5deg);
  text-shadow: none;
}

#screenGift .victory-pass-content {
  min-height: 0;
  padding: 12px;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #b91c1c #f8edc6;
}

#screenGift .gift-photo-hero {
  min-height: 215px;
  border: 3px solid #d97706;
  border-radius: 7px;
  background: #0f172a;
  box-shadow: 0 4px 0 #451a03;
}

#screenGift .gift-photo-overlay {
  min-height: 215px;
  padding: 54px 15px 15px;
  background: linear-gradient(180deg, transparent 24%, rgba(15, 23, 42, 0.22) 44%, rgba(15, 23, 42, 0.96) 100%);
}

#screenGift .gift-photo-overlay > span {
  margin-bottom: 7px;
  color: #facc15;
  font-family: var(--font-pixel);
  font-size: 7px;
  line-height: 1.45;
  letter-spacing: 0.06em;
}

#screenGift .gift-photo-overlay h2 {
  color: #fff8dc;
  font-family: var(--font-pixel);
  font-size: clamp(18px, 4.2vw, 28px);
  font-weight: 400;
  line-height: 1.24;
  letter-spacing: 0.01em;
  text-shadow: 2px 2px 0 #451a03, 0 4px 0 rgba(217, 119, 6, 0.7);
}

#screenGift .gift-photo-overlay p {
  color: #fff9df;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

#screenGift .gift-introduction {
  padding: 2px 3px;
}

#screenGift .gift-introduction p {
  color: #573318;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.5;
}

#screenGift .gift-introduction strong {
  color: #7f1d1d;
}

#screenGift .gift-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 2px solid #d97706;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 248, 220, 0.82);
  box-shadow: inset 0 0 0 2px rgba(250, 204, 21, 0.2);
}

#screenGift .gift-facts article {
  min-height: 78px;
  position: relative;
  justify-content: center;
  padding: 9px 9px 9px 51px;
  border: 0;
  border-right: 1px dashed #d5a24c;
  border-bottom: 1px dashed #d5a24c;
  background: transparent;
}

#screenGift .gift-facts article:nth-child(2n) {
  border-right: 0;
}

#screenGift .gift-facts article:nth-last-child(-n + 2) {
  border-bottom: 0;
}

#screenGift .gift-facts article::before {
  width: 32px;
  height: 30px;
  position: absolute;
  top: 50%;
  left: 9px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 2px solid #92400e;
  border-radius: 3px;
  background: #facc15;
  box-shadow: 2px 2px 0 #d97706;
  color: #451a03;
  font-family: var(--font-pixel);
  font-size: 8px;
}

#screenGift .gift-facts article:nth-child(1)::before { content: "01"; }
#screenGift .gift-facts article:nth-child(2)::before { content: "02"; }
#screenGift .gift-facts article:nth-child(3)::before { content: "03"; }
#screenGift .gift-facts article:nth-child(4)::before { content: "04"; }

#screenGift .gift-facts span,
#screenGift .gift-booking-card span,
#screenGift .giveaway-footer-note h3 {
  color: #92400e;
  font-family: var(--font-pixel);
  font-size: 7px;
  line-height: 1.4;
  letter-spacing: 0.05em;
}

#screenGift .gift-facts strong {
  margin-top: 4px;
  color: #4a2a14;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  line-height: 1.25;
}

#screenGift .gift-facts small {
  color: #76512f;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 10px;
  line-height: 1.3;
}

#screenGift .gift-action {
  min-height: 47px;
  padding: 11px 13px;
  border: 2.5px solid #facc15;
  border-radius: 6px;
  background: linear-gradient(180deg, #16a34a, #087a35);
  box-shadow: 0 4px 0 #14532d, 0 6px 0 #451a03;
  color: #fff8dc;
  font-family: var(--font-pixel);
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-shadow: 1px 1px 0 #14532d;
}

#screenGift .gift-action::before {
  content: "▶";
  margin-right: 8px;
  color: #facc15;
}

#screenGift .gift-booking-card {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 8px 14px;
  padding: 12px;
  border: 2px dashed #d97706;
  border-left: 6px solid #b91c1c;
  border-radius: 4px;
  background: rgba(255, 248, 220, 0.76);
}

#screenGift .gift-booking-card strong {
  color: #4a2a14;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 14px;
}

#screenGift .gift-contact-links a {
  color: #7f1d1d;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  font-weight: 900;
}

#screenGift .gift-booking-card > small {
  color: #76512f;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  line-height: 1.4;
}

#screenGift .giveaway-footer-note {
  padding: 12px;
  border: 2px solid #d9b469;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.44);
}

#screenGift .giveaway-footer-note p {
  color: #4a2a14;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
}

#screenGift .victory-pass-content > .btn-sub-link {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 2.5px solid #451a03;
  border-radius: 6px;
  background: linear-gradient(180deg, #dc4b36, #9f291f);
  box-shadow: 0 4px 0 #451a03;
  color: #fff8dc;
  font-family: var(--font-pixel);
  font-size: 8px;
  line-height: 1.4;
  text-decoration: none;
  text-shadow: 1px 1px 0 #451a03;
}

#screenGift .victory-pass-content > .btn-sub-link::before {
  content: "◀";
  margin-right: 8px;
  color: #facc15;
}

@media (max-width: 600px) {
  #screenGift {
    padding: max(7px, env(safe-area-inset-top)) 7px max(10px, env(safe-area-inset-bottom));
  }

  #screenGift .giveaway-fullscreen-card {
    height: auto;
    max-height: calc(100dvh - max(17px, env(safe-area-inset-top)) - max(20px, env(safe-area-inset-bottom)));
    border: 3px solid #451a03;
    border-radius: 10px;
    box-shadow: 0 5px 0 #d97706, 0 8px 0 #451a03;
  }

  #screenGift .gift-brand-header {
    min-height: calc(55px + env(safe-area-inset-top));
    padding: max(7px, env(safe-area-inset-top)) 11px 7px;
  }

  #screenGift .gift-company-logo {
    width: 38px;
    height: 38px;
  }

  #screenGift .gift-age-mark {
    width: 39px;
    height: 39px;
    font-size: 14px;
  }

  #screenGift .victory-pass-content {
    padding: 10px 9px max(16px, env(safe-area-inset-bottom));
    gap: 11px;
  }

  #screenGift .gift-photo-hero,
  #screenGift .gift-photo-overlay {
    min-height: 188px;
  }

  #screenGift .gift-photo-overlay {
    padding: 45px 12px 12px;
  }

  #screenGift .gift-photo-overlay h2 {
    font-size: clamp(17px, 5.2vw, 21px);
    line-height: 1.3;
  }

  #screenGift .gift-introduction p {
    font-size: 13px;
  }

  #screenGift .gift-facts article {
    min-height: 75px;
    padding-left: 47px;
  }

  #screenGift .gift-facts article::before {
    left: 7px;
    width: 30px;
    height: 29px;
  }

  #screenGift .gift-booking-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  #screenGift .gift-booking-card > small {
    grid-column: 1;
  }
}

.hidden {
  display: none !important;
}
