/**
 * AI Wildlife Explorer — Official Figma Component Library
 * 1:1 Synchronized from Figma File "AI project" (vECyYCjCYZv5XIiWTXV0oG)
 */

/* =========================================
   1. GLOBAL BUTTON STYLES
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  border: none;
  border-radius: var(--r-pill);
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  transition: transform var(--t-fast), filter var(--t-fast);
  box-shadow: var(--shadow-btn);
}

.btn:active:not(:disabled) {
  transform: translateY(3px) scale(0.98);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Figma Home Buttons */
.home-btn-quest {
  width: min(240px, 72vw);
  height: clamp(54px, 7.8vh, 76px);
  background: var(--color-quest);
  color: #FFFFFF;
  font-size: clamp(22px, 3.2vh, 30px);
  margin: 0 auto;
}

.home-btn-explore {
  width: min(240px, 72vw);
  height: clamp(54px, 7.8vh, 76px);
  background: var(--color-explore);
  color: #FFFFFF;
  font-size: clamp(22px, 3.2vh, 30px);
  margin: 0 auto;
}

.home-btn-lb {
  width: min(300px, 86vw);
  height: clamp(54px, 7.8vh, 76px);
  background: var(--color-lb);
  color: #FFFFFF;
  font-size: clamp(22px, 3.2vh, 30px);
  margin: 0 auto;
}

/* Action button at bottom of screens (Mulai Quest, Cari, Lanjut, dll) */
.figma-btn-action {
  width: min(300px, 90vw);
  height: clamp(48px, 6.8vh, 60px);
  background: var(--color-quest);
  color: #FFFFFF;
  font-size: clamp(20px, 2.8vh, 26px);
  margin: 0 auto;
}

/* Modal action button (Buka Card, Coba Lagi) */
.modal-btn-action {
  width: 280px;
  height: 50px;
  font-size: 24px;
  color: #FFFFFF;
  border-radius: var(--r-pill);
}

.modal-btn-success {
  background: var(--color-success);
}

.modal-btn-danger {
  background: var(--color-danger);
}

/* Back button */
.btn-back-figma {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  background: #FFF8F0;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--color-text);
  cursor: pointer;
  z-index: 50;
}

.btn-back-figma:active {
  transform: scale(0.92);
}

/* =========================================
   2. TOP FLOATING BADGES (TIMER & TARGET)
   ========================================= */
.figma-top-bar {
  position: absolute;
  top: 22px;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 40;
  pointer-events: none;
}

.figma-top-bar > * {
  pointer-events: auto;
}

.figma-target-pill,
.figma-progress-pill {
  position: relative;
  overflow: hidden;
  width: 215px;
  height: 40px;
  background: #FFF8F0;
  border-radius: var(--r-pill);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  color: var(--color-text);
}

.figma-progress-fill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: 14%;
  max-width: calc(100% - 8px);
  background: var(--bg-yellow);
  border-radius: var(--r-pill);
  transition: width 300ms ease;
}

.figma-progress-text {
  position: relative;
  z-index: 1;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 15px;
  color: var(--color-text-card);
  text-shadow: 0 1px 0 rgba(255, 248, 240, 0.65);
}

.figma-timer-pill {
  width: 110px;
  height: 40px;
  background: #FFF8F0;
  border-radius: var(--r-pill);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  color: var(--color-text);
}

.figma-timer-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

/* =========================================
   3. SCREEN 1 — HOME
   ========================================= */
#screen-home {
  background: var(--bg-app);
  align-items: center;
  justify-content: space-evenly;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)) 16px;
  overflow: hidden;
}

.home-logo-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: clamp(6px, 1.5vh, 18px);
  max-height: 28vh;
}

.home-logo-figma {
  width: min(320px, 78vw);
  max-height: 25vh;
  height: auto;
  object-fit: contain;
}

.home-buttons-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 2vh, 22px);
}

.figma-btn-icon {
  width: clamp(28px, 4vh, 36px);
  height: clamp(28px, 4vh, 36px);
  object-fit: contain;
}

/* =========================================
   4. SCREEN 2 — INSTRUCTIONS
   ========================================= */
#screen-quest-instructions,
#screen-explore-instructions {
  background: var(--bg-app);
}

.figma-header-banner {
  background: var(--bg-yellow);
  width: 100%;
  height: clamp(165px, 24vh, 225px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  padding: 14px 16px 46px 16px;
}

.figma-banner-icon {
  width: clamp(46px, 6.2vh, 68px);
  height: clamp(46px, 6.2vh, 68px);
  object-fit: contain;
  margin-bottom: 6px;
}

.figma-banner-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 4.4vh, 42px);
  color: #F5F5F5;
  -webkit-text-stroke: 5px #E67C2E;
  paint-order: stroke fill;
  text-align: center;
  line-height: 1.1;
  text-shadow: 0 3px 4px rgba(0, 0, 0, 0.16);
}

