/* ═══════════════════════════════════════════════════════
   CRICKET × WWE WALKOUT GENERATOR
   Maximalist Arena Spectacle meets Telecom Swagger
   ═══════════════════════════════════════════════════════ */

/* ─── THEME SYSTEM ─── */
:root {
  --cricket-green: #0AFF6C;
  --cricket-green-dim: #07c953;
  --cricket-green-glow: rgba(10, 255, 108, 0.35);
  --cricket-green-subtle: rgba(10, 255, 108, 0.08);
  --arena-black: #0A0A0C;
  --arena-black-deep: #050507;
  --spotlight-blue: #1F3C88;
  --spotlight-blue-glow: rgba(31, 60, 136, 0.4);
  --smoke-gray: #1C1F26;
  --smoke-gray-light: #2A2E38;
  --metal-silver: #BFC5CF;
  --metal-silver-dim: #6B7280;
  --white-hot: #F0F2F5;
  --danger-red: #FF2D55;
  --gold-belt: #D4A843;

  --font-display: 'Bebas Neue', 'Impact', sans-serif;
  --font-heading: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Oswald', 'Trebuchet MS', sans-serif;

  --ease-slam: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-dramatic: cubic-bezier(0.83, 0, 0.17, 1);
}

/* ─── RESET ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow: hidden;
  height: 100%;
  /* Support safe area insets on notched devices */
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

body {
  font-family: var(--font-body);
  background: var(--arena-black);
  color: var(--white-hot);
  overflow: hidden;
  height: 100%;
  height: 100dvh;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input { font-family: inherit; }

/* ═══════════════════════════════════════════════════════
   ARENA BACKGROUND SYSTEM
   Global persistent WebGL + overlay layers
   ═══════════════════════════════════════════════════════ */

/* WebGL Canvas — z-index 0, behind everything */
#arena-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* Truss / LED overlay — semi-transparent SVG rigging structure */
#arena-overlay-truss {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  color: var(--metal-silver);
  opacity: 0.07;
  mix-blend-mode: screen;
  transition: opacity 1.5s ease;
}

#arena-overlay-truss .truss-svg {
  width: 100%;
  height: 100%;
}

/* Adjustable scrim — readability layer between canvas and UI */
#arena-scrim {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 12, 0.15) 0%,
    rgba(10, 10, 12, 0.25) 40%,
    rgba(10, 10, 12, 0.35) 70%,
    rgba(10, 10, 12, 0.25) 100%
  );
  opacity: 1;
  transition: opacity 0.6s ease;
}

/* CSS Fallback — hidden when WebGL is active */
.arena-css-fallback {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body.arena-webgl-active .arena-css-fallback {
  display: none;
}

/* When WebGL is NOT available, show CSS fallback layers */
body.arena-no-webgl .arena-css-fallback {
  display: block;
}

body.arena-no-webgl #arena-bg {
  display: none;
}

/* Reduced motion: static frame */
body.arena-reduced-motion #arena-overlay-truss {
  opacity: 0.04;
}

/* ─── GRAIN OVERLAY (always on, topmost visual layer) ─── */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ─── CSS FALLBACK: ARENA LIGHT BEAMS ─── */
.arena-css-fallback .arena-lights {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.2s ease;
}

body.lights-on .arena-css-fallback .arena-lights {
  opacity: 1;
}

.light-beam {
  position: absolute;
  top: -20%;
  width: 3px;
  height: 140%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(10, 255, 108, 0.06) 20%,
    rgba(10, 255, 108, 0.12) 50%,
    rgba(10, 255, 108, 0.06) 80%,
    transparent 100%
  );
  transform-origin: top center;
  filter: blur(8px);
  animation: beam-sway 8s ease-in-out infinite;
}

.beam-1 { left: 8%; animation-delay: 0s; transform: rotate(-12deg); width: 4px; }
.beam-2 { left: 25%; animation-delay: -1.5s; transform: rotate(-5deg); }
.beam-3 { left: 42%; animation-delay: -3s; transform: rotate(2deg); width: 5px; }
.beam-4 { left: 58%; animation-delay: -4.5s; transform: rotate(-3deg); }
.beam-5 { left: 75%; animation-delay: -2s; transform: rotate(8deg); width: 4px; }
.beam-6 { left: 92%; animation-delay: -5.5s; transform: rotate(15deg); }

