﻿/* ==========================================================================
   숲속 모닥불 힐링 쉼터 — 감성 일러스트 & 3D 석양 & 유리 양피지 에디션
   ========================================================================== */

:root {
  --gold: #fbbf24;
  --gold-glow: rgba(251, 191, 36, 0.4);
  --cyan: #38bdf8;
  --glass-bg: rgba(10, 16, 30, 0.74);
  --glass-border: rgba(251, 191, 36, 0.32);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-sans: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #030712;
  color: var(--text-main);
  font-family: var(--font-sans);
}

/* ==========================================================================
   [1] 감성 일러스트 뷰포트 & 3D 석양 레이어
   ========================================================================== */
.illustration-world {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #060c18 url('assets/forest_bg.jpg') no-repeat center bottom / cover;
  box-shadow: inset 0 0 160px rgba(0, 0, 0, 0.88);
  overflow: hidden;
  transition: transform 2.2s cubic-bezier(0.16, 1, 0.3, 1), filter 1.8s ease;
  transform-origin: center bottom;
  perspective: 1000px;
}

/* 혜원님 핵심 연출: 누웠을 때 FPS 게임처럼 카메라가 하늘로 젖혀지는 1인칭 3D 파노라마 시점! */
/* 혜원님 핵심: 화면 위쪽이 비지 않는 100% 풀스크린 3D 천체 돔 */
.illustration-world.mode-first-person-sky {
  transform: none !important;
  filter: brightness(0.9) contrast(1.1);
  filter: brightness(0.65) contrast(1.15);
}

/* 지평선 너머 낭만적인 석양 노을빛 */
.horizon-sunset-glow {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 110vw;
  height: 65vh;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 60%, rgba(251, 146, 60, 0.75) 0%, rgba(244, 63, 94, 0.45) 40%, rgba(168, 85, 247, 0.2) 70%, rgba(0,0,0,0) 100%);
  filter: blur(45px);
  pointer-events: none;
  opacity: 1;
  mix-blend-mode: screen;
  transition: opacity 12s cubic-bezier(0.4, 0, 0.2, 1), transform 14s ease-in-out;
  z-index: 2;
}

.horizon-sunset-glow.night-flow {
  opacity: 0 !important; /* 붉은 노을 100% 완전 소멸 */
  transform: translateX(-50%) translateY(45px);
}

/* 하늘 & 숲 조명 틴트 오버레이 (블렌드 모드 깜빡임 없이 부드러운 순수 오파시티 페이드) */
.sky-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  background: radial-gradient(circle at 50% 35%, rgba(251, 146, 60, 0.32) 0%, rgba(168, 85, 247, 0.18) 50%, rgba(0, 0, 0, 0) 100%);
  mix-blend-mode: screen;
  opacity: 1;
  transition: opacity 12s cubic-bezier(0.4, 0, 0.2, 1);
}

.sky-overlay.night-flow {
  opacity: 0; /* 노을빛이 부드럽게 사그라지며 캄캄한 밤하늘로 스르륵 */
}

/* 칠흑의 캄캄한 밤하늘 덮개 (혜원님 요청: 뒤의 붉은 하늘을 완전히 검게 덮어 별이 보석처럼 눈부시게 빛남!) */
.night-sky-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60%; /* 하늘 전체 영역 */
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.98) 0%, rgba(3, 7, 18, 0.95) 45%, rgba(3, 7, 18, 0.75) 75%, rgba(3, 7, 18, 0) 100%);
  opacity: 0;
  transition: opacity 12s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 4;
}

.night-sky-cover.night-flow {
  opacity: 1; /* 밤이 오면 붉은 하늘이 완전히 새까만 칠흑 밤하늘로 덮임! */
}

/* 캔버스 (별빛, 반딧불이, 불씨) */
#ambient-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto; /* 마우스 인터랙션을 위해 활성화 */
  z-index: 10;
  cursor: crosshair;
}

/* 오로라 모닥불 핫스팟 */
.campfire-hotspot {
  position: absolute;
  left: 50%;
  bottom: 22%;
  transform: translateX(-50%);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 50;
  transition: transform 0.25s ease;
}

.campfire-hotspot:hover {
  transform: translateX(-50%) scale(1.06);
}

/* ==========================================================================
   모닥불 곁의 감성 여행자 캐릭터 (혜원님 요청: 3D 입체 피규어 & 살아있는 자율 산책)
   ========================================================================== */
.traveler-character {
  position: absolute;
  left: calc(50% - 195px); /* 모닥불 바로 왼쪽 풀밭 */
  bottom: 14%;
  width: 140px; /* 큼직하고 든든하게 */
  height: 175px;
  z-index: 52;
  cursor: pointer;
  transition: left 2.4s cubic-bezier(0.25, 1, 0.5, 1), 
              bottom 2.4s cubic-bezier(0.25, 1, 0.5, 1), 
              transform 0.4s ease, 
              filter 1.2s ease;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.85));
  animation: travelerBreathe 4.5s infinite ease-in-out;
}

.traveler-character:hover {
  transform: scale(1.04);
}

@keyframes travelerBreathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* 걷는 중 애니메이션 (뒤뚱뒤뚱 귀여운 발걸음) */
.traveler-character.is-walking {
  animation: travelerWalkStep 0.45s infinite ease-in-out !important;
}

@keyframes travelerWalkStep {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-6px) rotate(-3deg); }
  75% { transform: translateY(-6px) rotate(3deg); }
}

/* 혜원님 요청: 마우스로 꾹 잡아서 데리고 다닐 때(드래그) 귀엽게 둥둥 뜬 모션 */
.traveler-character.is-dragging {
  cursor: grabbing !important;
  transition: none !important;
  transform: scale(1.12) translateY(-14px) rotate(4deg) !important;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.95)) !important;
  z-index: 100 !important;
}