.figma-instr-body {
  flex: 1;
  background: var(--bg-app);
  border-radius: 50px 50px 0 0;
  margin-top: -36px;
  position: relative;
  z-index: 2;
  padding: clamp(24px, 3.2vh, 34px) 24px max(22px, env(safe-area-inset-bottom)) 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  overflow-y: auto;
}

.figma-instr-steps {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.2vh, 24px);
}

.figma-step-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.figma-step-num {
  min-width: 24px;
  background: transparent;
  color: var(--color-quest);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  line-height: 1.25;
  flex-shrink: 0;
}

.figma-step-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--color-quest);
  margin-bottom: 4px;
  line-height: 1.2;
}

.figma-step-desc {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  color: var(--color-text-card);
  line-height: 1.45;
}

/* =========================================
   5. SCREEN 2b — NAME INPUT MODAL SCREEN
   ========================================= */
#screen-quest-name-input {
  background: var(--bg-yellow);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.nameinput-card-figma {
  width: 340px;
  max-width: 100%;
  background: var(--bg-app);
  border-radius: 40px;
  box-shadow: var(--shadow-modal);
  padding: 36px 24px 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.nameinput-title-figma {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  color: #F5F5F5;
  -webkit-text-stroke: 5px #E67C2E;
  paint-order: stroke fill;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.14);
  margin-bottom: 24px;
}

.nameinput-input-wrap {
  width: 100%;
  margin-bottom: 28px;
}

.nameinput-input-figma {
  width: 100%;
  height: 74px;
  background: linear-gradient(90deg, #FBB901 0%, #FFF146 46%, #FBB901 100%);
  border: 2px solid #FBB901;
  border-radius: 18px;
  padding: 0 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  color: #A24400;
  text-align: center;
  outline: none;
  box-shadow: inset 0 4px 4px rgba(0, 0, 0, 0.25);
}

.nameinput-input-figma::placeholder {
  color: rgba(162, 68, 0, 0.5);
}

.nameinput-input-figma:focus {
  border-color: var(--color-quest);
}

/* =========================================
   6. SCREEN 3 — CLUE VIEW
   ========================================= */
.clue-screen-figma {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-yellow);
  position: relative;
  overflow: hidden;
}

.clue-top-figma {
  width: 100%;
  flex: 1 1 48%;
  min-height: 220px;
  max-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 68px 16px clamp(12px, 2vh, 22px) 16px;
  position: relative;
}

.clue-heading-figma {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 3.8vh, 34px);
  color: #F5F5F5;
  -webkit-text-stroke: 5px #E67C2E;
  paint-order: stroke fill;
  text-shadow: 0 3px 4px rgba(0, 0, 0, 0.16);
  margin-bottom: clamp(8px, 1.4vh, 16px);
}

.clue-silhouette-box {
  width: min(360px, 88vw);
  height: clamp(165px, 25vh, 225px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.clue-silhouette-box svg,
.clue-silhouette-box img,
.silhouette-figma-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.18));
}

.clue-bottom-figma {
  flex: 1 1 55%;
  background: var(--bg-app);
  border-radius: 50px 50px 0 0;
  padding: clamp(22px, 2.8vh, 30px) 24px max(18px, env(safe-area-inset-bottom)) 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}

.clue-label-figma {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 2.8vh, 24px);
  color: var(--color-quest);
  margin-bottom: clamp(4px, 0.8vh, 8px);
}

.clue-desc-figma {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(14px, 2vh, 17px);
  color: var(--color-text-card);
  line-height: 1.45;
  margin-bottom: 8px;
}

.clue-list-figma {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: decimal;
}

.clue-list-figma li {
  padding-left: 2px;
}

.clue-actions-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.clue-sub-actions {
  display: flex;
  gap: 12px;
  width: min(300px, 90vw);
}

/* =========================================
   7. CAMERA DETECTION SCREEN & OVERLAY
   ========================================= */
.camera-gameplay-viewport,
.quest-camera-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--color-camera-bg);
}

.camera-video,
.quest-camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.camera-video.mirrored,
.quest-camera-video.mirrored {
  transform: scaleX(-1);
}

.camera-canvas,
.quest-camera-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