@keyframes beam-sway {
  0%, 100% { transform: rotate(var(--beam-start, -5deg)); opacity: 0.6; }
  50% { transform: rotate(var(--beam-end, 5deg)); opacity: 1; }
}

.beam-1 { --beam-start: -12deg; --beam-end: -8deg; }
.beam-2 { --beam-start: -5deg; --beam-end: 2deg; }
.beam-3 { --beam-start: 2deg; --beam-end: -4deg; }
.beam-4 { --beam-start: -3deg; --beam-end: 5deg; }
.beam-5 { --beam-start: 8deg; --beam-end: 3deg; }
.beam-6 { --beam-start: 15deg; --beam-end: 10deg; }

/* Blue spotlight cones */
.arena-lights::before,
.arena-lights::after {
  content: '';
  position: absolute;
  top: -10%;
  width: 45%;
  height: 120%;
  background: radial-gradient(
    ellipse at top,
    rgba(31, 60, 136, 0.08) 0%,
    transparent 70%
  );
  filter: blur(30px);
  animation: spotlight-pulse 6s ease-in-out infinite;
}

.arena-lights::before { left: -5%; transform: rotate(-15deg); }
.arena-lights::after { right: -5%; transform: rotate(15deg); animation-delay: -3s; }

@keyframes spotlight-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ─── CSS FALLBACK: FOG LAYER ─── */
.arena-css-fallback .fog-layer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 35%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2s ease 0.5s;
}

body.lights-on .arena-css-fallback .fog-layer { opacity: 1; }

.fog {
  position: absolute;
  bottom: -10%;
  width: 200%;
  height: 100%;
  background: radial-gradient(
    ellipse at center bottom,
    rgba(28, 31, 38, 0.6) 0%,
    rgba(28, 31, 38, 0.3) 30%,
    transparent 70%
  );
  animation: fog-drift 20s linear infinite;
}

.fog-1 { left: -50%; animation-duration: 25s; opacity: 0.7; }
.fog-2 { left: -80%; animation-duration: 18s; animation-delay: -8s; opacity: 0.5; }
.fog-3 { left: -20%; animation-duration: 30s; animation-delay: -15s; opacity: 0.4; }

@keyframes fog-drift {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

/* ─── PYRO FLASH ─── */
.pyro-flash {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: var(--cricket-green);
  opacity: 0;
  transition: none;
}

.pyro-flash.fire {
  animation: pyro-burst 0.4s var(--ease-slam) forwards;
}

@keyframes pyro-burst {
  0% { opacity: 0.9; }
  15% { opacity: 1; }
  100% { opacity: 0; }
}

/* ─── SCREENS ─── */
.screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-slam),
              transform 0.6s var(--ease-slam),
              visibility 0s 0.6s;
  overflow-y: auto;
  overflow-x: hidden;
}

.screen.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.6s var(--ease-slam) 0.15s,
              transform 0.6s var(--ease-slam) 0.15s,
              visibility 0s;
}

.screen.exit-up {
  opacity: 0;
  transform: translateY(-40px) scale(0.98);
  transition: opacity 0.4s ease, transform 0.5s var(--ease-slam);
}

.screen-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 60px 24px calc(56px + env(safe-area-inset-bottom, 0px));
  position: relative;
}

/* ═══════════════════════════════════════════════════════
   SCREEN 1: THE STAGE
   ═══════════════════════════════════════════════════════ */

.screen-stage {
  justify-content: center;
  align-items: center;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(31, 60, 136, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(10, 255, 108, 0.03) 0%, transparent 40%),
    rgba(10, 10, 12, 0.35);
}

.stage-content {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 0 24px calc(56px + env(safe-area-inset-bottom, 0px));
}

/* Logo Lockup */
.logo-lockup {
  opacity: 0;
  transform: translateY(10px);
  animation: fade-up 0.8s var(--ease-slam) 0.6s forwards;
}

.logo-cricket {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cricket-logo-svg {
  height: 36px;
  width: auto;
  display: block;
  filter: brightness(1.1);
}

.wm-logo-svg {
  height: 40px;
  width: auto;
  display: block;
  filter: brightness(1.1);
}

.logo-x {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--metal-silver-dim);
  font-weight: 300;
}

