:root {
  /* 🌟 VOYAGERS 프리미엄 컬러 팔레트 */
  --bg: #04144b;
  --bg-deep: #03103d;
  --bg-mid: #0a1c62;
  --surface: rgba(255,255,255,0.04);
  --surface-2: rgba(255,255,255,0.08);
  --surface-3: rgba(159,141,255,0.12);
  --text: #f5f7ff;
  --text-soft: rgba(245,247,255,0.76);
  --text-faint: rgba(245,247,255,0.5);
  --line: rgba(255,255,255,0.1);
  --primary: #9f8dff;   /* Soft Violet */
  --primary-2: #b7a7ff;
  --mint: #85e4d1;      /* Healing Mint */
  --gold: #ffc96b;      /* Starry Gold */
  --pink: #ff5ea8;
  --naver: #03c75a;
  --kakao: #fee500;
  --shadow: 0 20px 40px rgba(0,0,0,0.4);
  --radius-2xl: 32px;
  --radius-xl: 28px;
  --radius-lg: 24px;
  --radius-md: 20px;
  --radius-sm: 16px;
  --content-max: 460px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

/* 🌟 배경을 더 깊고 신비로운 밤하늘 톤으로 변경 */
body {
  min-height: 100vh;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: 
    radial-gradient(circle at 10% 10%, rgba(159,141,255,0.15), transparent 30%),
    radial-gradient(circle at 90% 80%, rgba(133,228,209,0.1), transparent 30%),
    linear-gradient(180deg, #04144b 0%, #03103d 100%);
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 10% 12%, rgba(255,255,255,0.72) 0 1px, transparent 1px),
    radial-gradient(circle at 26% 7%, rgba(255,255,255,0.55) 0 1px, transparent 1px),
    radial-gradient(circle at 61% 9%, rgba(255,255,255,0.5) 0 1px, transparent 1px),
    radial-gradient(circle at 84% 14%, rgba(255,255,255,0.7) 0 1px, transparent 1px),
    radial-gradient(circle at 74% 5%, rgba(255,255,255,0.4) 0 1px, transparent 1px);
  opacity: 0.8;
  z-index: 0;
}

button { font: inherit; }

.app-shell {
  position: relative;
  width: min(100%, var(--content-max));
  margin: 0 auto;
  height: 100vh;
  padding-top: calc(16px + env(safe-area-inset-top));
  padding-right: max(16px, env(safe-area-inset-right));
  padding-left: max(16px, env(safe-area-inset-left));
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
  z-index: 1;
  overflow: hidden;
}

.screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 260ms ease, transform 260ms ease;
  display: flex;
  flex-direction: column;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.screen-inner {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* 🌟 하단 여백을 90px에서 120px로 늘려 마지막 콘텐츠까지 잘 보이게 합니다. */
  padding-bottom: calc(220px + env(safe-area-inset-bottom));
}

.center-screen {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-bottom: calc(40px + env(safe-area-inset-bottom));
}

.soft-orb {
  position: absolute;
  width: min(68vw, 280px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(8px);
  background: radial-gradient(circle, rgba(159,141,255,0.28) 0%, rgba(159,141,255,0.08) 42%, transparent 72%);
  top: 14%;
  left: 50%;
  transform: translateX(-50%);
}

.logo-lockup { position: relative; z-index: 1; }

.brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(44px, 11vw, 64px);
  line-height: 1;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin: 0;
}

.brand-sub {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-copy {
  margin: 22px auto 0;
  max-width: 24ch;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.75;
}

.splash-footer {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(26px + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--text-faint);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.constellation-wrap {
  width: 150px; height: 150px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
}

.top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-top: 6px;
}

.chip-btn, .ghost-btn {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: var(--text-soft);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  min-height: 44px;
}

.progress-dots { display: flex; gap: 8px; align-items: center; }

.progress-dots span {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  transition: all 220ms ease;
}

.progress-dots span.active {
  width: 26px;
  background: var(--primary);
}

.hero-card, .card {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: clamp(320px, 52vh, 400px);
  margin-bottom: 18px;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 48%;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(3,16,61,0.34) 18%, rgba(3,16,61,0.9) 100%);
}

.hero-slide { position: absolute; inset: 0; }

.hero-copy {
  position: absolute;
  left: 18px; right: 18px; bottom: 18px;
  z-index: 1;
}

.hero-copy h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 7vw, 32px);
  line-height: 1.22;
  letter-spacing: -0.04em;
  font-weight: 800;
  max-width: 11ch;
}

.hero-copy p {
  margin: 0;
  color: rgba(255,255,255,0.88);
  font-size: 14px;
  line-height: 1.7;
  max-width: 27ch;
}