/* 오른쪽으로 걸어갈 때 좌우 반전 */
.traveler-character.facing-right .traveler-svg {
  transform: scaleX(-1);
}

/* 눈 깜빡깜빡 자연스러운 생동감 애니메이션 */
.char-eyes-group {
  transform-origin: 61px 48px;
  animation: eyesBlink 4.2s infinite ease-in-out;
}

@keyframes eyesBlink {
  0%, 94%, 100% { transform: scaleY(1); }
  96%, 98% { transform: scaleY(0.1); }
}

/* 나중에 운세를 다 보고 풀밭에 스르르 눕는 상태 (혜원님 요청: 바닥에 등을 대고 완벽히 누워 두 눈이 하늘을 똑바로 올려다보는 자세!) */
.traveler-character.state-lying {
  animation: travelerLyingBreathe 5s infinite ease-in-out;
  transform: translateY(78px) translateX(-15px) rotate(-90deg) scale(0.85);
  transform-origin: center bottom;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.92));
}

@keyframes travelerLyingBreathe {
  0%, 100% { transform: translateY(78px) translateX(-15px) rotate(-90deg) scale(0.85); }
  50% { transform: translateY(75px) translateX(-15px) rotate(-90deg) scale(0.86); }
}

.traveler-character.state-lying .traveler-speech-bubble {
  top: -20px;
  left: 20%;
  transform: rotate(90deg); /* 말풍선도 보기 편하게 정렬 */
}

/* 360도 가상 천체 플라네타륨 돔 뷰어 (스텔라리움 스타일 마우스 잡고 둘러보기 커서) */
.illustration-world.mode-first-person-sky #ambient-canvas {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 120 !important;
  cursor: grab !important;
}

.illustration-world.mode-first-person-sky #ambient-canvas:active {
  cursor: grabbing !important;
}

/* 360도 돔 모드일 때 모닥불 쉼터 요소 100% 완전 은폐 */
.illustration-world.mode-first-person-sky .campfire-hotspot,
.illustration-world.mode-first-person-sky .traveler-character,
.illustration-world.mode-first-person-sky .ambient-control-panel,
.illustration-world.mode-first-person-sky .campfire-guide-toast {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.illustration-world.mode-first-person-sky #ambient-canvas:active {
  cursor: grabbing;
}

.illustration-world.mode-first-person-sky .campfire-hotspot {
  pointer-events: none;
  opacity: 0.25;
  transition: opacity 0.8s ease;
}

.illustration-world.mode-first-person-sky .traveler-character {
  pointer-events: none;
  opacity: 0.65;
  transition: opacity 0.8s ease;
}

.traveler-svg {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.35s ease;
}

/* 캐릭터 말풍선 */
.traveler-speech-bubble {
  position: absolute;
  top: -46px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(251, 191, 36, 0.5);
  color: #fef08a;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  padding: 7px 16px;
  border-radius: 18px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  box-shadow: 0 6px 20px rgba(0,0,0,0.7);
}

.traveler-speech-bubble.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-5px);
}

/* 오로라 불꽃 색상 순환 펄스 (혜원님 요청: 모닥불 크기를 아담하고 자연스럽게 축소!) */
.aurora-campfire-glow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.65) 0%, rgba(245, 158, 11, 0.25) 55%, rgba(0,0,0,0) 100%);
  animation: auroraPulse 6s infinite ease-in-out;
  filter: blur(3px);
}

@keyframes auroraPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 24px rgba(251, 191, 36, 0.7);
  }
}



/* ==========================================================================
   상단 헤더 & 하단 가이드 바
   ========================================================================== */
.ambient-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.35) 0%, rgba(3, 7, 18, 0) 100%);
  z-index: 100;
  pointer-events: none;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

.header-tag {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  font-size: 11.5px;
  font-weight: 600;
  height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border-radius: 18px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.header-title {
  font-size: 14px;
  font-weight: 600;
  color: #f8fafc;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

/* 혜원님 요청 전담: 
   1) 모든 상단 버튼의 높이(36px)와 패딩, 최소 너비(142px)를 완벽히 같게 통일!
   2) 95% 이상 맑고 깨끗하게 비치는 극강의 초투명 크리스탈 유리(Ultra-Clear Glass) */
.sound-chip,
.gold-saju-btn,
.star-journey-btn,
.time-chip {
  height: 36px;
  min-width: 142px;
  padding: 0 16px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  border-radius: 18px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sound-chip:hover,
.star-journey-btn:hover,
.time-chip:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.48);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.gold-saju-btn {
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #ffffff;
}

.gold-saju-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(251, 191, 36, 0.65);
  box-shadow: 0 6px 22px rgba(251, 191, 36, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.sound-chip.playing {
  border-color: rgba(52, 211, 153, 0.5);
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.12);
}

.bottom-guide {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  font-size: 12px;
  padding: 6px 18px;
  border-radius: 20px;
  z-index: 60;
  pointer-events: none;
}

/* ==========================================================================
   [2] 상단에 떠오르는 투명 유리창 (Crystal Glass Window)
   ========================================================================== */
.scroll-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.12); /* 뒤 배경의 숲과 모닥불, 별자리가 95% 이상 훤히 비침 */
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 60px; /* 상단 헤더 아래쪽으로 자연스럽게 올림 */
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.scroll-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* 맑고 투명한 유리창 본체 (사주 내용이 또렷하게 보이면서 뒤 배경이 은은하게 투영됨) */
.crystal-glass-window {
  position: relative;
  width: 92%;
  max-width: 680px;
  max-height: 72vh;
  background: linear-gradient(160deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.05) 100%); /* 거의 투명한 맑은 유리 */
  backdrop-filter: blur(7px) saturate(110%); -webkit-backdrop-filter: blur(7px) saturate(110%);
  border: 1.5px solid rgba(255,255,255,0.45);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35), inset 0 1.5px 2px rgba(255,255,255,0.55), inset 0 0 24px rgba(255,255,255,0.08);
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  padding: 24px 28px;
  overflow-y: auto;
  
  /* [핵심 연출] 화면 위에서 스르르륵 내려오는 인터랙션 */
  transform: translateY(-120vh);
  opacity: 0;
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.scroll-modal-overlay.active .crystal-glass-window {
  /* 누르면 위에서 스르르륵 미끄러져 내려와 상단에 사뿐히 안착! */
  transform: translateY(0);
  opacity: 1;
}

