/* ============================================
   후쿠오카 여행 시뮬레이션 게임 스타일
   eye book 테마 변수 활용
   ============================================ */

/* 게임 전체 컨테이너 */
.fkg {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: var(--night);
  color: var(--sand);
  font-family: var(--font-main);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.fkg * { box-sizing: border-box; }

/* ── 타이틀 화면 ── */
.fkg-title {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.fkg-title-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.4) saturate(1.2);
  z-index: 0;
}
.fkg-title-content {
  position: relative;
  z-index: 1;
  padding: 2rem;
}
.fkg-title h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.6);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}
.fkg-title .fkg-subtitle {
  font-size: clamp(0.9rem, 2.5vw, 1.2rem);
  color: rgba(255,255,255,0.8);
  margin-bottom: 2rem;
}
.fkg-title-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

/* ── 공통 버튼 ── */
.fkg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 200px;
}
.fkg-btn:active { transform: scale(0.96); }
.fkg-btn-primary {
  background: linear-gradient(135deg, #F4C542, #D97706);
  color: #111;
}
.fkg-btn-primary:hover { background: linear-gradient(135deg, #FFE17A, #F4C542); }
.fkg-btn-secondary {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}
.fkg-btn-secondary:hover { background: rgba(255,255,255,0.2); }
.fkg-btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  min-width: auto;
  border-radius: 8px;
}
.fkg-btn-danger {
  background: rgba(232,93,117,0.2);
  color: var(--rose-light);
  border: 1px solid rgba(232,93,117,0.3);
}

/* ── 설정(Setup) 화면 ── */
.fkg-setup {
  max-width: 500px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.fkg-setup h2 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--gold);
}
.fkg-setup label {
  display: block;
  font-size: 0.9rem;
  color: var(--sand-muted);
  margin-bottom: 0.4rem;
}
.fkg-input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: var(--sand);
  font-size: 1rem;
  font-family: var(--font-main);
  outline: none;
  margin-bottom: 1.2rem;
  transition: border-color 0.2s;
}
.fkg-input:focus { border-color: var(--gold); }
.fkg-budget-cards {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.fkg-budget-card {
  padding: 1rem;
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: all 0.2s;
}
.fkg-budget-card:hover { border-color: rgba(244,197,66,0.4); background: rgba(255,255,255,0.08); }
.fkg-budget-card.selected {
  border-color: var(--gold);
  background: rgba(244,197,66,0.1);
}
.fkg-budget-card h3 {
  font-size: 1rem;
  margin: 0 0 0.3rem;
  color: var(--gold-light);
}
.fkg-budget-card p {
  font-size: 0.8rem;
  margin: 0;
  color: var(--sand-muted);
}

/* ── HUD (게임 중 상단 정보) ── */
.fkg-hud {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,16,38,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 0.5rem 1rem;
}
.fkg-hud-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.fkg-hud-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
}
.fkg-hud-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
}
.fkg-hud-day {
  font-weight: 700;
  color: var(--gold);
}
.fkg-hud-time {
  color: var(--sand-muted);
}
.fkg-hud-weather {
  font-size: 1.1rem;
}
.fkg-hud-stat {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.fkg-stat-bar {
  width: 50px;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
}
.fkg-stat-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.fkg-stat-fill.energy { background: linear-gradient(90deg, #34D399, #10B981); }
.fkg-stat-fill.hunger { background: linear-gradient(90deg, #FB923C, #F97316); }
.fkg-stat-fill.happiness { background: linear-gradient(90deg, #F472B6, #EC4899); }
.fkg-stat-fill.stress { background: linear-gradient(90deg, #F87171, #EF4444); }
.fkg-hud-budget {
  color: var(--gold);
  font-weight: 600;
}

/* ── 맵 화면 ── */
.fkg-map {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 1rem;
}
.fkg-map-container {
  position: relative;
  width: 100%;
  aspect-ratio: 5/4;
  background: linear-gradient(180deg, #1a2a4a 0%, #0d1b2a 100%);
  background-size: cover;
  background-position: center;
  border-radius: 16px;
  overflow: visible;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 28px;
}
.fkg-map-grid {
  position: absolute;
  inset: 0;
  background: rgba(11,16,38,0.35);
  border-radius: 16px;
}
.fkg-map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  border-radius: 50%;
  background: rgba(11,16,38,0.92);
  border: 2px solid rgba(255,255,255,0.35);
  transition: all 0.3s ease;
  z-index: 2;
  overflow: hidden;
}
.fkg-map-pin:hover {
  transform: translate(-50%, -50%) scale(1.15);
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(244,197,66,0.4);
  z-index: 5;
}
.fkg-map-pin.visited {
  border-color: var(--sage);
  opacity: 0.7;
}
.fkg-map-pin.locked {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(1);
}
.fkg-map-pin.hidden-loc {
  border-color: #A855F7;
  animation: fkg-glow 2s ease-in-out infinite;
}
.fkg-map-pin-label {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  white-space: nowrap;
  color: var(--sand-muted);
  text-shadow: 0 1px 4px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.7);
  pointer-events: none;
  z-index: 3;
}
.fkg-map-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* ── 씬(장소 방문) 화면 ── */
.fkg-scene {
  max-width: 700px;
  margin: 0 auto;
  padding: 0;
}
.fkg-scene-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}
.fkg-scene-body {
  padding: 1.5rem;
}
.fkg-scene-loc {
  font-size: 0.75rem;
  color: var(--gold);
  margin-bottom: 0.3rem;
}
.fkg-scene-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
}
.fkg-scene-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--sand);
  margin-bottom: 1.5rem;
  min-height: 3em;
}
.fkg-scene-text .typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--gold);
  animation: fkg-blink 0.8s infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}
.fkg-choices {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.fkg-choice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}
.fkg-choice:hover { border-color: var(--gold); background: rgba(244,197,66,0.06); }
.fkg-choice.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
.fkg-choice-icon { font-size: 1.4rem; flex-shrink: 0; }
.fkg-choice-body { flex: 1; }
.fkg-choice-text { font-size: 0.9rem; font-weight: 600; color: #fff; }
.fkg-choice-desc { font-size: 0.75rem; color: var(--sand-muted); margin-top: 0.15rem; }

/* ── 미니게임 공통 ── */
.fkg-minigame {
  max-width: 500px;
  margin: 0 auto;
  padding: 1.5rem;
  text-align: center;
}
.fkg-minigame h3 {
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 1rem;
}
.fkg-minigame-area {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.fkg-gauge-container {
  position: relative;
  width: 100%;
  height: 40px;
  background: rgba(255,255,255,0.08);
  border-radius: 20px;
  overflow: hidden;
  margin: 1rem 0;
}
.fkg-gauge-target {
  position: absolute;
  height: 100%;
  background: rgba(52,211,153,0.3);
  border-left: 2px solid #34D399;
  border-right: 2px solid #34D399;
}
.fkg-gauge-needle {
  position: absolute;
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: none;
}

/* 라멘 커스터마이저 */
.fkg-ramen-options {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  text-align: left;
}
.fkg-ramen-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.fkg-ramen-opt label {
  font-size: 0.85rem;
  color: var(--sand);
  min-width: 80px;
}
.fkg-ramen-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  outline: none;
}
.fkg-ramen-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--gold);
  border-radius: 50%;
  cursor: pointer;
}
.fkg-ramen-val {
  font-size: 0.75rem;
  color: var(--gold);
  min-width: 60px;
  text-align: right;
}

/* 쇼핑 흥정 슬라이더 */
.fkg-haggle-display {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  margin: 1rem 0;
}
.fkg-haggle-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: linear-gradient(90deg, #34D399, #F4C542, #EF4444);
  border-radius: 4px;
  outline: none;
}
.fkg-haggle-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* 사진 타이밍 */
.fkg-photo-frame {
  position: relative;
  width: 100%;
  height: 200px;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  overflow: hidden;
  margin: 1rem 0;
}
.fkg-photo-viewfinder {
  position: absolute;
  width: 80px;
  height: 80px;
  border: 3px solid var(--gold);
  border-radius: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}
.fkg-photo-target {
  position: absolute;
  width: 60px;
  height: 60px;
  border: 2px dashed rgba(52,211,153,0.6);
  border-radius: 8px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 사투리 퀴즈 */
.fkg-quiz-question {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
}
.fkg-quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.fkg-quiz-opt {
  padding: 0.7rem 1rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  font-size: 0.9rem;
  text-align: left;
  transition: all 0.2s;
  color: var(--sand);
}
.fkg-quiz-opt:hover { border-color: var(--gold); }
.fkg-quiz-opt.correct { border-color: #34D399; background: rgba(52,211,153,0.15); color: #34D399; }
.fkg-quiz-opt.wrong { border-color: #EF4444; background: rgba(239,68,68,0.15); color: #EF4444; }
.fkg-quiz-progress {
  font-size: 0.75rem;
  color: var(--sand-muted);
  margin-bottom: 0.5rem;
}

/* ── 등급 표시 ── */
.fkg-grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.5rem;
}
.fkg-grade-s { background: linear-gradient(135deg, #F4C542, #FB923C); color: #111; }
.fkg-grade-a { background: linear-gradient(135deg, #34D399, #10B981); color: #111; }
.fkg-grade-b { background: linear-gradient(135deg, #60A5FA, #3B82F6); color: #fff; }
.fkg-grade-c { background: rgba(255,255,255,0.15); color: var(--sand-muted); }

/* ── 이벤트 팝업 ── */
.fkg-event {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  padding: 1rem;
}
.fkg-event-card {
  max-width: 400px;
  width: 100%;
  background: var(--night-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  animation: fkg-pop 0.3s ease;
}
.fkg-event-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.fkg-event-title { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.fkg-event-desc { font-size: 0.9rem; color: var(--sand-muted); margin-bottom: 1.2rem; line-height: 1.5; }
.fkg-event-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 1rem;
}
.fkg-event-effect {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
}
.fkg-event-effect.positive { color: #34D399; }
.fkg-event-effect.negative { color: #F87171; }

/* ── NPC 대화 ── */
.fkg-npc-dialog {
  max-width: 500px;
  margin: 0 auto;
  padding: 1.5rem;
}
.fkg-npc-portrait {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
}
.fkg-npc-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}
.fkg-npc-info h4 { font-size: 1rem; color: #fff; margin: 0 0 0.2rem; }
.fkg-npc-info p { font-size: 0.8rem; color: var(--sand-muted); margin: 0; }
.fkg-npc-speech {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--sand);
  padding: 1rem;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  border-left: 3px solid var(--gold);
  margin-bottom: 1rem;
}

/* ── 엔딩 화면 ── */
.fkg-ending {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  text-align: center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.fkg-ending-stars {
  font-size: 2rem;
  letter-spacing: 0.3rem;
  margin-bottom: 0.5rem;
}
.fkg-ending h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.fkg-ending-subtitle {
  font-size: 1rem;
  color: var(--sand-muted);
  margin-bottom: 2rem;
}
.fkg-ending-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.fkg-ending-stat {
  padding: 0.8rem;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
}
.fkg-ending-stat-label {
  font-size: 0.7rem;
  color: var(--sand-muted);
  margin-bottom: 0.2rem;
}
.fkg-ending-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

/* 스탬프 컬렉션 */
.fkg-stamps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin: 1rem 0;
}
.fkg-stamp {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
}
.fkg-stamp.collected {
  background: rgba(244,197,66,0.15);
  border-color: var(--gold);
}

/* ── 날씨 파티클 ── */
.fkg-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  overflow: hidden;
}
.fkg-particle {
  position: absolute;
  opacity: 0.6;
}
.fkg-particle-petal {
  width: 8px;
  height: 8px;
  background: #FFB7C5;
  border-radius: 50% 0 50% 50%;
  animation: fkg-fall 4s linear infinite;
}
.fkg-particle-rain {
  width: 2px;
  height: 16px;
  background: linear-gradient(180deg, transparent, rgba(150,200,255,0.6));
  animation: fkg-rain 0.6s linear infinite;
}

/* ── 알림 토스트 ── */
.fkg-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  animation: fkg-slideDown 0.3s ease, fkg-slideUp 0.3s ease 2.5s forwards;
  pointer-events: none;
}
.fkg-toast-info { background: rgba(59,130,246,0.9); color: #fff; }
.fkg-toast-success { background: rgba(16,185,129,0.9); color: #fff; }
.fkg-toast-warning { background: rgba(245,158,11,0.9); color: #111; }
.fkg-toast-danger { background: rgba(239,68,68,0.9); color: #fff; }

/* ── 스탯 변화 플로팅 텍스트 ── */
.fkg-float-text {
  position: fixed;
  z-index: 150;
  font-size: 1rem;
  font-weight: 700;
  pointer-events: none;
  animation: fkg-floatUp 1.2s ease forwards;
}
.fkg-float-text.positive { color: #34D399; }
.fkg-float-text.negative { color: #F87171; }

/* ── 세이브 인디케이터 ── */
.fkg-save-indicator {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  font-size: 0.7rem;
  color: var(--sand-muted);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 60;
}
.fkg-save-indicator.show { opacity: 1; }

/* ── 스크롤바 커스텀 ── */
.fkg::-webkit-scrollbar { width: 4px; }
.fkg::-webkit-scrollbar-track { background: transparent; }
.fkg::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ── 애니메이션 ── */
@keyframes fkg-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
@keyframes fkg-glow {
  0%, 100% { box-shadow: 0 0 6px rgba(168,85,247,0.3); }
  50% { box-shadow: 0 0 16px rgba(168,85,247,0.6); }
}
@keyframes fkg-pop {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes fkg-fall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 0.7; }
  100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}
@keyframes fkg-rain {
  0% { transform: translateY(-20px); opacity: 0.8; }
  100% { transform: translateY(100vh); opacity: 0; }
}
@keyframes fkg-slideDown {
  0% { transform: translateX(-50%) translateY(-20px); opacity: 0; }
  100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}
@keyframes fkg-slideUp {
  0% { opacity: 1; }
  100% { transform: translateX(-50%) translateY(-20px); opacity: 0; }
}
@keyframes fkg-floatUp {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-40px); }
}
@keyframes fkg-fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes fkg-slideIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}
.fkg-fadeIn { animation: fkg-fadeIn 0.4s ease; }
.fkg-slideIn { animation: fkg-slideIn 0.4s ease; }

/* ── AI 이미지 관련 ── */
.fkg-scene-img-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.fkg-ai-img-overlay {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
  z-index: 1;
}
.fkg-ai-img-overlay.loaded { opacity: 1; }
.fkg-img-loading {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  border-radius: 20px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.7);
  z-index: 3;
}
.fkg-loading-dots {
  display: flex;
  gap: 3px;
}
.fkg-loading-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold, #F4C542);
  animation: fkg-dot-bounce 1.2s ease-in-out infinite;
}
.fkg-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.fkg-loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes fkg-dot-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-8px); opacity: 1; }
}

/* AI 타이틀 배경 */
.fkg-ai-title-bg {
  opacity: 0;
  transition: opacity 1.5s ease;
  z-index: 0;
}
.fkg-title-badge {
  display: inline-block;
  padding: 3px 12px;
  background: linear-gradient(135deg, rgba(244,197,66,0.2), rgba(168,85,247,0.2));
  border: 1px solid rgba(244,197,66,0.3);
  border-radius: 20px;
  font-size: 0.7rem;
  color: var(--gold, #F4C542);
  margin-bottom: 0.8rem;
  letter-spacing: 0.1em;
}
.fkg-subtitle-sm {
  font-size: clamp(0.7rem, 1.5vw, 0.85rem);
  color: rgba(255,255,255,0.5);
  margin-bottom: 1.5rem;
}

/* NPC AI 포트레이트 */
.fkg-npc-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.fkg-npc-avatar.has-portrait {
  width: 80px;
  height: 80px;
  border: 2px solid var(--gold, #F4C542);
  box-shadow: 0 0 15px rgba(244,197,66,0.3);
  overflow: hidden;
}

/* 맵 핀 AI 썸네일 */
.fkg-map-pin-emoji {
  position: relative;
  z-index: 2;
  transition: opacity 0.3s;
}
.fkg-map-pin-thumb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}
.fkg-map-pin-thumb.has-thumb {
  opacity: 1;
}
/* 썸네일이 로드되면 이모지 숨김 */
.fkg-map-pin:has(.has-thumb) .fkg-map-pin-emoji {
  opacity: 0;
}

/* AI 엔딩 이미지 */
.fkg-ending-ai-img {
  width: 100%;
  max-height: 280px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255,255,255,0.1);
}
.fkg-ending-ai-img img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

/* ── 반응형 ── */
@media (max-width: 767px) {
  .fkg-hud { padding: 0.4rem 0.6rem; }
  .fkg-hud-left { font-size: 0.7rem; }
  .fkg-hud-right { font-size: 0.65rem; }
  .fkg-stat-bar { width: 36px; height: 5px; }
  .fkg-scene-img { height: 180px; }
  .fkg-ai-img-overlay { height: 180px; }
  .fkg-scene-body { padding: 1rem; }
  .fkg-scene-title { font-size: 1.1rem; }
  .fkg-ending h2 { font-size: 1.4rem; }
  .fkg-ending-stats { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
  .fkg-ending-ai-img { max-height: 180px; }
  .fkg-ending-ai-img img { height: 180px; }
  .fkg-map-pin { width: 36px; height: 36px; font-size: 1rem; }
  .fkg-map-pin-label { font-size: 0.75rem; bottom: -16px; }
  .fkg-npc-avatar.has-portrait { width: 64px; height: 64px; }
}
@media (min-width: 768px) {
  .fkg-scene-img { height: 350px; }
  .fkg-ai-img-overlay { height: 350px; }
  .fkg-ending-stats { grid-template-columns: repeat(4, 1fr); }
  .fkg-ending-ai-img { max-height: 320px; }
  .fkg-ending-ai-img img { height: 320px; }
  .fkg-npc-avatar.has-portrait { width: 100px; height: 100px; }
}

/* ── 활동 결과 화면 ── */
.fkg-result {
  max-width: 700px;
  margin: 0 auto;
  padding: 0;
}
.fkg-result-img-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.fkg-result-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(11,16,38,0.85) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 1rem;
  z-index: 2;
}
.fkg-result-overlay-icon {
  font-size: 3rem;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.6));
  animation: fkg-result-bounce 0.6s ease;
}
@keyframes fkg-result-bounce {
  0% { transform: scale(0) rotate(-15deg); opacity: 0; }
  50% { transform: scale(1.3) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.fkg-result-body {
  padding: 1.5rem;
  text-align: center;
}
.fkg-result-loc {
  font-size: 0.75rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
}
.fkg-result-activity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.fkg-result-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}
.fkg-result-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--sand);
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  border-left: 3px solid var(--gold);
  text-align: left;
  min-height: 2.5em;
}
.fkg-result-companion {
  font-size: 0.8rem;
  color: var(--sand-muted);
  padding: 0.5rem 0.8rem;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  margin-bottom: 0.8rem;
  font-style: italic;
}
.fkg-result-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  transition: opacity 0.4s ease;
}
.fkg-result-tag {
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  font-weight: 600;
  animation: fkg-tagPop 0.3s ease backwards;
}
.fkg-result-tag:nth-child(1) { animation-delay: 0s; }
.fkg-result-tag:nth-child(2) { animation-delay: 0.08s; }
.fkg-result-tag:nth-child(3) { animation-delay: 0.16s; }
.fkg-result-tag:nth-child(4) { animation-delay: 0.24s; }
.fkg-result-tag:nth-child(5) { animation-delay: 0.32s; }
@keyframes fkg-tagPop {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.fkg-result-tag.positive {
  background: rgba(52,211,153,0.12);
  color: #34D399;
  border: 1px solid rgba(52,211,153,0.2);
}
.fkg-result-tag.negative {
  background: rgba(248,113,113,0.12);
  color: #F87171;
  border: 1px solid rgba(248,113,113,0.2);
}

/* ── MBTI 카드 ── */
.fkg-mbti-card {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(168,85,247,0.08), rgba(244,197,66,0.06));
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: 16px;
  text-align: left;
}
.fkg-mbti-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}
.fkg-mbti-emoji {
  font-size: 2.5rem;
}
.fkg-mbti-label {
  font-size: 0.7rem;
  color: var(--sand-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.fkg-mbti-type {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.15em;
}
.fkg-mbti-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.fkg-mbti-desc {
  font-size: 0.85rem;
  color: var(--sand);
  line-height: 1.6;
  margin-bottom: 1.2rem;
}
.fkg-mbti-axes {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.fkg-mbti-axis-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-bottom: 0.2rem;
}
.fkg-mbti-axis-letter {
  color: var(--sand-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.fkg-mbti-axis-letter.active {
  color: var(--gold);
  font-weight: 700;
}
.fkg-mbti-axis-letter small {
  font-weight: 400;
  font-size: 0.65rem;
}
.fkg-mbti-axis-letter em {
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 700;
  opacity: 0.7;
}
.fkg-mbti-bar {
  width: 100%;
  height: 10px;
  background: rgba(255,255,255,0.08);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}
.fkg-mbti-bar-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--gold), #A855F7);
  animation: fkg-barGrow 1.2s ease forwards;
  transform-origin: left;
}
@keyframes fkg-barGrow {
  0% { width: 50% !important; }
}
.fkg-mbti-axis:nth-child(1) .fkg-mbti-bar-fill { animation-delay: 0.2s; }
.fkg-mbti-axis:nth-child(2) .fkg-mbti-bar-fill { animation-delay: 0.4s; }
.fkg-mbti-axis:nth-child(3) .fkg-mbti-bar-fill { animation-delay: 0.6s; }
.fkg-mbti-axis:nth-child(4) .fkg-mbti-bar-fill { animation-delay: 0.8s; }

/* ── 맵 상태 바 ── */
.fkg-map-status-bar {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
  padding: 0.6rem 1rem;
  margin-bottom: 0.5rem;
  background: rgba(244,197,66,0.06);
  border: 1px solid rgba(244,197,66,0.15);
  border-radius: 12px;
  letter-spacing: 0.03em;
}

/* ── 도전과제(트로피) ── */
.fkg-trophies {
  margin: 1.5rem 0;
  padding: 1.2rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
}
.fkg-trophies-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.8rem;
  text-align: center;
}
.fkg-trophies-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}
.fkg-trophy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.5rem 0.25rem;
  border-radius: 10px;
  transition: transform 0.2s;
}
.fkg-trophy.achieved {
  background: rgba(244,197,66,0.08);
  border: 1px solid rgba(244,197,66,0.2);
  animation: fkg-trophyPop 0.5s ease backwards;
}
.fkg-trophy.locked {
  opacity: 0.35;
}
.fkg-trophy:nth-child(1) { animation-delay: 0s; }
.fkg-trophy:nth-child(2) { animation-delay: 0.05s; }
.fkg-trophy:nth-child(3) { animation-delay: 0.1s; }
.fkg-trophy:nth-child(4) { animation-delay: 0.15s; }
.fkg-trophy:nth-child(5) { animation-delay: 0.2s; }
.fkg-trophy:nth-child(6) { animation-delay: 0.25s; }
.fkg-trophy:nth-child(7) { animation-delay: 0.3s; }
.fkg-trophy:nth-child(8) { animation-delay: 0.35s; }
.fkg-trophy:nth-child(9) { animation-delay: 0.4s; }
.fkg-trophy:nth-child(10) { animation-delay: 0.45s; }
@keyframes fkg-trophyPop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}
.fkg-trophy-badge {
  font-size: 1.5rem;
}
.fkg-trophy-name {
  font-size: 0.55rem;
  color: var(--sand-muted);
  text-align: center;
  line-height: 1.2;
}
.fkg-trophy.achieved .fkg-trophy-name {
  color: var(--gold);
}

@media (max-width: 767px) {
  .fkg-result-body { padding: 1rem; }
  .fkg-result-icon { font-size: 1.6rem; }
  .fkg-result-name { font-size: 1rem; }
  .fkg-mbti-type { font-size: 1.3rem; }
  .fkg-mbti-emoji { font-size: 2rem; }
  .fkg-trophies-grid { grid-template-columns: repeat(5, 1fr); gap: 0.3rem; }
  .fkg-trophy-badge { font-size: 1.2rem; }
  .fkg-trophy-name { font-size: 0.75rem; }
  .fkg-map-status-bar { font-size: 0.8rem; padding: 0.4rem 0.6rem; }
}