.art-1 {
  background:
    radial-gradient(circle at 62% 26%, rgba(255,236,188,0.96) 0 26px, rgba(255,236,188,0.22) 28px, transparent 50px),
    linear-gradient(180deg, #bfd8d6 0%, #d9cfb5 42%, #ebc37f 60%, #3a5c86 100%);
}

.art-1 .mountain1, .art-1 .mountain2, .art-1 .mountain3,
.art-1 .branch, .art-1 .bird { position: absolute; }

.art-1 .mountain1 {
  inset: auto -10% 0 -10%;
  height: 38%;
  background: #0f2747;
  clip-path: polygon(0 100%, 16% 54%, 26% 67%, 36% 43%, 48% 67%, 60% 40%, 71% 63%, 84% 47%, 100% 72%, 100% 100%);
}

.art-1 .mountain2 {
  inset: auto -8% 11% -8%;
  height: 24%;
  background: #476b8f;
  opacity: 0.68;
  clip-path: polygon(0 100%, 18% 52%, 35% 74%, 55% 42%, 71% 66%, 100% 34%, 100% 100%);
}

.art-1 .mountain3 {
  inset: auto -10% 18% -10%;
  height: 18%;
  background: #7191ad;
  opacity: 0.58;
  clip-path: polygon(0 100%, 14% 56%, 29% 76%, 45% 42%, 61% 72%, 76% 50%, 100% 78%, 100% 100%);
}

.art-1 .branch {
  left: -2%; top: 14%;
  width: 46%; height: 22%;
  border-top: 5px solid rgba(91,56,23,0.85);
  transform: rotate(16deg);
}

.art-1 .branch::before, .art-1 .branch::after {
  content: "";
  position: absolute;
  border-top: 4px solid rgba(91,56,23,0.85);
  width: 34%;
}

.art-1 .branch::before { top: 20px; left: 20%; transform: rotate(23deg); }
.art-1 .branch::after { top: 42px; left: 44%; transform: rotate(-12deg); }

.art-1 .bird {
  right: 16%; top: 31%;
  width: 18px; height: 10px;
  border-top: 2px solid rgba(30,39,66,0.9);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.art-2 {
  background:
    radial-gradient(circle at 50% 25%, rgba(255,255,255,0.18), transparent 20%),
    linear-gradient(180deg, #7c70d7 0%, #9b86f0 38%, #1a2564 100%);
}

.art-2 .map-silhouette, .art-2 .line, .art-2 .star { position: absolute; }

.art-2 .map-silhouette {
  left: 8%; right: 8%; top: 18%; bottom: 12%;
  background: rgba(205,226,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  clip-path: polygon(14% 30%, 22% 11%, 40% 7%, 54% 14%, 68% 10%, 84% 19%, 90% 39%, 86% 63%, 72% 80%, 48% 88%, 32% 84%, 17% 87%, 6% 72%, 7% 49%);
}

.art-2 .line {
  height: 2px;
  background: rgba(171,232,255,0.65);
  transform-origin: left center;
  box-shadow: 0 0 14px rgba(171,232,255,0.18);
}

.art-2 .line.l1 { left: 24%; top: 62%; width: 22%; transform: rotate(-14deg); }
.art-2 .line.l2 { left: 44%; top: 57%; width: 18%; transform: rotate(18deg); }
.art-2 .line.l3 { left: 59%; top: 52%; width: 16%; transform: rotate(-28deg); }
.art-2 .line.l4 { left: 42%; top: 57%; width: 7%; transform: rotate(-62deg); }

.art-2 .star {
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff2b8;
  box-shadow:
    0 0 0 8px rgba(255,201,107,0.08),
    0 0 16px rgba(255,201,107,0.32);
}

.art-2 .s1 { left: 21%; top: 60%; }
.art-2 .s2 { left: 43%; top: 55%; }
.art-2 .s3 { left: 60%; top: 60%; }
.art-2 .s4 { left: 74%; top: 47%; }
.art-2 .s5 { left: 49%; top: 40%; }

.art-3 {
  background:
    radial-gradient(circle at 75% 18%, rgba(255,246,196,0.2), transparent 18%),
    linear-gradient(180deg, #d4e2d8 0%, #cfc79f 34%, #7f9f85 62%, #1a2b63 100%);
}

.art-3 .path, .art-3 .hill1, .art-3 .hill2, .art-3 .moon { position: absolute; }

.art-3 .hill1 {
  inset: auto -10% 0 -10%;
  height: 42%;
  background: #305c52;
  clip-path: polygon(0 100%, 0 55%, 14% 62%, 26% 48%, 43% 68%, 56% 44%, 73% 70%, 87% 52%, 100% 66%, 100% 100%);
}

.art-3 .hill2 {
  inset: auto -10% 18% -10%;
  height: 24%;
  background: #679780;
  opacity: 0.9;
  clip-path: polygon(0 100%, 18% 58%, 32% 70%, 48% 42%, 63% 60%, 79% 47%, 100% 72%, 100% 100%);
}

.art-3 .path {
  left: 50%; bottom: 0;
  width: 44%; height: 45%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(240,226,182,0.15), rgba(246,223,162,0.95));
  clip-path: polygon(36% 0, 61% 0, 80% 100%, 18% 100%);
}

.art-3 .moon {
  top: 12%; right: 12%;
  width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,243,189,1) 0%, rgba(255,243,189,0.12) 60%, transparent 75%);
}

.cta-btn, .sub-btn, .social-btn, .tab-button, .icon-btn, .node-button {
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
}

/* 🌟 SAILERS 메인 액션 버튼 */
.cta-btn {
  width: 100%; border: 0; color: #fff;
  border-radius: 18px;
  padding: 16px 18px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--primary) 0%, #684fff 100%);
  box-shadow: 0 10px 24px rgba(159,141,255,0.35); /* 버튼 아래로 퍼지는 네온 그림자 */
  border: 1px solid rgba(255,255,255,0.15); /* 유리 테두리 반사광 */
  transition: all 0.2s ease;
}

.cta-btn:active {
  transform: scale(0.97); /* 누를 때 쫀득하게 들어감 */
  box-shadow: 0 4px 12px rgba(159,141,255,0.5);
}

/* 🌟 SAILERS 서브 버튼 (비활성/보조) */
.sub-btn {
  width: 100%;
  margin-top: 10px;
  border-radius: 18px;
  padding: 15px 18px;
  background: rgba(255,255,255,0.04);
  color: var(--text-soft);
  border: 1px solid rgba(255,255,255,0.1);
  font-weight: 600;
  font-size: 14px;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.sub-btn:active {
  background: rgba(255,255,255,0.08);
}

.info-note {
  text-align: center;
  margin-top: 14px;
  color: var(--text-faint);
  font-size: 12px;
}

.login-panel {
  padding: 22px 18px 18px;
  position: relative;
  overflow: hidden;
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 160px;
  background:
    radial-gradient(circle at 80% 20%, rgba(159,141,255,0.22), transparent 28%),
    radial-gradient(circle at 18% 18%, rgba(255,255,255,0.08), transparent 18%);
  pointer-events: none;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
  margin-bottom: 18px;
}

.mini-mark {
  width: 58px; height: 58px; border-radius: 18px;
  display: grid; place-items: center;
  background: rgba(159,141,255,0.12);
  border: 1px solid rgba(255,255,255,0.08);
  flex: 0 0 auto;
}

.mini-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin: 0;
}

.mini-copy {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.login-title {
  margin: 18px 0 8px;
  font-size: clamp(26px, 7vw, 30px);
  line-height: 1.3;
  letter-spacing: -0.04em;
  font-weight: 800;
  position: relative;
  z-index: 1;
}

.login-desc {
  margin: 0 0 22px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
  position: relative;
  z-index: 1;
  max-width: 26ch;
}

.social-stack {
  display: grid;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.social-btn {
  width: 100%;
  border: 0;
  padding: 15px 16px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
}

.social-btn.kakao { background: var(--kakao); color: #191600; }
.social-btn.naver { background: var(--naver); color: #fff; }
.social-btn.apple { background: rgba(255,255,255,0.92); color: #111; }

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-faint);
  font-size: 12px;
  margin: 18px 0 14px;
  position: relative;
  z-index: 1;
}

.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

.guest-btn {
  width: 100%;
  border-radius: 18px;
  padding: 15px 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.login-footnote {
  margin: 8px 0 0;
  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.page-section { display: none; }
.page-section.active { display: block; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 14px;
  margin-bottom: 10px;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(4,20,75,0.96) 0%, rgba(4,20,75,0.78) 72%, rgba(4,20,75,0) 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(159,141,255,0.35), rgba(255,255,255,0.08));
  border: 1px solid rgba(255,255,255,0.08);
  display: grid; place-items: center;
}

.brand-copy-home small {
  display: block;
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.brand-copy-home strong {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.top-actions { display: flex; gap: 8px; }

.icon-btn {
  width: 42px; height: 42px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  color: var(--text);
  display: grid; place-items: center;
  font-size: 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(159,141,255,0.12);
  color: #dcd6ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin: 0 auto 16px; /* 가운데 정렬 핵심 */
}

/* 새로 추가하는 감싸개(Wrapper) 중앙 정렬 설정 */
.page-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 0 24px;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(28px, 8vw, 34px);
  line-height: 1.3;
  letter-spacing: -0.04em;
  font-weight: 800;
  max-width: 100%; /* 글씨가 좁게 갇히는 현상 해제 */
}

.page-hero p {
  margin: 14px auto 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.7;
  max-width: 32ch; /* 설명글이 너무 길게 늘어지지 않게 너비 제한 */
}

.section { margin-top: 18px; }

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-header h3 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.section-header p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
  max-width: 26ch;
}

.linkish {
  color: #d9d3ff;
  font-size: 13px;
  font-weight: 600;
}

.map-card {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(157,139,255,0.18) 0%, rgba(255,255,255,0.03) 100%),
    rgba(255,255,255,0.04);
}

.map-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.map-top h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.35;
}

.map-top p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.6;
  max-width: 26ch;
}

.progress-chip {
  min-width: 88px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  text-align: right;
}

.progress-chip small {
  display: block;
  color: var(--text-faint);
  font-size: 11px;
  margin-bottom: 4px;
}

.progress-chip strong {
  font-size: 20px;
  font-weight: 800;
}

/* --- 지도 뷰어 전체 틀 --- */
.map-visual {
  position: relative;
  height: clamp(300px, 50vh, 500px); /* 화면의 절반 정도를 지도가 차지하도록 설정 */
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: #020a26;
}
/* 🌟 1. 가로 스크롤 유도 그림자 */
.map-visual::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 100%;
  background: linear-gradient(to left, rgba(2, 10, 38, 0.8), transparent);
  pointer-events: none; /* 클릭 방해 금지 */
  z-index: 2;
}

/* 🌟 3. 스크롤 인디케이터 (하단 바) */
.map-indicator-container {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  z-index: 10;
  overflow: hidden;
}

.map-indicator-bar {
  width: 30%; /* 지도의 가로 길이에 비례해 움직임 */
  height: 100%;
  background: var(--mint);
  border-radius: 2px;
  transition: transform 0.1s linear;
}
/* --- 드래그 영역: 세로 고정, 가로 스크롤 --- */
.map-scroll-area {
  width: 100%;
  height: 100%;
  overflow-x: auto; /* 가로 스크롤 */
  overflow-y: auto; /* 🌟 확대 시 세로 스크롤 허용으로 변경 */
  -webkit-overflow-scrolling: touch;
  position: relative;
}

/* --- 실제 영월 지도 이미지: 세로 100% 고정 --- */
.real-map-img {
  height: 100%;    /* 세로 높이를 부모 컨테이너에 100% 맞춤 */
  width: auto;      /* 가로 길이는 원본 비율에 맞춰서 길게 늘어남 */
  display: block;
  max-width: none;  /* 가로가 잘리지 않도록 제한 해제 */
  filter: invert(100%) hue-rotate(180deg) brightness(85%) contrast(110%);
  transform-origin: center left; /* 왼쪽 기준으로 확대되게 하여 가로 탐색 용이하게 설정 */
  transition: transform 0.2s ease-out;
}

/* --- 확대/축소 버튼 디자인 --- */
.map-controls {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}

.map-controls button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(4, 20, 75, 0.7);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 18px;
  font-weight: 800;
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.map-controls button:active {
  background: var(--primary);
  transform: scale(0.95);
}

.map-title {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  color: var(--text-soft);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.yeongwol-shape {
  position: absolute;
  inset: 42px 18px 22px 18px;
  z-index: 1;
}



/* --- 🌟 [수정] 고대비 고채도 테마 색상 (시인성 극대화) --- */
.theme-calm   { --node-color: #00FBFF; } /* 선명한 사이언 */
.theme-active { --node-color: #FF2E63; } /* 강렬한 핑크/레드 */
.theme-forest { --node-color: #00FF85; } /* 네온 그린 */
.theme-night  { --node-color: #BF95FF; } /* 밝은 바이올렛 */
.theme-stay   { --node-color: #FFD700; } /* 황금빛 옐로우 */

/* --- 🌟 [수정] 글씨 시인성 보강 --- */
.node-button .label {
  position: absolute;
  top: 50%;
  margin-top: 5px; 
  left: 50%;
  transform: translateX(-50%) scale(0.6); /* 크기 살짝 키움 */
  transform-origin: top center;
  font-size: 10px;
  font-weight: 800; /* 더 두껍게 */
  color: #FFFFFF; /* 완전한 흰색 */
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 0 4px rgba(0,0,0,1), 0 0 2px rgba(0,0,0,1); /* 그림자 강화 */
}

.node-button.state-default {
  opacity: 0.8; /* 기본 투명도 상향 */
  filter: saturate(1.2) brightness(1.1);
}

/* --- 🌟 별 버튼 전체 터치 영역 (오작동 방지: 진짜 별 크기인 8px로 축소) --- */
.node-button {
  position: absolute;
  transform: translate(-46%, -50%);
  width: 8px; height: 8px; 
  /* 🌟 범인 검거: 위쪽에 숨어있던 44px 강제 고정 족쇄를 끊어버립니다! */
  min-width: 8px; 
  min-height: 8px; 
  border: 0; background: transparent; padding: 0;
  z-index: 4;
  transition: all 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- 🌟 진짜 별 모양 (8px) --- */
.node-button .dot {
  display: block;
  width: 8px; height: 8px; 
  background: var(--node-color);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  transition: all 0.3s ease;
}

/* --- 🌟 관광지 글씨(라벨): 터치 완전 무시 (유령화) --- */
.node-button .label {
  position: absolute;
  top: 50%;
  margin-top: 4px; 
  left: 50%;
  transform: translateX(-50%) scale(0.5);
  transform-origin: top center;
  font-size: 10px;
  font-weight: 500; 
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  pointer-events: none; /* 🌟 핵심! 터치를 통과시켜버림 (오작동 방지) */
  text-shadow: 0 1px 1px rgba(0,0,0,0.6);
}

/* --- 🌟 [1단계] 진단 전: 눈에 띄도록 진하고 선명한 상태로 변경 --- */
.node-button.state-default {
  opacity: 0.70; /* 기존에 반투명하던 것을 거의 불투명(0.95)하게 올려서 꽉 찬 색으로 만듭니다 */
  filter: saturate(1.2) brightness(1.2); /* 채도와 밝기를 강제로 더 끌어올려 배경과 대비시킵니다 */
}
.node-button.state-default .label {
  display: none; /* 글씨는 여전히 진단 후에 나오도록 숨김 유지 */
}
/* --- 🌟 [2단계] 진단 후 추천: 눈에 확 띄는 강력한 깜빡임(Pulse) 효과 --- */
.node-button.state-recommended {
  opacity: 1;
  z-index: 6; /* 추천된 별이 다른 별들보다 무조건 위로 올라오게 설정 */
}

/* 🌟 추천 별(dot)이 심장 뛰듯 커졌다 작아지며 빛을 뿜는 애니메이션 */
.node-button.state-recommended .dot {
  animation: recommendPulse 0.9s infinite alternate ease-in-out;
}

/* 🌟 추천 별의 글씨도 더 밝게 빛나도록 설정 */
.node-button.state-recommended .label {
  display: block;
  color: #fff;
  font-weight: 800;
  text-shadow: 0 0 6px var(--node-color);
}

@keyframes recommendPulse {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 2px var(--node-color)) brightness(1);
  }
  100% {
    transform: scale(1.6); /* 크기가 확 커짐 */
    filter: drop-shadow(0 0 12px var(--node-color)) brightness(1.5); /* 빛이 강해짐 */
  }
}

/* --- [3단계] 방문 완료: 선명하지만 눈 안 부시게 --- */
.node-button.state-visited {
  opacity: 1;
  /* drop-shadow를 5px -> 2px로 대폭 축소 (1/3 수준) */
  filter: saturate(1.2) brightness(1.1) drop-shadow(0 0 2px var(--node-color));
  z-index: 5;
}

.node-button.state-visited .dot {
  transform: scale(1.15);
  background: var(--node-color);
  animation: starBlink 2s infinite ease-in-out;
}

/* 🌟 별 테두리 깜빡임도 1/3 수준으로 은은하게 축소 */
@keyframes starBlink {
  0%, 100% { 
    filter: drop-shadow(0 0 0px var(--node-color)); 
    opacity: 1; 
  }
  50% { 
    /* 기존 6px에서 2px로 껌뻑임 범위 대폭 축소 */
    filter: drop-shadow(0 0 2px var(--node-color)); 
    opacity: 0.85; 
  }
}

.node-button.state-visited .label {
  display: block;
  color: rgba(255, 255, 255, 0.7); /* 방문 시 글씨 색상도 톤 다운 */
  font-weight: 600;
  /* 방문한 곳의 글씨는 아주아주 미세하게만 큼 (0.55배) */
  transform: translateX(-50%) scale(0.55);
}
.active-line {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawConstellation 2s forwards ease-out; /* 선이 스르륵 그려지는 애니메이션 */
}

@keyframes drawConstellation {
  to { stroke-dashoffset: 0; }
}
/* --- 별자리 연결선 (최초 숨김) --- */
.route-line {
  stroke: rgba(168,223,255,0.6);
  stroke-width: 2.5;
  stroke-dasharray: 6 8;
  stroke-linecap: round;
  opacity: 0; /* 🌟 초기에는 투명 */
  transition: opacity 0.8s ease;
}

.route-line.active {
  opacity: 1; /* 방문 시 나타남 */
}
/* --- 새로 추가할 별자리 애니메이션 효과 --- */
.node-button.current .dot {
  background: #fff;
  box-shadow: 0 0 10px #fff, 0 0 20px var(--primary);
}
.node-button.current .label {
  color: #fff;
  font-weight: 800;
  text-shadow: 0 0 8px var(--primary);
}

.pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  animation: starPulse 2s infinite ease-out;
}

@keyframes starPulse {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.8); opacity: 0; }
}

/* -------------------------------------- */

.legend {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  font-size: 12px;
  color: var(--text-soft);
  border: 1px solid rgba(255,255,255,0.08);
}

.pill i {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 999px;
}

.recommend-grid, .info-grid, .record-list, .quick-grid {
  display: grid;
  gap: 12px;
}

.quick-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.recommend-card {
  position: relative;
  min-height: 168px;
  padding: 16px;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.recommend-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.96;
}

.recommend-card .content,
.recommend-card .footer {
  position: relative;
  z-index: 1;
}

.recommend-card.forest::before {
  background: linear-gradient(180deg, #bfdac6 0%, #9ebc8c 38%, #3b6a4d 100%);
}

.recommend-card.stars::before {
  background: linear-gradient(180deg, #7f72d6 0%, #3f3a8f 34%, #07144d 100%);
}

.recommend-card.river::before {
  background: linear-gradient(180deg, #d8e8de 0%, #b9d8cb 28%, #7db8bf 65%, #3a678b 100%);
}

.tag {
  display: inline-flex;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(0,0,0,0.18);
}

.tag.new { background: var(--pink); }
.tag.best { background: #2fd7c4; }
.tag.night { background: rgba(255,255,255,0.18); }

.recommend-card h4 {
  margin: 0;
  font-size: 24px;
  line-height: 1.28;
  letter-spacing: -0.04em;
  font-weight: 800;
  max-width: 11ch;
}

.recommend-card p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.58;
  color: rgba(255,255,255,0.86);
  max-width: 28ch;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
}

.meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: rgba(255,255,255,0.92);
  background: rgba(5,15,54,0.26);
  border: 1px solid rgba(255,255,255,0.08);
}

.round-play {
  width: 46px; height: 46px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.12);
  display: grid; place-items: center;
  font-size: 18px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stat-card, .quick-card, .list-card, .plain-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(12px);
}

.stat-card small {
  display: block;
  color: var(--text-faint);
  font-size: 11px;
  margin-bottom: 8px;
  line-height: 1.45;
}

.stat-card strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.quick-card {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.quick-card .ico {
  width: 42px; height: 42px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: rgba(159,141,255,0.18);
  font-size: 18px;
}

.quick-card h5 {
  margin: 18px 0 4px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.quick-card p {
  margin: 0;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.55;
}

.list-card h4, .plain-card h4 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.list-card p, .plain-card p {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.62;
}

.trail-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.trail-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
}

.trail-step .step-dot {
  width: 18px; height: 18px;
  border-radius: 999px;
  margin-top: 4px;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(255,201,107,0.12);
}

.trail-step .step-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
}

.trail-step .step-copy span {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
}

.record-card {
  background: linear-gradient(180deg, rgba(159,141,255,0.18), rgba(255,255,255,0.04));
}

.record-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  align-items: center;
}

.record-summary .big {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.record-summary small {
  display: block;
  color: var(--text-faint);
  font-size: 12px;
  margin-bottom: 6px;
}

.record-stars {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.record-stars span {
  width: 16px; height: 16px;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  background: linear-gradient(180deg, #fff3b2, #ffc96b);
  box-shadow: 0 0 10px rgba(255,201,107,0.3);
}

.record-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.record-item strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.record-item span {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.45;
}

.record-item b {
  font-size: 12px;
  color: #fff;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  font-weight: 700;
  white-space: nowrap;
}

/* --- 🌟 하단 탭 바 짤림 방지 및 위치 상향 조정 --- */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  background: rgba(3, 16, 61, 0.75); /* 가독성을 위해 배경 불투명도 살짝 상향 */
  backdrop-filter: blur(24px) saturate(1.5);
  border-top: 1px solid rgba(255,255,255,0.08);
  
  /* 🌟 하단 여백(Padding-Bottom)을 8px에서 24px로 늘려 탭을 위로 올립니다. */
  /* env(safe-area-inset-bottom)은 아이폰의 홈 바 영역을 자동으로 계산해줍니다. */
  padding: 12px max(16px, env(safe-area-inset-right)) calc(50px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.bottom-nav-inner {
  width: min(100%, var(--content-max));
  margin: 0 auto;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.tab-button {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.35);
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 8px 4px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.3s ease;
}

.tab-button .ico {
  font-size: 22px;
  line-height: 1;
}

.tab-button.active {
  color: var(--mint);
  background: transparent;
  text-shadow: 0 0 14px rgba(133,228,209,0.8);
  transform: translateY(-2px);
}
/* 불필요한 .home-indicator CSS는 완전히 삭제했습니다! */

.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 40;
}

.modal.open { display: block; }

.modal-scrim {
  position: absolute; inset: 0;
  background: rgba(2, 8, 28, 0.58);
  backdrop-filter: blur(6px);
}

.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: min(100%, var(--content-max));
  margin: 0 auto;
  border-radius: 28px 28px 0 0;
  border: 1px solid rgba(255,255,255,0.08);
  /* 🌟 3번 기능: 모달 상단을 살짝 반투명하게 하고 블러 처리하여 뒤쪽 지도가 은은하게 보이도록 함 */
  background: linear-gradient(180deg, rgba(24,34,89,0.85), rgba(9,18,58,0.98));
  backdrop-filter: blur(12px);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.35);
  padding: 12px 16px calc(22px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1); /* 더 부드러운 팝업 모션 */
  max-height: 48vh; /* 🌟 3번 기능: 모달이 화면의 절반(48%) 이상 올라오지 못하게 높이 제한 */
  overflow-y: auto;
}

.modal.open .sheet {
  transform: translateY(0);
}

.sheet-handle {
  width: 52px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  margin: 0 auto 14px;
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.sheet-title h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.sheet-title p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.58;
}

.close-btn {
  width: 42px; height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.sheet-grid {
  display: grid;
  gap: 10px;
}

.sheet-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.sheet-card strong {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

.sheet-card span {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
}

.sheet-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 380px) {
  .stat-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .map-top { flex-direction: column; }
  .progress-chip { text-align: left; }
  .sheet { max-height: 82vh; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

.survey-modal {
  position: fixed; inset: 0; z-index: 50;
  display: none; flex-direction: column;
  background: linear-gradient(180deg, #0a1c62 0%, #04144b 40%, #03103d 100%);
}

.survey-modal.open { display: flex; }

.survey-modal-inner {
  width: min(100%, 460px); margin: 0 auto; height: 100%;
  display: flex; flex-direction: column;
  padding: calc(16px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
}

.survey-modal-header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }

.survey-modal-close {
  width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.06);
  color: #f5f7ff; font-size: 18px; cursor: pointer; display: grid; place-items: center; flex: 0 0 40px;
}

.survey-modal-label { flex: 1; font-size: 13px; font-weight: 700; color: rgba(245,247,255,0.76); letter-spacing: 0.06em; }

.survey-modal-progress { display: flex; flex-direction: column; gap: 6px; margin-bottom: 28px; }

.survey-modal-progress-text { font-size: 12px; color: rgba(245,247,255,0.5); }

.survey-modal-progress-bar-wrap { height: 4px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }

.survey-modal-progress-bar { height: 100%; border-radius: 999px; background: #9f8dff; transition: width 300ms ease; }

.survey-modal-question { flex: 1; overflow-y: auto; }

.survey-modal-question h4 { font-size: 20px; font-weight: 800; line-height: 1.5; letter-spacing: -0.02em; margin: 0 0 20px; }

.survey-option-label {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; margin-bottom: 10px; border-radius: 20px; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.04);
  font-size: 15px; line-height: 1.55; color: #f5f7ff;
  transition: border 200ms, background 200ms;
}

.survey-option-label input { accent-color: #9f8dff; width: 18px; height: 18px; flex: 0 0 18px; }

.survey-option-label.selected {
  border: 1px solid rgba(159,141,255,0.55);
  background: rgba(159,141,255,0.14);
}

.survey-modal-footer { padding-top: 16px; }

/* 타임라인 코스 UI */
.timeline-container {
  position: relative;
  padding-left: 24px;
  margin-top: 24px;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--mint), var(--gold), rgba(255,255,255,0.1));
  border-radius: 999px;
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
}

.timeline-marker {
  position: absolute;
  left: -24px;
  top: 14px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 4px solid var(--bg-deep);
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.timeline-marker.step-1 { background: var(--primary); }
.timeline-marker.step-2 { background: var(--mint); }
.timeline-marker.step-3 { background: var(--gold); }
.timeline-marker.step-4 { background: #fff; }

.timeline-time {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
/* --- 수면 처방전(Rx) UI --- */
.prescription-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid rgba(159,141,255,0.3);
  border-radius: 20px;
  padding: 16px 18px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}
.prescription-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 5px; height: 100%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}
.rx-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.rx-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-2);
  font-style: italic;
  padding-right: 8px;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.rx-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}
.rx-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.rx-tag {
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(159,141,255,0.15);
  color: #d8ceff;
  font-weight: 700;
  border: 1px solid rgba(159,141,255,0.25);
}
/* --- 리워드 모달 전용 디자인 --- */
.reward-glow-effect {
  position: absolute;
  top: 40%; left: 50%;
  transform: translate(-50%, -50%);
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(159,141,255,0.4) 0%, transparent 70%);
  filter: blur(40px);
  z-index: -1;
  animation: rewardGlow 3s infinite alternate;
}

@keyframes rewardGlow {
  from { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1.3); }
}

.reward-icon {
  font-size: 64px;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255, 201, 107, 0.8);
  margin-bottom: 16px;
}

.reward-coupon {
  display: flex;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  width: 100%;
  color: #111;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.coupon-left {
  background: var(--bg-deep);
  color: #fff;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 2px dashed rgba(255,255,255,0.2);
}
.coupon-left small { font-size: 9px; opacity: 0.7; letter-spacing: 0.1em; }
.coupon-left strong { font-size: 14px; font-weight: 800; white-space: nowrap; margin-top: 4px; }

.coupon-right {
  padding: 16px;
  flex: 1;
}
.coupon-title { font-size: 16px; font-weight: 800; margin-bottom: 4px; color: var(--bg-deep); }
.coupon-desc { font-size: 12px; color: #666; margin-bottom: 10px; }
.coupon-code { font-size: 10px; font-weight: 700; color: var(--primary); letter-spacing: 0.05em; }
/* --- 🌟 SAILERS 별자리 연결선 스타일 --- */
.constellation-line {
  stroke: rgba(255, 255, 255, 0.6);
  stroke-width: 2;
  stroke-dasharray: 5 6; /* 더 총총한 점선 효과 */
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.5)); /* 선 자체에서 뿜어지는 빛 */
  animation: lineGrow 1s ease-out forwards;
}

@keyframes lineGrow {
  from { opacity: 0; stroke-dashoffset: 20; }
  to { opacity: 1; stroke-dashoffset: 0; }
}

/* --- 🌟 별자리 완성 시 전체 광채 극대화 --- */
.constellation-complete .constellation-line {
  stroke: var(--gold); /* 완성되면 선 전체가 황금빛으로 변함 */
  stroke-width: 2.5;
  filter: drop-shadow(0 0 8px var(--gold));
  stroke-dasharray: none; /* 점선에서 실선으로 확 변함 */
  transition: all 0.8s ease;
}

.constellation-complete .node-button.state-visited .dot {
  transform: scale(1.4);
  filter: saturate(1.5) brightness(1.5) drop-shadow(0 0 14px var(--gold)); /* 별들도 황금빛 글로우 폭발 */
}

/* --- 🌟 기록 탭: 다회차 아카이브 UI --- */
.archive-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.archive-card {
  aspect-ratio: 1;
  background: rgba(255,255,255,0.05);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.archive-card .mini-map {
  width: 60%; height: 60%;
  opacity: 0.6;
}

.archive-card .label {
  position: absolute;
  bottom: 12px;
  font-size: 11px;
  color: var(--text-soft);
}
/* --- 🌟 별자리 아카이브 카드 디테일 --- */
.archive-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid rgba(159,141,255,0.2);
  transition: transform 0.2s ease;
}

.archive-card:active {
  transform: scale(0.96); /* 누를 때 살짝 들어가는 효과 */
}

.mini-constellation {
  filter: drop-shadow(0 0 5px var(--primary));
  animation: miniFloat 3s infinite alternate ease-in-out;
}

@keyframes miniFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-4px); }
}
/* --- 🌟 마이 페이지: 프로파일, 배지, 설정 디자인 --- */
.profile-card {
  background: linear-gradient(180deg, rgba(159,141,255,0.12) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(159,141,255,0.25);
}

.profile-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(159,141,255,0.4) 0%, rgba(159,141,255,0.05) 100%);
  border: 2px solid var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin: 0 auto 14px;
  box-shadow: 0 0 20px rgba(159,141,255,0.3);
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  text-align: center;
}