/* 유리창 우측 상단 액션 바 (창 올리기 & 닫기) */
.glass-top-controls {
  position: absolute;
  top: 14px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

.glass-action-btn {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.glass-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3), inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.glass-action-btn.btn-close:hover {
  background: rgba(244, 63, 94, 0.25);
  color: #fecdd3;
  border-color: rgba(244, 63, 94, 0.6);
}

/* 창이 위로 접혔을 때 화면 상단 중앙에 떠 있는 감성 탭 (누르면 다시 스르륵 내려옴) */
.top-pull-tab {
  position: fixed;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 20px;
  border-radius: 0 0 16px 16px;
  cursor: pointer;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  animation: tabBounce 3s infinite ease-in-out;
}

.top-pull-tab:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.7) 0%, rgba(15, 23, 42, 0.95) 100%);
  color: #ffffff;
  transform: translateX(-50%) translateY(3px);
  box-shadow: 0 6px 25px rgba(245, 158, 11, 0.6);
}

@keyframes tabBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(4px); }
}

/* 스크롤바 커스텀 */
.crystal-glass-window::-webkit-scrollbar {
  width: 5px;
}
.crystal-glass-window::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.scroll-close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.scroll-close-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.5);
}

.parchment-header {
  text-align: center;
  margin-bottom: 20px;
}