/* Hero Text */
.hero-text {
  opacity: 0;
  transform: translateY(20px);
  animation: fade-up 0.8s var(--ease-slam) 0.9s forwards;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 14vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--white-hot);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 0, 0, 0.5);
}

.hero-headline .line {
  display: block;
}

.hero-headline em {
  font-style: normal;
  color: var(--cricket-green);
  text-shadow: 0 0 40px var(--cricket-green-glow);
}

.hero-sub {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--metal-silver);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 16px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.7);
}

/* CTA Button */
.cta-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 48px;
  background: var(--cricket-green);
  color: var(--arena-black);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  overflow: hidden;
  opacity: 0;
  transform: translateY(15px);
  animation: fade-up 0.8s var(--ease-slam) 1.3s forwards;
  transition: transform 0.2s var(--ease-slam), background 0.15s;
  min-width: 260px;
}

.cta-primary:active {
  transform: scale(0.96) !important;
}

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

.cta-flicker {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: cta-shimmer 3s ease-in-out infinite;
}

@keyframes cta-shimmer {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

.cta-next {
  animation: none;
  opacity: 1;
  transform: none;
}

.cta-next.hidden {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  min-height: 48px;
  border: 2px solid var(--cricket-green);
  color: var(--cricket-green);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.cta-secondary:active {
  background: var(--cricket-green);
  color: var(--arena-black);
  transform: scale(0.96);
}

.stage-footer {
  opacity: 0;
  animation: fade-up 0.8s var(--ease-slam) 1.6s forwards;
}

.legal-micro {
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--metal-silver-dim);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

@keyframes fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══════════════════════════════════════════════════════
   SCREEN 0: PASSWORD GATE
   ═══════════════════════════════════════════════════════ */

.screen-password {
  justify-content: center;
  align-items: center;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(31, 60, 136, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(10, 255, 108, 0.03) 0%, transparent 40%),
    rgba(10, 10, 12, 0.35);
}

.password-content {
  gap: 28px;
}

.password-headline {
  font-size: clamp(3rem, 12vw, 5.5rem) !important;
}

.password-form {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.password-field {
  width: 100%;
  background: var(--arena-black);
  border: 1px solid var(--smoke-gray-light);
  padding: 16px 20px;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.password-field:focus-within {
  border-color: var(--cricket-green);
  box-shadow: 0 0 20px var(--cricket-green-glow);
}

.password-field input {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  color: var(--white-hot);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-align: center;
}

.password-field input::placeholder {
  color: var(--smoke-gray-light);
  letter-spacing: 4px;
}

.password-error {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--danger-red);
  text-transform: uppercase;
  min-height: 1.2em;
}

.password-error.hidden {
  visibility: hidden;
}

/* ═══════════════════════════════════════════════════════
   SCREEN 2: UPLOAD
   ═══════════════════════════════════════════════════════ */

.screen-upload {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(31, 60, 136, 0.06) 0%, transparent 50%),
    rgba(10, 10, 12, 0.45);
}

.step-indicator {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}

.step-num {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--cricket-green);
  line-height: 1;
  opacity: 0.3;
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.step-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--metal-silver-dim);
  text-transform: uppercase;
}

.screen-headline {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 9vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--white-hot);
  margin-bottom: 32px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 0, 0, 0.4);
}

.green-accent {
  color: var(--cricket-green);
  text-shadow: 0 0 30px var(--cricket-green-glow), 0 2px 12px rgba(0, 0, 0, 0.6);
}

/* Upload Zone */
.upload-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.upload-ring {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 3 / 4;
}

.ring-ropes {
  position: absolute;
  inset: 0;
  border: 2px solid var(--smoke-gray-light);
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}

.ring-ropes::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(191, 197, 207, 0.1);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.upload-target {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s;
}

.upload-target:active {
  background: var(--cricket-green-subtle);
}

.camera-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.6;
  transition: opacity 0.3s, transform 0.3s;
}

.upload-target:active .camera-icon {
  opacity: 1;
  transform: scale(1.05);
}

.upload-label {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--white-hot);
}

.upload-sublabel {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--metal-silver-dim);
  letter-spacing: 1px;
  margin-top: 6px;
}

/* Upload Preview */
.upload-preview {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.upload-preview.hidden { display: none; }

.preview-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}

.preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.green-edge-glow {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 30px var(--cricket-green-glow),
              inset 0 0 60px rgba(10, 255, 108, 0.1);
  pointer-events: none;
  animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.btn-retake {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--metal-silver-dim);
  text-transform: uppercase;
  padding: 12px 24px;
  min-height: 44px;
  border: 1px solid var(--smoke-gray-light);
  transition: color 0.2s, border-color 0.2s;
}

.btn-retake:active {
  color: var(--white-hot);
  border-color: var(--white-hot);
}

/* ═══════════════════════════════════════════════════════
   SCREEN 3: TAG TEAM PARTNER
   ═══════════════════════════════════════════════════════ */

.screen-partner {
  background:
    radial-gradient(ellipse at 50% 30%, rgba(31, 60, 136, 0.05) 0%, transparent 50%),
    rgba(10, 10, 12, 0.45);
}

.mascot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding-bottom: 40px;
}

/* Mascot Card */
.mascot-card {
  position: relative;
  background: linear-gradient(
    160deg,
    var(--smoke-gray) 0%,
    var(--arena-black-deep) 100%
  );
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  padding: 3px;
  cursor: pointer;
  transform: translateY(0);
  transition: transform 0.25s var(--ease-slam), box-shadow 0.25s;
}

.mascot-card:active {
  transform: translateY(-4px) scale(1.02);
}

.mascot-card-inner {
  background: linear-gradient(
    170deg,
    var(--smoke-gray) 0%,
    var(--arena-black) 60%
  );
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  padding: 20px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 200px;
  position: relative;
  overflow: hidden;
}

.mascot-card-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cricket-green), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.mascot-card:active .mascot-card-inner::before,
.mascot-card.selected .mascot-card-inner::before {
  opacity: 1;
}


.mascot-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--white-hot);
  letter-spacing: 1px;
  line-height: 1.1;
  margin-bottom: 6px;
}

.mascot-archetype {
  font-family: var(--font-heading);
  font-size: clamp(0.55rem, 2.2vw, 0.7rem);
  font-weight: 600;
  letter-spacing: clamp(1px, 0.6vw, 3px);
  color: var(--cricket-green);
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.mascot-card.selected .mascot-card-inner {
  background: linear-gradient(
    170deg,
    rgba(10, 255, 108, 0.08) 0%,
    var(--arena-black) 60%
  );
}

/* ═══════════════════════════════════════════════════════
   SCREEN 4: TRANSFORMATION
   ═══════════════════════════════════════════════════════ */

.screen-transform {
  background: rgba(5, 5, 7, 0.55);
}

.transform-inner {
  justify-content: center;
  align-items: center;
}

/* Titantron Loader */
.titantron-loader {
  width: 100%;
  max-width: 360px;
  margin: 40px auto 0;
  position: relative;
  padding: 40px 20px;
  background: rgba(10, 10, 12, 0.8);
  border: 1px solid var(--smoke-gray-light);
}

.scan-lines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(10, 255, 108, 0.03) 2px,
    rgba(10, 255, 108, 0.03) 4px
  );
  pointer-events: none;
  animation: scan-scroll 4s linear infinite;
}

@keyframes scan-scroll {
  0% { background-position: 0 0; }
  100% { background-position: 0 100px; }
}

.loader-progress {
  width: 100%;
  height: 4px;
  background: var(--smoke-gray);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  z-index: 2;
}

.loader-fill {
  height: 100%;
  width: 0%;
  background: var(--cricket-green);
  box-shadow: 0 0 12px var(--cricket-green-glow);
  transition: width 0.3s ease;
}

.loader-status {
  font-family: var(--font-heading);
  font-size: clamp(0.55rem, 2.5vw, 0.7rem);
  font-weight: 600;
  letter-spacing: clamp(1px, 0.8vw, 3px);
  color: var(--cricket-green);
  text-transform: uppercase;
  text-align: center;
  animation: status-blink 1.5s step-end infinite;
  position: relative;
  z-index: 2;
  word-break: break-word;
}

@keyframes status-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ═══════════════════════════════════════════════════════
   SCREEN 4B: PREVIEW
   ═══════════════════════════════════════════════════════ */

.screen-preview {
  background:
    radial-gradient(ellipse at 50% 20%, rgba(10, 255, 108, 0.03) 0%, transparent 40%),
    rgba(10, 10, 12, 0.45);
}

.preview-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px calc(56px + env(safe-area-inset-bottom, 0px));
  gap: 20px;
}