.badge-item { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.badge-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}

.badge-item.locked { opacity: 0.35; filter: grayscale(100%); }
.badge-item strong { font-size: 11px; color: #fff; line-height: 1.3; word-break: keep-all; }
.badge-item span { font-size: 9px; color: var(--text-faint); letter-spacing: -0.05em; }

.setting-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.setting-info strong { display: block; font-size: 14px; margin-bottom: 4px; color: #fff; }
.setting-info span { display: block; font-size: 11px; color: var(--text-soft); }

/* 애플 스타일 토글 스위치 */
.toggle-switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-switch .slider {
  position: absolute; cursor: pointer; inset: 0;
  background-color: rgba(255,255,255,0.15); border-radius: 26px; transition: .3s;
}
.toggle-switch .slider:before {
  position: absolute; content: ""; height: 20px; width: 20px;
  left: 3px; bottom: 3px; background-color: white; border-radius: 50%; transition: .3s;
}
.toggle-switch input:checked + .slider { background-color: var(--mint); }
.toggle-switch input:checked + .slider:before { transform: translateX(20px); }

.temp-btn {
  width: 32px; height: 32px; border-radius: 10px;
  background: rgba(255,255,255,0.1); border: none; color: #fff; font-size: 18px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
/* --- 🌟 SAILERS 초고화질 배경 이미지 맵핑 (확장자 JPG) --- */

/* 스플래시 배경 */
#splash-bg {
  width: 100%; height: 100vh;
  background: url('images/bg-splash.jpg') no-repeat center / cover;
}

/* 온보딩 슬라이드들 */
#ob-bg-1 { background: url('images/bg-onboarding-1.jpg') no-repeat center / cover; }
#ob-bg-2 { background: url('images/bg-onboarding-2.jpg') no-repeat center / cover; }
#ob-bg-3 { background: url('images/bg-onboarding-3.jpg') no-repeat center / cover; }

/* 시네마틱 전환 효과 */
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s ease;
  transform: scale(1.1); /* 대기 중일 땐 살짝 확대 */
}

.hero-slide.active-slide {
  opacity: 1;
  visibility: visible;
  transform: scale(1); /* 나타나면서 부드럽게 줌아웃 */
}

/* 하단 가독성을 위한 그라데이션 오버레이 */
.hero-slide::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(3,16,61,0) 0%, rgba(3,16,61,0.4) 60%, rgba(3,16,61,0.95) 100%);
}
/* --- 🌟 2단계: 터치 파동(Ripple) & 극적인 모달 등장 애니메이션 --- */