.parchment-sub {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 5px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.parchment-title {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  margin-bottom: 5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.parchment-desc {
  font-size: 12px;
  color: #cbd5e1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* 입력 폼 */
.p-form-grid {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.p-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.p-field label {
  font-size: 11px;
  font-weight: 700;
  color: #f1f5f9;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.p-field input, .p-field select {
  background: rgba(255, 255, 255, 0.08); /* 맑은 유리 투명도 */
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.p-field input:focus, .p-field select:focus {
  border-color: #fef08a;
  background: rgba(255, 255, 255, 0.15);
}

.p-submit-btn {
  width: 100%;
  padding: 13px 6px;
  white-space: nowrap;
  letter-spacing: -0.3px;
  background: linear-gradient(160deg, rgba(255,230,140,0.22) 0%, rgba(240,190,60,0.14) 100%);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 226, 130, 0.95);
  border-radius: 10px;
  color: #fffaf0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.85), 0 0 8px rgba(0,0,0,0.5);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25), inset 0 1px 2px rgba(255,255,255,0.8), inset 0 0 16px rgba(255,225,130,0.18); 
  transition: transform 0.2s, box-shadow 0.2s;
}

.p-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(236, 198, 92, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.75);
}

/* [타자기 결과 화면] */
.p-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.06); /* 투명 유리 배너 */
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 18px;
}

.p-banner-zodiac {
  display: flex;
  align-items: center;
  gap: 12px;
}

.p-z-icon {
  font-size: 26px;
}

.p-z-name {
  font-size: 14px;
  font-weight: 800;
  color: #fef08a;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.p-z-desc {
  font-size: 11px;
  color: #cbd5e1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.p-banner-ilgan {
  text-align: right;
}

.p-ilgan-sub {
  font-size: 10px;
  color: #cbd5e1;
}

.p-ilgan-main {
  font-size: 14px;
  font-weight: 800;
  color: #38bdf8;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.chapter-badge {
  display: inline-block;
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fef08a;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 14px;
  margin-bottom: 12px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* 타자기 텍스트 출력 */
.typewriter-area {
  background: rgba(255, 255, 255, 0.04); /* 맑은 투명 유리 */
  border-radius: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 14px;
  min-height: 130px;
  max-height: 360px; /* 혜원님 요청: 칸을 벗어나지 않고 안에서 스크롤되도록 영역 확보 */
  overflow-y: auto;
  scroll-behavior: smooth;
  line-height: 1.85;
  font-size: 13.5px;
  color: #f8fafc;
  position: relative;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85); /* 투명 유리 위에서 글자 시인성 강화 */
}

.typewriter-area::-webkit-scrollbar {
  width: 5px;
}
.typewriter-area::-webkit-scrollbar-thumb {
  background: rgba(251, 191, 36, 0.45);
  border-radius: 3px;
}

.typewriter-content {
  display: inline;
  white-space: pre-wrap;
}

.typewriter-caret {
  display: inline-block;
  width: 2px;
  height: 16px;
  background: #fbbf24;
  vertical-align: middle;
  margin-left: 2px;
  animation: caretBlink 0.75s infinite;
}

@keyframes caretBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* 오행 & 만세력 디테일 */
.details-fade-box {
  animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.p-element-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.el-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}
.el-lbl { width: 50px; font-weight: 700; }
.el-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.el-bar { height: 100%; border-radius: 3px; }
.el-val { width: 35px; text-align: right; color: #94a3b8; }

.p-pillars-table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.p-box {
  background: rgba(255, 255, 255, 0.08); /* 투명 유리 카드 */
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  backdrop-filter: blur(4px);
}
.p-box.is-me {
  border-color: #fef08a;
  background: rgba(251, 191, 36, 0.22);
}
.p-b-title { font-size: 10px; color: #94a3b8; margin-bottom: 2px; }
.p-b-ship { font-size: 9px; color: #6ee7b7; }
.p-b-hanja { font-size: 16px; font-weight: 800; margin: 2px 0; }
.p-b-sub { font-size: 10px; color: #cbd5e1; }

.scroll-footer-btns {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #94a3b8;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 11.5px;
  cursor: pointer;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); color: white; }

.btn-group-right {
  display: flex;
  gap: 8px;
}

.btn-gold {
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid var(--gold);
  color: #fef08a;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.btn-kakao {
  background: #fee500;
  border: none;
  color: #191919;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}

/* 토스트 팝업 */
.toast-popup {
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%) translateY(-15px);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--gold);
  color: #fef08a;
  padding: 10px 22px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.toast-popup.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   스마트폰 & 태블릿 모바일 완벽 반응형 최적화 (혜원님 요청: 카페 클로드 모바일 감성 규격)
   ========================================================================== */
@media (max-width: 768px) {
  /* 상단 헤더 모바일 최적화 */
  .ambient-header {
    width: 100%;
    max-width: 100vw;
    padding: 8px 10px;
    box-sizing: border-box;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    background: linear-gradient(180deg, rgba(3, 7, 18, 0.85) 0%, rgba(3, 7, 18, 0) 100%);
  }
  .header-left {
    justify-content: space-between;
    width: 100%;
  }
  .header-tag {
    font-size: 10.5px;
    height: 26px;
    padding: 0 9px;
  }
  .header-title {
    font-size: 11.5px;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .header-actions {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    gap: 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }
  .header-actions::-webkit-scrollbar {
    display: none;
  }
  .sound-chip,
  .gold-saju-btn,
  .star-journey-btn,
  .time-chip {
    height: 28px;
    min-width: auto;
    padding: 0 10px;
    font-size: 11px;
    flex-shrink: 0;
  }

  /* 사주 운세 유리창 모바일 중앙 정렬 & 패딩 최적화 */
  .scroll-modal-overlay {
    width: 100%;
    max-width: 100vw;
    padding: 84px 10px 20px 10px;
    align-items: flex-start;
    justify-content: center;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .crystal-glass-window {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 74vh;
    padding: 16px 14px;
    border-radius: 16px;
    box-sizing: border-box;
    margin: 0 auto;
  }
  .parchment-title {
    font-size: 17px;
  }
  .parchment-desc {
    font-size: 11.5px;
    margin-bottom: 12px;
  }
  .glass-top-controls {
    position: static;
    justify-content: flex-end;
    margin: -4px 0 8px;
    gap: 5px;
  }
  .glass-action-btn {
    padding: 4px 8px;
    font-size: 10.5px;
  }

  .p-form-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .p-field input,
  .p-field select {
    padding: 9px 11px;
    font-size: 13px;
  }
  .p-submit-btn {
    padding: 12px 4px;
    font-size: 12.5px;
  }

  /* 결과창 모바일 반응형 */
  .p-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
  }
  .p-banner-ilgan {
    text-align: left;
  }
  .typewriter-area {
    padding: 14px 14px;
    font-size: 13px;
    line-height: 1.75;
    max-height: 300px;
  }

  /* 슬림 브릿지 바 모바일 */
  .bridge-stargaze-card {
    padding: 8px 12px;
    gap: 8px;
  }
  .bridge-badge {
    display: none;
  }
  .bridge-title {
    font-size: 12px;
  }
  .bridge-action-btn {
    padding: 5px 10px;
    font-size: 11px;
  }

  /* 하단 가이드 */
  .bottom-guide {
    display: none;
  }
}

/* ==========================================================================
   [혜원님 특화 2막] 감성 브릿지 카드 & 별자리 찾기 HUD & 3D 타로 산사 처방전
   ========================================================================== */

/* 1. 운세 결과창 속 감성 브릿지 카드 (혜원님 요청: 뚱뚱했던 칸을 날렵하고 우아한 슬림 가로 바로 대폭 축소!) */
.bridge-stargaze-card {
  margin-top: 14px;
  margin-bottom: 14px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.bridge-stargaze-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(251, 191, 36, 0.65);
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.2);
  transform: translateY(-1px);
}

.bridge-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.bridge-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fef08a;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.bridge-title {
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bridge-action-btn {
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #fef08a;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.bridge-action-btn:hover {
  background: rgba(251, 191, 36, 0.45);
  color: #ffffff;
  border-color: #fbbf24;
}

.bridge-arrow {
  font-size: 13px;
  transition: transform 0.2s ease;
}

.bridge-stargaze-card:hover .bridge-arrow {
  transform: translateX(3px);
}

/* 2. 별자리 찾기 상단 HUD 가이드 바 */
.constellation-hud {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(251, 191, 36, 0.6);
  border-radius: 40px;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  z-index: 150;
  box-shadow: 0 10px 30px rgba(0,0,0,0.65), 0 0 20px rgba(251, 191, 36, 0.2);
  animation: hudFloat 3s infinite ease-in-out;
}

@keyframes hudFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-4px); }
}

.hud-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hud-icon {
  font-size: 22px;
  animation: hudStarSpin 4s infinite linear;
}

@keyframes hudStarSpin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}

.hud-text-group {
  display: flex;
  flex-direction: column;
}

.hud-badge-tag {
  color: #fbbf24;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.hud-title {
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 800;
  white-space: nowrap;
}

.hud-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.4);
  padding: 4px 10px;
  border-radius: 14px;
}