.preview-header {
  text-align: center;
  width: 100%;
}

.preview-header .screen-headline {
  font-size: clamp(1.8rem, 7vw, 3rem);
  margin-bottom: 0;
}

.preview-image-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

.preview-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 340px;
}

.preview-actions .cta-primary {
  width: 100%;
  animation: none;
  opacity: 1;
  transform: none;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--metal-silver-dim);
  text-transform: uppercase;
  padding: 12px 24px;
  min-height: 44px;
  border: 1px solid var(--smoke-gray-light);
  transition: color 0.2s, border-color 0.2s;
}

.btn-download:active {
  color: var(--cricket-green);
  border-color: var(--cricket-green);
}

.reveal-frame {
  width: 100%;
  max-width: 340px;
  max-height: 55dvh;
  position: relative;
  /* Animation triggered via JS class, NOT on initial render */
  opacity: 1;
  transform: scale(1) translateY(0);
}

.reveal-frame.reveal-animate {
  animation: reveal-push 1.5s var(--ease-slam) forwards;
}

@keyframes reveal-push {
  0% { transform: scale(0.9) translateY(20px); opacity: 0; }
  60% { transform: scale(1.02) translateY(-4px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.reveal-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 55dvh;
  overflow: hidden;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  box-shadow: 0 0 40px rgba(10, 255, 108, 0.15), 0 20px 60px rgba(0, 0, 0, 0.5);
  background: var(--smoke-gray);
  border: 1px solid var(--smoke-gray-light);
}

.reveal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reveal-img.hidden {
  display: none;
}

.reveal-canvas-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.reveal-canvas-fallback.active {
  display: block;
}

/* Nameplate */
.nameplate {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 16px 20px;
  background: linear-gradient(transparent 0%, rgba(10, 10, 12, 0.95) 100%);
}

.reveal-frame.reveal-animate .nameplate {
  animation: nameplate-slide 0.8s var(--ease-slam) 0.5s both;
}

@keyframes nameplate-slide {
  0% { transform: translateY(100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.nameplate-inner {
  border-left: 3px solid var(--cricket-green);
  padding-left: 12px;
}

.nameplate-name {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 5vw, 1.8rem);
  color: var(--white-hot);
  line-height: 1;
  letter-spacing: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nameplate-tag {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(0.5rem, 2vw, 0.65rem);
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--cricket-green);
  text-transform: uppercase;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Parallax push */
.reveal-frame:hover .reveal-image-wrap {
  transform: scale(1.01) translateY(-2px);
  transition: transform 1s var(--ease-slam);
}

/* ═══════════════════════════════════════════════════════
   SCREEN 5: SMS DELIVERY
   ═══════════════════════════════════════════════════════ */

.screen-sms {
  background:
    radial-gradient(ellipse at 50% 60%, rgba(10, 255, 108, 0.03) 0%, transparent 50%),
    rgba(10, 10, 12, 0.45);
}

#smsWrestlerName {
  display: block;
  font-size: 0.6em;
  letter-spacing: 4px;
  margin-bottom: 4px;
}

#smsWrestlerName:empty {
  display: none;
}

/* Contract Frame */
.contract-frame {
  background: linear-gradient(
    160deg,
    var(--smoke-gray) 0%,
    var(--arena-black-deep) 100%
  );
  border: 1px solid var(--smoke-gray-light);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  padding: 32px 24px;
  margin: 8px 0 20px;
}

.contract-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--smoke-gray-light);
  flex-wrap: wrap;
}

.contract-label {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--metal-silver-dim);
  text-transform: uppercase;
}

.contract-event {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--gold-belt);
  letter-spacing: 2px;
}

.phone-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--metal-silver-dim);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.phone-field {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--arena-black);
  border: 1px solid var(--smoke-gray-light);
  padding: 14px 16px;
  margin-bottom: 24px;
  transition: border-color 0.3s;
}

.phone-field:focus-within {
  border-color: var(--cricket-green);
  box-shadow: 0 0 15px var(--cricket-green-glow);
}

.phone-prefix {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--metal-silver-dim);
}

.phone-field input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--white-hot);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 2px;
}

.phone-field input::placeholder {
  color: var(--smoke-gray-light);
}

.cta-send {
  width: 100%;
  animation: none;
  opacity: 1;
  transform: none;
}