/* 1. 지도 별 터치 파동(물결) 효과 */
.touch-ripple {
  position: absolute;
  top: 50%; left: 50%;
  width: 40px; height: 40px;
  margin-top: -20px; margin-left: -20px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  pointer-events: none;
  animation: touchRippleAnim 0.6s ease-out forwards;
  z-index: 10;
}

@keyframes touchRippleAnim {
  0% { transform: scale(0.3); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* 2. 모든 모달창(진단 결과, 보상 등) 스르륵 팝업 효과 */
.survey-modal.open .survey-modal-inner {
  animation: modalPopUp 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes modalPopUp {
  0% { 
    opacity: 0; 
    transform: translateY(30px) scale(0.95); 
  }
  100% { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
  }
}
/* --- 🌟 3단계: 프리미엄 타이포그래피 & 바텀 시트 고도화 --- */

/* 1. 명품 앱의 비밀: 쫀쫀한 텍스트 자간(Letter Spacing) 튜닝 */
h1, h2, h3, h4, h5, strong, .cta-btn, .sub-btn, .brand-name {
  letter-spacing: -0.025em !important; /* 제목과 버튼은 촘촘하고 묵직하게 */
}

p, span, div, button {
  letter-spacing: -0.01em; /* 본문은 읽기 편하면서도 밀도 있게 */
}

/* 2. 보상 팝업을 화면 정중앙 팝업에서 트렌디한 '바텀 시트'로 변경 */
#reward-modal {
  background: rgba(2, 8, 28, 0.7) !important;
  backdrop-filter: blur(10px);
  justify-content: flex-end !important; /* 창을 화면 맨 아래로 밀어냄 */
}

#reward-modal .survey-modal-inner {
  position: relative;
  height: auto !important;
  margin: 0 !important;
  width: 100%;
  border-radius: 32px 32px 0 0 !important; /* 위쪽 모서리만 둥글게 */
  background: linear-gradient(180deg, rgba(24,34,89,0.95), rgba(9,18,58,1)) !important;
  border-top: 1px solid rgba(255,255,255,0.15) !important;
  border-bottom: none !important;
  padding: 40px 24px calc(24px + env(safe-area-inset-bottom)) !important;
  animation: sheetSlideUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
}

/* 바텀 시트 상단의 둥근 손잡이(Handle) UI 추가 */
#reward-modal .survey-modal-inner::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 5px;
  background: rgba(255,255,255,0.2);
  border-radius: 999px;
}