.hud-dots {
  display: flex;
  gap: 5px;
}

.hud-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
}

.hud-dot.active {
  background: #fbbf24;
  border-color: #fef08a;
  box-shadow: 0 0 8px #fbbf24;
  transform: scale(1.25);
}

.hud-count {
  color: #fef08a;
  font-size: 11px;
  font-weight: 800;
}

.hud-cancel-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #e2e8f0;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.hud-cancel-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.6);
  color: #fca5a5;
}

/* 3. 3D 황금 별자리 타로 카드 & 산사 힐링 처방전 모달 */
.tarot-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(14px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.tarot-modal-overlay.active {
  opacity: 1;
}

.tarot-modal-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 32px;
  max-width: 860px;
  width: 100%;
  background: rgba(15, 23, 42, 0.94);
  border: 1.5px solid rgba(251, 191, 36, 0.6);
  border-radius: 26px;
  padding: 32px 36px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(251, 191, 36, 0.25);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.tarot-modal-overlay.active .tarot-modal-container {
  transform: translateY(0) scale(1);
}

/* 3D 타로 카드 씬 */
.tarot-card-scene {
  perspective: 1200px;
  flex-shrink: 0;
}

.tarot-card-3d {
  width: 210px;
  height: 330px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  filter: drop-shadow(0 15px 30px rgba(0,0,0,0.7));
}

.tarot-card-3d:hover {
  transform: rotateY(12deg) rotateX(6deg) scale(1.04);
}

.tarot-face {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  box-sizing: border-box;
}

.tarot-front {
  background: linear-gradient(145deg, #0f172a 0%, #1e1b4b 50%, #311042 100%);
  border: 2px solid #fbbf24;
  box-shadow: inset 0 0 25px rgba(251, 191, 36, 0.35);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tarot-back {
  background: linear-gradient(145deg, #1e1b4b 0%, #0f172a 100%);
  border: 2px solid #d97706;
  box-shadow: inset 0 0 25px rgba(217, 119, 6, 0.35);
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tarot-back-center {
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.tarot-mandala-symbol {
  font-size: 52px;
  color: #fbbf24;
  filter: drop-shadow(0 0 16px #fbbf24);
  animation: tarotIconPulse 4s infinite ease-in-out;
}

.tarot-back-title {
  color: #fef08a;
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 800;
}

.tarot-back-desc {
  color: #94a3b8;
  font-size: 9.5px;
  font-weight: 600;
}

.tarot-border-glow {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border: 1px dashed rgba(254, 240, 138, 0.5);
  border-radius: 12px;
  pointer-events: none;
}

.tarot-head {
  z-index: 2;
}

.tarot-roman {
  font-size: 9.5px;
  color: #fbbf24;
  letter-spacing: 1.5px;
  font-weight: 800;
}

.tarot-visual {
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tarot-zodiac-icon {
  font-size: 64px;
  filter: drop-shadow(0 0 15px #fbbf24);
  animation: tarotIconPulse 3s infinite ease-in-out;
}

@keyframes tarotIconPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 12px #fbbf24); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 24px #fef08a); }
}

.tarot-zodiac-name {
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1px;
}

.tarot-zodiac-sub {
  color: #fef08a;
  font-size: 11px;
  font-weight: 700;
  word-break: keep-all;
  padding: 0 8px;
}

.tarot-foot {
  z-index: 2;
  font-size: 10px;
  color: #94a3b8;
  letter-spacing: 1px;
  font-weight: 800;
}

/* 산사 힐링 처방전 본체 */
.tarot-scroll-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tarot-temple-badge {
  display: inline-block;
  align-self: flex-start;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 16px;
}

.tarot-temple-title {
  color: #ffffff;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.4;
  margin: 0;
  word-break: keep-all;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.tarot-temple-reading {
  color: #e2e8f0;
  font-size: 13.5px;
  line-height: 1.8;
  word-break: keep-all;
  white-space: pre-line;
  background: rgba(0,0,0,0.3);
  padding: 16px 18px;
  border-radius: 14px;
  border-left: 3px solid #fbbf24;
}

.tarot-prescription-box {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 14px;
  padding: 14px 16px;
}

.presc-label {
  color: #34d399;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 6px;
}

.presc-text {
  color: #f1f5f9;
  font-size: 12.5px;
  line-height: 1.6;
  font-weight: 600;
  word-break: keep-all;
}

.tarot-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

/* 모바일 반응형 처리 */
@media (max-width: 768px) {
  .tarot-modal-container {
    flex-direction: column;
    padding: 24px 20px;
    gap: 20px;
  }
  .tarot-card-3d {
    width: 170px;
    height: 260px;
  }
  .tarot-zodiac-icon {
    font-size: 48px;
  }
  .tarot-zodiac-name {
    font-size: 17px;
  }
  .constellation-hud {
    width: 90%;
    justify-content: space-between;
    padding: 8px 14px;
    gap: 8px;
  }
  .hud-title {
    font-size: 12px;
  }
}


/* ==========================================================================
   3D 천구본(지구본) 모드: 2D 숲속 풍경, 모닥불, 캐릭터 100% 완전 소멸 & 순수 우주
   ========================================================================== */
.illustration-world.mode-constellation-globe {
  background: #020308 !important;
  transform: none !important;
}

.illustration-world.mode-constellation-globe #sunset-glow,
.illustration-world.mode-constellation-globe #sky-overlay,
.illustration-world.mode-constellation-globe #night-sky-cover,
.illustration-world.mode-constellation-globe #campfire-spot,
.illustration-world.mode-constellation-globe #traveler-char,
.illustration-world.mode-constellation-globe .campfire-hotspot,
.illustration-world.mode-constellation-globe .traveler-character,
.illustration-world.mode-constellation-globe .campfire-guide-toast,
.illustration-world.mode-constellation-globe .ambient-control-panel,
.illustration-world.mode-constellation-globe .forest-silhouette,
.illustration-world.mode-constellation-globe .trees-layer,
.illustration-world.mode-constellation-globe .grass-layer {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.illustration-world.mode-constellation-globe #ambient-canvas {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 120 !important;
  cursor: grab !important;
  background: #020308 !important;
}

.illustration-world.mode-constellation-globe #ambient-canvas:active {
  cursor: grabbing !important;
}

/* ==========================================================================
   3D 천체 투영관 (스텔라리움 3D WebGL 뷰어 모달)
   ========================================================================== */
.planetarium-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background: #000;
  display: flex;
  flex-direction: column;
}

.planetarium-top-bar {
  position: absolute;
  top: 14px;
  left: 20px;
  right: 20px;
  z-index: 100000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 16px;
  padding: 10px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75);
}

.planetarium-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.planetarium-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.planetarium-title {
  color: #fef08a;
  font-size: 15px;
  font-weight: 700;
}

.planetarium-tip {
  color: #cbd5e1;
  font-size: 13px;
  margin-left: 8px;
}

.planetarium-tip b {
  color: #38bdf8;
}

.planetarium-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.p-btn {
  background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.p-btn:hover {
  background: rgba(51, 65, 85, 0.95);
  border-color: rgba(251, 191, 36, 0.7);
  color: #fff;
  transform: translateY(-1px);
}

.p-btn.active {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
}

.p-btn.close {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #fbbf24;
  color: #fff;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
}

#planetarium-iframe {
  width: 100vw;
  height: 100vh;
  border: none;
  display: block;
}

.guide-korean-btn {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  border-color: #34d399 !important;
  color: #fff !important;
  font-weight: 700 !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}
.guide-korean-btn:hover {
  background: linear-gradient(135deg, #059669, #047857) !important;
}

.search-zodiac-btn {
  background: linear-gradient(135deg, #38bdf8, #0284c7) !important;
  border-color: #7dd3fc !important;
  color: #fff !important;
  font-weight: 700 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

/* ==========================================================================
   3D 한국어 우주 돔 & 숨은 별자리 찾기(숨바꼭질) 모달 스타일
   ========================================================================== */
.cgame-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  background: radial-gradient(circle at 50% 50%, #0a1128 0%, #050714 60%, #020307 100%);
  overflow: hidden;
  display: none;
  flex-direction: column;
}

.cgame-modal.active {
  display: flex !important;
}

#cgame-canvas {
  width: 100vw !important;
  height: 100vh !important;
  display: block !important;
  cursor: grab;
}

#cgame-canvas:active {
  cursor: grabbing;
}

/* 혜원님 특화: 3D 우주 돔 HUD 바 — 맑고 투명한 크리스탈 유리 + 사계절 탭 + 180° 타원 돔 모드 + 줌 컨트롤 */
.cgame-hud {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 920px;
  z-index: 1000000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 6px 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  transition: all 0.25s ease;
  gap: 10px;
}

.cgame-hud-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.cgame-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 계절 필터 탭 (전체, 봄, 여름, 가을, 겨울) */
.cgame-season-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cgame-season-tabs::-webkit-scrollbar { display: none; }

.season-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.season-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.season-btn.active {
  background: rgba(251, 191, 36, 0.25);
  border-color: rgba(251, 191, 36, 0.7);
  color: #fef08a;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.cgame-hud-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.cgame-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 15px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cgame-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
  transform: translateY(-1px);
}

.cgame-btn.view-toggle-btn {
  border-color: rgba(56, 189, 248, 0.4);
  color: #bae6fd;
}
.cgame-btn.view-toggle-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.7);
  color: #ffffff;
}

.cgame-zoom-group {
  display: flex;
  align-items: center;
  gap: 3px;
}
.zoom-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  font-size: 13px;
}

.cgame-btn.close-btn {
  border-color: rgba(251, 191, 36, 0.4);
  color: #fef08a;
}
.cgame-btn.close-btn:hover {
  background: rgba(251, 191, 36, 0.22);
  border-color: rgba(251, 191, 36, 0.7);
  color: #ffffff;
}

/* 모바일 폰(스마트폰) 완벽 2단 정렬 반응형 — 좌우 100% 핏 */
@media (max-width: 768px) {
  .cgame-hud {
    top: 8px !important;
    left: 8px !important;
    right: 8px !important;
    transform: none !important;
    width: auto !important;
    box-sizing: border-box !important;
    padding: 6px 8px !important;
    border-radius: 14px !important;
    flex-direction: column !important;
    gap: 6px !important;
  }
  .cgame-hud * {
    box-sizing: border-box !important;
  }
  .cgame-badge {
    display: none !important;
  }
  .cgame-hud-left {
    width: 100% !important;
    flex: none !important;
    display: flex !important;
    justify-content: stretch !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .cgame-season-tabs {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    gap: 2px !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .season-btn {
    flex: 1 !important;
    min-width: 0 !important;
    text-align: center !important;
    height: 26px !important;
    padding: 0 1px !important;
    font-size: 10px !important;
    border-radius: 13px !important;
    letter-spacing: -0.5px !important;
  }
  .cgame-hud-right {
    width: 100% !important;
    flex: none !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 4px !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .cgame-btn {
    height: 26px !important;
    padding: 0 6px !important;
    font-size: 10px !important;
    border-radius: 13px !important;
    letter-spacing: -0.5px !important;
  }
  .cgame-btn.view-toggle-btn {
    flex: 1 !important;
    min-width: 0 !important;
    justify-content: center !important;
  }
  .zoom-btn {
    width: 26px !important;
    height: 26px !important;
    font-size: 11px !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
  }
  .cgame-btn.close-btn {
    flex-shrink: 0 !important;
    padding: 0 8px !important;
  }
}

/* ==========================================================================
   [혜원님 전담: 신비의 우주 속으로 — 비치는 크리스탈 타로 카드 & 미니멀 HUD]
   ========================================================================== */

/* 1. 초투명 크리스탈 미니멀 HUD (밤하늘 시야 100% 확보) */
.cgame-hud-crystal {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 680px;
  z-index: 1000000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  gap: 8px;
}

.cgame-crystal-pill {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  color: #f1f5f9;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: all 0.25s ease;
}

.cgame-crystal-pill.active-track {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(251, 191, 36, 0.6);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.35);
}

.cgame-progress-tag {
  color: #fef08a;
  font-weight: 700;
  font-size: 11.5px;
}

.cgame-crystal-actions {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.crystal-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 15px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f8fafc;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.crystal-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(251, 191, 36, 0.55);
  color: #fef08a;
  transform: translateY(-1px);
}

.crystal-btn.compass-btn {
  border-color: rgba(56, 189, 248, 0.35);
  color: #bae6fd;
}
.crystal-btn.compass-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.65);
  color: #ffffff;
}

.crystal-btn.return-btn {
  border-color: rgba(251, 191, 36, 0.35);
  color: #fef08a;
}
.crystal-btn.return-btn:hover {
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.65);
}

/* 모바일 미니멀 HUD */
@media (max-width: 768px) {
  .cgame-hud-crystal {
    top: 10px;
    width: calc(100% - 16px);
    gap: 5px;
  }
  .cgame-crystal-pill {
    padding: 5px 10px;
    font-size: 10.5px;
    max-width: 58%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .crystal-btn {
    height: 28px;
    padding: 0 8px;
    font-size: 10.5px;
  }
}

/* ==========================================================================
   2. 은은하게 비치는 3D 크리스탈 타로 카드 (Glassmorphism Tarot Card)
   ========================================================================== */
.crystal-tarot-card {
  position: relative;
  width: 92vw;
  max-width: 460px;
  height: 86vh;
  max-height: 700px;
  background: rgba(10, 16, 36, 0.52);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  border: 1px solid rgba(251, 191, 36, 0.48);
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.75), 0 0 35px rgba(251, 191, 36, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: tarotCardFloat 6s ease-in-out infinite, tarotCardEntrance 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 1000005;
}

@keyframes tarotCardFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-7px) rotate(0.3deg); }
}

@keyframes tarotCardEntrance {
  0% { opacity: 0; transform: scale(0.88) translateY(30px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.card-glass-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 140px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.28) 0%, rgba(56, 189, 248, 0.15) 50%, rgba(0,0,0,0) 80%);
  pointer-events: none;
  filter: blur(20px);
}

/* 카드 상단 헤더 */
.tarot-card-header {
  padding: 20px 22px 14px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  flex-shrink: 0;
}

.tarot-badge-gold {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #fef08a;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
  margin-bottom: 8px;
}

.tarot-zodiac-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.tarot-zodiac-symbol {
  font-size: 34px;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.6));
  line-height: 1;
}