/* Bottom hint card in camera (Figma Rectangle 1: 337x86) */
.camera-bottom-hint-card {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 337px;
  max-width: 90%;
  background: #FFF8F0;
  border-radius: 24px;
  box-shadow: var(--shadow-modal);
  padding: 16px 20px;
  z-index: 35;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.camera-hint-text {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  color: var(--color-text-card);
}

.camera-streak-bar {
  width: 100%;
  height: 8px;
  background: #EEDCC5;
  border-radius: 4px;
  overflow: hidden;
}

.camera-streak-fill {
  width: 0%;
  height: 100%;
  background: var(--color-explore);
  border-radius: 4px;
  transition: width 100ms linear;
}

/* =========================================
   CAMERA TAP-TO-FOCUS & ZOOM CONTROLS
   ========================================= */
.camera-focus-ring {
  position: absolute;
  width: 64px;
  height: 64px;
  border: 2px solid #FFD027;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1.4);
  pointer-events: none;
  z-index: 45;
  box-shadow: 0 0 10px rgba(255, 208, 39, 0.6), inset 0 0 8px rgba(255, 208, 39, 0.3);
  animation: cameraFocusPulse 0.8s ease-out forwards;
}

.camera-focus-ring::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: #FFD027;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

@keyframes cameraFocusPulse {
  0% {
    transform: translate(-50%, -50%) scale(1.4);
    opacity: 0.9;
  }
  35% {
    transform: translate(-50%, -50%) scale(0.95);
    opacity: 1;
  }
  70% {
    transform: translate(-50%, -50%) scale(1.0);
    opacity: 0.85;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.05);
    opacity: 0;
  }
}

/* Floating Zoom Pill Control */
.camera-zoom-pill {
  position: absolute;
  bottom: 122px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(30, 24, 18, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 4px 6px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 36;
  user-select: none;
  -webkit-user-select: none;
}

.camera-zoom-btn {
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 38px;
  text-align: center;
}

.camera-zoom-btn:active {
  transform: scale(0.92);
}

.camera-zoom-btn.active {
  background: #FFD027;
  color: #2D2319;
  box-shadow: 0 2px 8px rgba(255, 208, 39, 0.4);
}

/* =========================================
   8. VALIDATION MODAL OVERLAY
   ========================================= */
.wl-validation-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-camera-ov);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 20px;
}

.wl-validation-card {
  width: 335px;
  max-width: 100%;
  background: #FFF8F0;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-modal);
  padding: 30px 20px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: modalPopIn var(--t-spring);
}

@keyframes modalPopIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

.wl-validation-icon-circle {
  width: 66px;
  height: 66px;
  border-radius: var(--r-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.wl-validation-icon-circle.success {
  background: var(--color-success);
}

.wl-validation-icon-circle.danger {
  background: var(--color-danger);
}

.wl-validation-icon-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.wl-validation-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 20px;
}

.wl-validation-title.success {
  color: var(--color-success);
}

.wl-validation-title.danger {
  color: var(--color-danger);
}

/* =========================================
   9. DISCOVERY CARD MODAL
   ========================================= */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-camera-ov);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 90;
  padding: 16px;
}

.modal-overlay.active,
.modal-overlay.open {
  display: flex;
}

.discovery-modal-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: min(345px, 92vw);
  max-height: 94dvh;
  animation: modalPopIn var(--t-spring);
}