@keyframes sheetSlideUp {
  0% { transform: translateY(100%); }
  100% { transform: translateY(0); }
}
/* --- 🌟 4단계: 탭 전환 스무스 페이드인(Fade-in) 애니메이션 --- */

/* 탭이 활성화될 때 딱딱하게 나타나는 대신 애니메이션을 실행하도록 덮어쓰기 */
.page-section.active {
  display: block;
  animation: fadeInTab 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
}

/* 아래에서 위로 살짝 올라오며 선명해지는 효과 */
@keyframes fadeInTab {
  0% {
    opacity: 0;
    transform: translateY(15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
/* --- 🌟 2&3단계: 토스트 알림 & 코스 체크오프 디자인 --- */

/* 1. 토스트 알림창 스타일 */
.toast-container {
  position: fixed;
  bottom: 100px; /* 탭바 위쪽 */
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-message {
  background: rgba(159, 141, 255, 0.9);
  color: #fff;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  animation: toastFadeInOut 2.5s ease forwards;
}

@keyframes toastFadeInOut {
  0% { opacity: 0; transform: translateY(10px); }
  15% { opacity: 1; transform: translateY(0); }
  85% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}

/* 2. 코스 타임라인 체크오프 스타일 */
.timeline-content {
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.timeline-content.completed {
  opacity: 0.5;
  transform: scale(0.98);
  background: rgba(255,255,255,0.02) !important;
}

.timeline-content.completed::after {
  content: '✓ 완료';
  position: absolute;
  top: 16px; right: 16px;
  font-size: 11px;
  font-weight: 800;
  color: var(--mint);
  background: rgba(133,228,209,0.15);
  padding: 4px 8px;
  border-radius: 8px;
}
/* --- 🌟 새로운 풀스크린 장소 상세 페이지 디자인 --- */
.place-modal {
  position: fixed; inset: 0; z-index: 100;
  background: #020a26;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s 0.35s;
}
.place-modal.open {
  visibility: visible;
  transform: translateX(0);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s 0s;
}
.place-modal-inner {
  height: 100%; overflow-y: auto; display: flex; flex-direction: column;
}
.place-topbar {
  position: absolute; top: 0; left: 0; right: 0;
  padding: calc(16px + env(safe-area-inset-top)) 20px 16px;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 10; color: #fff; font-weight: 700; font-size: 16px;
  background: linear-gradient(180deg, rgba(2,10,38,0.85), transparent);
}
.place-hero-img {
  width: 100%; height: 45vh; min-height: 280px;
  background-size: cover; background-position: center;
  position: relative;
}
.place-hero-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, #020a26 100%);
}
.place-content {
  padding: 0 24px 120px; margin-top: -30px; position: relative; z-index: 2; flex: 1;
}
.place-title-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.place-title-row h1 { font-size: 32px; font-weight: 800; margin: 0; letter-spacing: -0.04em; }
.place-tag {
  font-size: 11px; padding: 5px 12px; border-radius: 999px; font-weight: 700;
  background: rgba(133,228,209,0.15); color: var(--mint); border: 1px solid rgba(133,228,209,0.3);
}
.place-tag.ghost { background: transparent; border-color: rgba(255,255,255,0.2); color: var(--text-soft); }
.place-desc { font-size: 15px; line-height: 1.6; color: rgba(255,255,255,0.85); margin-bottom: 32px; }
.place-section { margin-bottom: 26px; }
.place-section h4 { font-size: 14px; font-weight: 800; margin: 0 0 10px; opacity: 0.9; }
.place-section p { font-size: 13px; line-height: 1.6; color: var(--text-soft); margin: 0; }
.place-bottom-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  padding: 16px 24px calc(24px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, #020a26 30%);
  z-index: 10;
}
/* --- 🌟 코스 생성 로딩 스피너 애니메이션 --- */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loading-spinner {
  animation: spin 1s linear infinite;
}