.sms-legal {
  font-family: var(--font-body);
  font-size: 0.6rem;
  color: var(--metal-silver-dim);
  letter-spacing: 0.5px;
  line-height: 1.5;
  text-align: center;
  padding: 0 12px;
}

/* Success State */
.sms-success.hidden { display: none; }

.sms-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
  width: 100%;
}

.marquee-wrap {
  position: absolute;
  bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  overflow: hidden;
  padding: 12px 0;
  background: var(--cricket-green);
  width: 100%;
  z-index: 20;
}

.marquee-wrap.hidden { display: none; }

.marquee-track {
  display: flex;
  white-space: nowrap;
  animation: marquee-scroll 20s linear infinite;
}

.marquee-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--arena-black);
  letter-spacing: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.check-burst {
  width: 80px;
  height: 80px;
  animation: check-pop 0.6s var(--ease-bounce) forwards;
}

@keyframes check-pop {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.success-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  justify-content: center;
  flex: 1;
}

.success-msg {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white-hot);
  letter-spacing: 1px;
}

.success-sub {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--metal-silver-dim);
  letter-spacing: 1px;
  margin-bottom: 16px;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */

/* ─── MOBILE-FIRST: iPhone 13+ (390px+) ─── */
@media (max-width: 420px) {
  .screen-inner {
    padding: 48px 18px calc(52px + env(safe-area-inset-bottom, 0px));
  }

  .stage-content {
    gap: 24px;
    padding: 0 18px calc(52px + env(safe-area-inset-bottom, 0px));
  }

  .preview-inner {
    padding: 32px 16px calc(52px + env(safe-area-inset-bottom, 0px));
    gap: 14px;
  }

  .contract-frame {
    padding: 24px 18px;
  }

  .contract-label {
    font-size: 0.6rem;
    letter-spacing: 3px;
  }

  .contract-event {
    font-size: 0.75rem;
  }

  .step-num {
    font-size: 2.4rem;
  }

  .screen-headline {
    font-size: clamp(2rem, 8vw, 3.5rem);
    margin-bottom: 20px;
  }

  .mascot-grid {
    gap: 10px;
  }

  .mascot-card-inner {
    padding: 16px 10px 14px;
    min-height: 160px;
  }

  .mascot-avatar {
    width: 64px;
    height: 64px;
  }

  .mascot-name {
    font-size: 1.1rem;
  }
}

/* ─── SHORT VIEWPORTS (keyboard open or landscape) ─── */
@media (max-height: 700px) {
  .viewfinder-frame {
    max-height: 40dvh;
  }

  .reveal-frame,
  .reveal-image-wrap {
    max-height: 45dvh;
  }

  .preview-inner {
    gap: 10px;
  }

  .step-indicator {
    margin-bottom: 12px;
  }

  .screen-headline {
    margin-bottom: 16px;
  }
}

@media (min-width: 480px) {
  .mascot-grid {
    max-width: 440px;
    margin: 0 auto;
  }

  .upload-ring, .upload-preview {
    max-width: 280px;
  }
}

@media (min-width: 768px) {
  .screen-inner {
    max-width: 600px;
    margin: 0 auto;
    padding: 80px 32px calc(56px + env(safe-area-inset-bottom, 0px));
  }

  .mascot-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 560px;
  }

  .hero-headline {
    font-size: 6rem;
  }
}

/* ─── iOS KEYBOARD OPEN STATE ─── */
:root {
  --keyboard-offset: 0px;
}

body.keyboard-open .legal-footer {
  transform: translateY(100%);
  transition: transform 0.2s ease;
}

body.keyboard-open .screen-password .stage-content,
body.keyboard-open .screen-sms .screen-inner {
  justify-content: flex-start;
  padding-top: 20dvh;
}