.tarot-zodiac-text-group {
  text-align: left;
}

.tarot-zodiac-name {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.tarot-zodiac-sub {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: #cbd5e1;
}

/* 카드 중앙: 타이포그래피(타자기) 본문 스크롤 영역 */
.tarot-card-body-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(251, 191, 36, 0.35) transparent;
}

.tarot-card-body-scroll::-webkit-scrollbar {
  width: 5px;
}
.tarot-card-body-scroll::-webkit-scrollbar-thumb {
  background: rgba(251, 191, 36, 0.35);
  border-radius: 4px;
}

.tarot-scroll-headline {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: #fef08a;
  text-align: center;
  letter-spacing: -0.3px;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
}

.tarot-typewriter-text {
  font-size: 14px;
  line-height: 1.85;
  color: #f1f5f9;
  word-break: keep-all;
  white-space: pre-wrap;
  font-family: Pretendard, -apple-system, sans-serif;
  letter-spacing: -0.2px;
}

.tarot-compass-box {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* 카드 하단 액션 버튼 */
.tarot-card-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(10, 16, 36, 0.3);
}

.tarot-btn-crystal {
  flex: 1;
  height: 38px;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f8fafc;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.tarot-btn-crystal:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.tarot-btn-gold {
  flex: 1;
  height: 38px;
  border-radius: 19px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.85) 0%, rgba(217, 119, 6, 0.9) 100%);
  border: 1px solid rgba(254, 240, 138, 0.6);
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.35);
  transition: all 0.2s ease;
}
.tarot-btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.5);
  filter: brightness(1.08);
}