.discovery-card-figma {
  width: 100%;
  background: linear-gradient(135deg, #FDD523 0%, #FFF146 68.75%, #FBB901 100%);
  border-radius: 25px;
  box-shadow: var(--shadow-modal);
  padding: 10px;
  overflow: hidden;
}

.discovery-card-inner-figma {
  width: 100%;
  max-height: calc(92dvh - 105px);
  overflow-y: auto;
  background: #FFF8F0;
  border-radius: 20px;
  padding: 18px 16px 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.discovery-image-box {
  width: 100%;
  height: 170px;
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 12px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.discovery-image-box svg,
.discovery-image-box img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.discovery-badge-figma {
  width: 100%;
  max-width: 280px;
  min-height: 48px;
  padding: 6px 14px;
  background: linear-gradient(90deg, #FBB901 0%, #FFF146 46%, #FBB901 100%);
  box-shadow: inset 0 4px 4px rgba(0, 0, 0, 0.25);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  color: #A24400;
  margin-bottom: 12px;
}

/* ── Audio Narration Pill Player ───────────────────────── */
.narration-player-pill {
  width: 267px;
  background: #FFF0D6;
  border: 1.5px solid var(--color-quest-lt);
  border-radius: var(--r-pill);
  padding: 6px 14px 6px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 2px 5px rgba(230, 124, 46, 0.12);
  transition: transform var(--t-fast), background var(--t-fast);
}

.narration-player-pill:hover {
  background: #FFE8C2;
}

.narration-player-pill:active {
  transform: scale(0.98);
}

.narration-play-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  background: var(--color-quest);
  border: none;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: transform var(--t-fast);
}

.narration-play-btn:active {
  transform: scale(0.92);
}

.narration-info {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

.narration-label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  color: var(--color-quest-dk);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Soundwave bars animation */
.soundwave-bars {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 16px;
}

.soundwave-bars .bar {
  width: 3px;
  height: 4px;
  background: var(--color-quest);
  border-radius: 2px;
  transition: height 150ms ease;
}

.narration-player-pill.playing .soundwave-bars .bar {
  animation: soundwaveBounce 0.8s ease-in-out infinite alternate;
}

.narration-player-pill.playing .soundwave-bars .bar:nth-child(1) { animation-delay: 0.1s; }
.narration-player-pill.playing .soundwave-bars .bar:nth-child(2) { animation-delay: 0.3s; }
.narration-player-pill.playing .soundwave-bars .bar:nth-child(3) { animation-delay: 0.5s; }
.narration-player-pill.playing .soundwave-bars .bar:nth-child(4) { animation-delay: 0.2s; }
.narration-player-pill.playing .soundwave-bars .bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes soundwaveBounce {
  0%   { height: 4px; }
  50%  { height: 16px; }
  100% { height: 6px; }
}

.discovery-desc-figma {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14.5px;
  color: #A24400;
  line-height: 1.5;
  margin-bottom: 4px;
  text-align: center;
}

/* =========================================
   10. SCREEN 6 — COMPLETION SCREEN
   ========================================= */
#screen-quest-completion {
  background: var(--bg-app);
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  overflow: hidden;
}

.completion-top-wrap {
  width: 100%;
  flex: 0 0 42%;
  min-height: 220px;
  padding: clamp(32px, 6vh, 72px) 24px clamp(16px, 2.5vh, 28px) 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-shrink: 0;
}

.completion-title-figma {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 5.5vh, 48px);
  color: #F5F5F5;
  -webkit-text-stroke: 5px #E67C2E;
  paint-order: stroke fill;
  text-shadow: 0 3px 4px rgba(0, 0, 0, 0.16);
  margin-bottom: clamp(10px, 1.4vh, 16px);
}

.completion-sub-figma {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(16px, 2.2vh, 20px);
  color: var(--color-quest);
  line-height: 1.4;
  max-width: 280px;
  margin-bottom: 0;
}

.completion-sheet-figma {
  flex: 1;
  width: 100%;
  background: var(--bg-yellow);
  border-radius: 50px 50px 0 0;
  padding: clamp(34px, 5vh, 52px) 24px clamp(36px, 7vh, 76px) 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow-y: auto;
}

.completion-stat-card-figma {
  width: min(335px, 90vw);
  background: #FFF8F0;
  border-radius: 25px;
  box-shadow: var(--shadow-modal);
  padding: clamp(20px, 2.8vh, 30px) 18px;
  display: flex;
  justify-content: space-around;
  text-align: center;
  margin-bottom: 20px;
}

.stat-item-label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(14px, 1.7vh, 16px);
  color: var(--color-quest);
  margin-bottom: 6px;
}

.stat-item-val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 4.4vh, 46px);
  color: var(--color-quest);
}

/* =========================================
   11. SCREEN 7 — LEADERBOARD SCREEN
   ========================================= */
#screen-leaderboard {
  background: var(--bg-app);
  padding: 0;
  overflow: hidden;
}

.lb-top-banner-figma {
  width: 100%;
  padding: clamp(16px, 2.8vh, 28px) 16px clamp(12px, 2vh, 20px) 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex-shrink: 0;
}

.lb-trophy-figma {
  width: clamp(54px, 7.5vh, 78px);
  height: clamp(54px, 7.5vh, 78px);
  object-fit: contain;
  margin-bottom: 4px;
}

.lb-title-figma {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 4.4vh, 44px);
  color: #F5F5F5;
  -webkit-text-stroke: 5px #E67C2E;
  paint-order: stroke fill;
  text-shadow: 0 3px 4px rgba(0, 0, 0, 0.16);
  margin-bottom: 0;
}

.lb-sheet-figma {
  flex: 1;
  width: 100%;
  background: var(--bg-yellow);
  border-radius: 50px 50px 0 0;
  padding: 24px 20px 0 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lb-list-figma {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 4px 0 max(24px, env(safe-area-inset-bottom)) 0;
}

.lb-row-figma {
  width: min(320px, 88vw);
  min-height: 52px;
  background: #FFFFFF;
  border-radius: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}

.lb-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lb-rank-circle {
  width: 30px;
  height: 30px;
  border-radius: var(--r-pill);
  background: #F5F5F5;
  border: 2px solid #FBB901;
  color: #BF6731;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-rank-circle.top1 {
  background: #FFF200;
  border-color: #E67C2E;
  color: #BF6731;
}

.lb-rank-circle.top2 {
  background: #B6B8B7;
  border-color: #B6B8B7;
  color: #FFFFFF;
}

.lb-rank-circle.top3 {
  background: #D27C4F;
  border-color: #D27C4F;
  color: #FFFFFF;
}

.lb-player-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--color-text-lb);
}

.lb-player-time {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  color: #2B2B2B;
}