body.keyboard-open .audio-toggle {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* ═══════════════════════════════════════════════════════
   UTILITY ANIMATIONS
   ═══════════════════════════════════════════════════════ */

.shake {
  animation: shake 0.5s var(--ease-slam);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* Bass drop effect on upload complete */
.bass-drop {
  animation: bass-drop 0.6s var(--ease-slam);
}

@keyframes bass-drop {
  0% { transform: scale(1); }
  15% { transform: scale(1.04); }
  30% { transform: scale(0.98); }
  50% { transform: scale(1.01); }
  100% { transform: scale(1); }
}

/* Arena power on sequence */
.power-on .light-beam {
  opacity: 0;
  animation: light-flick 0.15s ease forwards;
}

.power-on .beam-1 { animation-delay: 0.1s; }
.power-on .beam-2 { animation-delay: 0.25s; }
.power-on .beam-3 { animation-delay: 0.4s; }
.power-on .beam-4 { animation-delay: 0.55s; }
.power-on .beam-5 { animation-delay: 0.7s; }
.power-on .beam-6 { animation-delay: 0.85s; }

@keyframes light-flick {
  0% { opacity: 0; }
  40% { opacity: 0.8; }
  60% { opacity: 0.2; }
  100% { opacity: 1; }
}

/* Slam in from side */
.slam-in {
  animation: slam-in 0.4s var(--ease-slam);
}

@keyframes slam-in {
  0% { transform: translateX(100%) scale(0.8); opacity: 0; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}

/* Screen transition slam */
.screen.slam-enter {
  animation: screen-slam 0.5s var(--ease-slam) forwards;
}

@keyframes screen-slam {
  0% {
    opacity: 0;
    transform: scale(1.05) translateY(-10px);
    filter: brightness(2);
  }
  30% { filter: brightness(1.5); }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: brightness(1);
  }
}

/* Reveal parallax auto-animate */
.parallax-push {
  animation: parallax-push 3s ease-in-out infinite alternate;
}

@keyframes parallax-push {
  0% { transform: scale(1) translateY(0); }
  100% { transform: scale(1.008) translateY(-3px); }
}

/* ═══════════════════════════════════════════════════════
   CAMERA VIEWFINDER
   ═══════════════════════════════════════════════════════ */

.camera-viewfinder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.camera-viewfinder.hidden { display: none; }

.viewfinder-frame {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 3 / 4;
  max-height: 50dvh;
  overflow: hidden;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  background: var(--arena-black-deep);
  border: 2px solid var(--smoke-gray-light);
}

.viewfinder-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* Mirror for selfie */
}

.viewfinder-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

/* Corner brackets */
.viewfinder-corners {
  position: absolute;
  inset: 12px;
}

.corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--cricket-green);
  border-style: solid;
  border-width: 0;
  opacity: 0.7;
}

.corner-tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.corner-tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.corner-bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.corner-br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }

/* Face guide circle */
.face-guide {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 55%;
  aspect-ratio: 1;
  border: 1px dashed rgba(10, 255, 108, 0.2);
  border-radius: 50%;
}

/* Scan line animation */
.viewfinder-scanline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cricket-green), transparent);
  opacity: 0.3;
  z-index: 3;
  animation: scanline-sweep 3s ease-in-out infinite;
}

@keyframes scanline-sweep {
  0% { top: 0; }
  50% { top: 100%; }
  100% { top: 0; }
}

/* Camera flash animation */
.viewfinder-frame.flash::after {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  z-index: 10;
  animation: cam-flash 0.3s ease-out forwards;
}

@keyframes cam-flash {
  0% { opacity: 0.9; }
  100% { opacity: 0; }
}

/* Capture button */
.camera-controls {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

.btn-capture {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}

.btn-capture:active {
  transform: scale(0.9);
}

.capture-ring {
  position: absolute;
  inset: 0;
  border: 3px solid var(--cricket-green);
  border-radius: 50%;
}

.capture-dot {
  width: 52px;
  height: 52px;
  background: var(--cricket-green);
  border-radius: 50%;
  transition: transform 0.15s, background 0.15s;
}

.btn-capture:active .capture-dot {
  transform: scale(0.85);
  background: var(--cricket-green-dim);
}

/* Upload alt button */
.btn-upload-alt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--metal-silver-dim);
  text-transform: uppercase;
  padding: 12px 20px;
  min-height: 44px;
  transition: color 0.2s;
}

.btn-upload-alt:active {
  color: var(--cricket-green);
}

/* Upload fallback */
.upload-fallback.hidden { display: none; }

.upload-fallback {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════
   MASCOT CARD — IMAGE VERSION
   ═══════════════════════════════════════════════════════ */

.mascot-avatar {
  width: 80px;
  height: 80px;
  border-radius: 0;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  transition: transform 0.3s var(--ease-slam);
  position: relative;
}

.mascot-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
  transition: filter 0.3s, transform 0.3s var(--ease-slam);
}