/* ==========================================================================
   [혜원님 전담: 1인칭 눕기 시선 전환 애니메이션 (First-person Lie Down)]
   ========================================================================== */
.lie-down-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999998;
  background: radial-gradient(circle at 50% 120%, rgba(2, 6, 23, 0.45) 0%, rgba(2, 4, 15, 0.95) 70%, #010206 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.lie-down-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lie-down-caption {
  color: #fef08a;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.3px;
  text-shadow: 0 0 14px rgba(251, 191, 36, 0.6);
  opacity: 0;
  transform: translateY(20px);
  animation: lieDownCaptionAnim 1.2s ease forwards;
}

@keyframes lieDownCaptionAnim {
  0% { opacity: 0; transform: translateY(20px); }
  35% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; transform: translateY(-3px); }
  100% { opacity: 0; transform: translateY(-12px); }
}

/* 모닥불 화면이 뒤로 누워지는 1인칭 카메라 틸트-업 */
.camera-tilting-up {
  transform: perspective(1000px) rotateX(-35deg) translateY(24vh) scale(1.08) !important;
  opacity: 0.15 !important;
  filter: blur(4px) !important;
  transition: all 1.1s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

/* cgame-modal 등장 트랜지션 (바로 뚱 나오지 않고 부드럽게 페이드인) */
.cgame-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  background: #020308;
  overflow: hidden;
  display: none;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.cgame-modal.active {
  display: flex !important;
  opacity: 1 !important;
  transform: scale(1) !important;
}

/* ==========================================================================
   애드센스 광고 슬롯(상단, 결과 아래) & 오락·참고용 하단 안내 스타일
   ========================================================================== */
.ad-slot-box {
  width: 100%;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.28);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.ad-slot-top {
  min-height: 60px;
  margin-bottom: 14px;
  padding: 8px 12px;
}

.ad-slot-bottom {
  min-height: 90px;
  margin-top: 14px;
  margin-bottom: 14px;
  padding: 10px 12px;
}

.ad-slot-label {
  font-size: 11px;
  color: rgba(203, 213, 225, 0.65);
  letter-spacing: 0.4px;
}

.glass-legal-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  line-height: 1.5;
  color: #cbd5e1;
}