.mascot-card.selected .mascot-avatar img {
  filter: drop-shadow(0 0 16px var(--cricket-green-glow)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
  transform: scale(1.1);
}

.mascot-card-inner {
  min-height: 180px;
}

/* ═══════════════════════════════════════════════════════
   CSS FALLBACK — No-WebGL Arena Background
   Static gradient + CSS beams + noise texture
   ═══════════════════════════════════════════════════════ */

body.arena-no-webgl {
  background:
    radial-gradient(ellipse at 50% 35%, rgba(31, 60, 136, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 10%, rgba(10, 255, 108, 0.04) 0%, transparent 35%),
    radial-gradient(ellipse at 80% 10%, rgba(10, 255, 108, 0.04) 0%, transparent 35%),
    radial-gradient(ellipse at 50% 90%, rgba(28, 31, 38, 0.6) 0%, transparent 40%),
    linear-gradient(180deg, #08080a 0%, #0e1018 35%, #0c0d12 60%, #0a0a0c 100%);
}

/* Fallback: static CSS noise pattern overlay */
body.arena-no-webgl::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* Fallback: vignette */
body.arena-no-webgl::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(5, 5, 7, 0.7) 100%);
}

/* Fallback scrim — darker for readability without WebGL */
body.arena-no-webgl #arena-scrim {
  opacity: 0.35;
}

/* ═══════════════════════════════════════════════════════
   ACCESSIBILITY: prefers-reduced-motion
   ═══════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  #arena-bg {
    /* WebGL will freeze via JS, but hide as extra safety */
  }

  #arena-overlay-truss {
    opacity: 0.03 !important;
  }

  .pyro-flash.fire {
    animation: none !important;
    opacity: 0 !important;
  }

  .arena-css-fallback .light-beam {
    animation: none !important;
    opacity: 0.5;
  }

  .arena-css-fallback .fog {
    animation: none !important;
  }

  .cta-flicker {
    animation: none !important;
  }

  .viewfinder-scanline {
    animation: none !important;
  }

  .scan-lines {
    animation: none !important;
  }

  .glitch-bar {
    animation: none !important;
  }

  .glitch-text::before,
  .glitch-text::after {
    animation: none !important;
    opacity: 0 !important;
  }
}

/* ═══════════════════════════════════════════════════════
   PERSISTENT LEGAL FOOTER
   ═══════════════════════════════════════════════════════ */

.legal-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9997;
  padding: 8px 24px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(5, 5, 7, 0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: var(--font-body);
  font-size: 0.55rem;
  color: var(--metal-silver-dim);
  letter-spacing: 0.3px;
  line-height: 1.5;
  text-align: center;
}

.legal-footer a {
  color: var(--metal-silver-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-footer a:active {
  color: var(--cricket-green);
}

/* ═══════════════════════════════════════════════════════
   FOCUS-VISIBLE STYLES (accessibility)
   ═══════════════════════════════════════════════════════ */

.cta-primary:focus-visible,
.cta-secondary:focus-visible,
.btn-retake:focus-visible,
.btn-upload-alt:focus-visible,
.btn-download:focus-visible,
.btn-capture:focus-visible,
.audio-toggle:focus-visible,
.mascot-card:focus-visible {
  outline: 2px solid var(--cricket-green);
  outline-offset: 3px;
}

.password-field input:focus-visible,
.phone-field input:focus-visible {
  outline: none; /* parent handles focus styling via :focus-within */
}

/* ═══════════════════════════════════════════════════════
   AUDIO TOGGLE
   ═══════════════════════════════════════════════════════ */

.audio-toggle {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: calc(12px + env(safe-area-inset-right, 0px));
  z-index: 9997;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 12, 0.5);
  border: 1px solid var(--smoke-gray-light);
  border-radius: 50%;
  color: var(--metal-silver-dim);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.audio-toggle:active {
  background: rgba(10, 255, 108, 0.1);
  border-color: var(--cricket-green);
  color: var(--cricket-green);
}

.audio-toggle .audio-icon {
  width: 18px;
  height: 18px;
}

/* Show/hide icons based on state */
.audio-toggle .audio-off { display: none; }
.audio-toggle.muted .audio-on { display: none; }
.audio-toggle.muted .audio-off { display: block; }