.glass-legal-footer a {
  color: #fef08a;
  text-decoration: underline;
  font-weight: 600;
  white-space: nowrap;
}

.glass-legal-footer a:hover {
  color: #ffffff;
}

.bottom-guide {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.bottom-guide-sep {
  opacity: 0.45;
}

.bottom-guide-link {
  color: #fef08a;
  text-decoration: underline;
  font-weight: 600;
  pointer-events: auto;
}

.bottom-guide-link:hover {
  color: #ffffff;
}

/* ===== 차분한 유리 톤 통일 (원색 제거: 샴페인 골드 테두리 + 맑은 유리) ===== */
.p-submit-btn, .tarot-btn-gold, .p-btn.active, .guide-korean-btn, .search-zodiac-btn, .planetarium-badge, .btn-kakao {
  background: linear-gradient(160deg, rgba(255,255,255,0.20) 0%, rgba(255,255,255,0.07) 100%) !important;
  backdrop-filter: blur(10px) saturate(120%); -webkit-backdrop-filter: blur(10px) saturate(120%);
  border: 1px solid rgba(232,212,160,0.65) !important;
  color: #fffaf0 !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  box-shadow: 0 4px 14px rgba(0,0,0,0.25), inset 0 1px 1px rgba(255,255,255,0.55) !important;
}
.guide-korean-btn:hover, .search-zodiac-btn:hover, .p-submit-btn:hover, .tarot-btn-gold:hover, .btn-kakao:hover {
  background: linear-gradient(160deg, rgba(255,255,255,0.30) 0%, rgba(255,255,255,0.12) 100%) !important;
  border-color: rgba(244,228,180,0.9) !important;
}
.p-btn.close { background: rgba(255,255,255,0.06) !important; border: 1px solid rgba(255,255,255,0.3) !important; color:#f1f5f9 !important; }

/* ===== 눈 뜨는 연출 + 가장자리 어둠(비네트) ===== */
#cg-eye { position: absolute; inset: 0; z-index: 20; pointer-events: none; overflow: hidden; }
#cg-eye .cg-lid { position: absolute; left: -5%; width: 110%; height: 52%; background: #010206; transition: transform 2.4s cubic-bezier(.22,.8,.3,1); }
#cg-eye .cg-lid-t { top: 0; border-radius: 0 0 50% 50% / 0 0 22% 22%; transform: translateY(0); }
#cg-eye .cg-lid-b { bottom: 0; border-radius: 50% 50% 0 0 / 22% 22% 0 0; transform: translateY(0); }
#cg-eye.cg-open .cg-lid-t { transform: translateY(-105%); }
#cg-eye.cg-open .cg-lid-b { transform: translateY(105%); }
#cg-eye .cg-vig { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0) 55%, rgba(0,0,0,0.55) 100%); }

/* 생년월일 년/월/일 선택 */
.bd-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 6px; }
.bd-row select { min-width: 0; }

.bd-row input { text-align: center; }

/* 타자기 글 영역: 바깥 레이아웃에 영향 없게 격리 (렉 방지) */
.typewriter-area, #typewriter-output { contain: layout style; }

/* 생년월일 칸이 좁은 화면/칸에서도 찌그러지지 않게 */
.bd-row { grid-template-columns: minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr); }
.bd-row input, .bd-row select { min-width: 0; width: 100%; }

/* 상단 세로로 깨지던 긴 제목과 '창 내리기' 탭 숨김 (운세 창은 상단 버튼/모닥불로 열림) */
.header-title { display: none !important; }
.top-pull-tab { display: none !important; }

/* 데스크톱에서 왼쪽 태그가 세로로 눌리던 문제: 태그는 줄어들지 않게, 버튼 줄이 남는 폭에서 스크롤 */
.header-left { flex-shrink: 0; }
.header-tag { white-space: nowrap; flex-shrink: 0; }
.header-actions { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.header-actions::-webkit-scrollbar { display: none; }
