/* M;Y 安 — style.css (auto-extracted) */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@200;400;700&family=Pretendard:wght@300;400;600&display=swap');

:root {
  --bg: #060608;
  --gold: #c9a96e;
  --gold-light: #e8d4a8;
  --gold-dim: rgba(201,169,110,0.35);
  --text: #e8e8e8;
  --text-dim: #999;
  --border: rgba(201,169,110,0.22);
  --card: rgba(255,255,255,0.035);
  --input-bg: rgba(255,255,255,0.05);
  --bubble-ai-bg: rgba(255,255,255,0.03);
  --hd-bg: rgba(6,6,8,0.95);
}

/* ── 라이트 모드 ── */
[data-theme="light"] {
  --bg: #f5f0e8;
  --gold: #8c6420;
  --gold-light: #6a4a14;
  --gold-dim: rgba(140,100,32,0.4);
  --text: #1e1a16;
  --text-dim: #4a3c30;
  --border: rgba(140,100,32,0.28);
  --card: rgba(140,100,32,0.08);
  --input-bg: rgba(140,100,32,0.07);
  --bubble-ai-bg: rgba(140,100,32,0.07);
  --hd-bg: rgba(245,240,232,0.97);
}
/* 라이트 모드 — 추가 가시성 강화 */
[data-theme="light"] .section-label    { color: #4a3c30; }
[data-theme="light"] .section-title    { color: #1e1a16; }
[data-theme="light"] .section-desc     { color: #3a2e24; }
[data-theme="light"] .disclaimer       { color: #5a4e42; }
[data-theme="light"] .card-desc        { color: #3a2e24; }
[data-theme="light"] .fif-label        { color: #4a3c30; }
[data-theme="light"] .fif-optional-note { color: #5a4e42; }
[data-theme="light"] .suggest-chip     { color: #3a2e24; border-color: rgba(140,100,32,0.35); }
[data-theme="light"] .bubble-user      { background: rgba(140,100,32,0.14); color: #1e1a16; }
[data-theme="light"] .bubble-ai        { color: #2a2016; }
[data-theme="light"] .ilchin           { color: #4a3c30; }
[data-theme="light"] .hd-sub           { color: #4a3c30; }
[data-theme="light"] .mypage-name-disp { color: #1e1a16; }
[data-theme="light"] .mypage-email-disp { color: #4a3c30; }
[data-theme="light"] .mypage-section-label { color: #3a2e24; }
[data-theme="light"] .signup-notice    { color: #4a3c30; }
[data-theme="light"] .signup-sub       { color: #3a2e24; }
[data-theme="light"] .free-token-banner { color: #3a2e24; border-color: rgba(140,100,32,0.3); }
[data-theme="light"] .beta-banner      { color: #4a6840; border-color: rgba(60,140,80,0.35); }
[data-theme="light"] .beta-banner strong { color: #2e5a30; }
[data-theme="light"] .token-chip       { color: #4a3c30; border-color: rgba(140,100,32,0.35); }
[data-theme="light"] .token-balance-unit { color: #4a3c30; }
[data-theme="light"] label             { color: #3a2e24; }
[data-theme="light"] ::placeholder     { color: #8a7868; }

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

/* 모든 스크롤바 숨김 */
*::-webkit-scrollbar {
  display: none;
}

* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: fixed; /* 모바일 주소창 숨김 */
  overscroll-behavior: none; /* 바운스 효과 제거 */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE, Edge */
}

html::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

body {
  background: var(--bg);
  font-family: 'Pretendard', sans-serif;
  color: var(--text);
  width: 100vw;
  max-width: 100%;
  height: 100dvh;
  overflow: hidden;
  position: relative;
  transition: background 0.3s ease, color 0.3s ease;
  /* 노치/홈바 safe area */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  /* 모바일 탭 하이라이트 제거 */
  -webkit-tap-highlight-color: transparent;
  /* 버튼은 선택 불가, 텍스트는 선택 가능 */
  -webkit-touch-callout: default;
  /* 스크롤바 숨김 */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE, Edge */
}

body::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

/* 스플래시 화면 */
#splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #060608;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.6s ease;
}
#splash.fade-out { opacity: 0; pointer-events: none; }
#splash .sp-logo {
  font-family: 'Noto Serif KR', serif;
  font-size: 2.8rem;
  font-weight: 200;
  letter-spacing: 16px;
  color: #c9a96e;
  text-shadow: 0 0 40px rgba(201,169,110,0.6);
}
#splash .sp-sub {
  font-size: 0.75rem;
  letter-spacing: 6px;
  color: rgba(201,169,110,0.5);
  text-transform: uppercase;
}
#splash .sp-dots {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
#splash .sp-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(201,169,110,0.4);
  animation: sp-pulse 1.4s ease infinite;
}
#splash .sp-dot:nth-child(2) { animation-delay: .2s; }
#splash .sp-dot:nth-child(3) { animation-delay: .4s; }
@keyframes sp-pulse {
  0%,100% { opacity: .3; transform: scale(1); }
  50%      { opacity: 1;  transform: scale(1.3); }
}

/* ── 배경 오브 ── */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: drift linear infinite;
}
.orb-1 { width:340px;height:340px; background:rgba(75,200,122,0.07); top:-80px;left:-60px; animation-duration:22s; }
.orb-2 { width:260px;height:260px; background:rgba(224,90,74,0.07);  top:30%;right:-80px; animation-duration:28s; animation-delay:-8s; }
.orb-3 { width:300px;height:300px; background:rgba(90,168,224,0.07); bottom:-60px;left:20%; animation-duration:25s; animation-delay:-14s; }
.orb-4 { width:200px;height:200px; background:rgba(212,160,64,0.06);  bottom:20%;right:10%; animation-duration:32s; animation-delay:-5s; }
/* 라이트 모드 오브 — 더 연하게 */
[data-theme="light"] .orb-1 { background:rgba(75,200,122,0.10); }
[data-theme="light"] .orb-2 { background:rgba(224,90,74,0.08); }
[data-theme="light"] .orb-3 { background:rgba(90,168,224,0.10); }
[data-theme="light"] .orb-4 { background:rgba(212,160,64,0.12); }
.orb-5 { width:220px;height:220px; background:rgba(160,170,180,0.05); top:50%;left:40%;  animation-duration:20s; animation-delay:-18s; }

@keyframes drift {
  0%   { transform: translate(0,0) scale(1); }
  33%  { transform: translate(30px,-20px) scale(1.05); }
  66%  { transform: translate(-20px,30px) scale(0.95); }
  100% { transform: translate(0,0) scale(1); }
}

/* 오행 기운 연동: 오브 색상 부드럽게 전환 */
.orb { transition: background 2s ease; }

/* 토큰 -1 팝업 애니메이션 */
@keyframes tokenPopUp {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  60%  { opacity: 0.9; transform: translateY(-22px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-40px) scale(0.8); }
}
.token-pop {
  position: fixed;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  pointer-events: none;
  z-index: 9999;
  animation: tokenPopUp 0.9s ease-out forwards;
  letter-spacing: 0.5px;
}

.app {
  width: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ── 헤더 ── */
.hd {
  padding: 30px 20px 22px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(201,169,110,0.04) 0%, transparent 100%);
}

.hd-logo {
  font-family: 'Noto Serif KR', serif;
  font-size: 2.2rem;
  font-weight: 200;
  letter-spacing: 16px;
  color: var(--gold);
  line-height: 1;
  text-shadow:
    0 2px 4px rgba(0,0,0,0.8),
    0 4px 16px rgba(0,0,0,0.6),
    0 0 40px rgba(201,169,110,0.5),
    0 0 80px rgba(201,169,110,0.25),
    0 0 120px rgba(201,169,110,0.1);
}

.hd-deco {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 10px auto 0;
  max-width: 260px;
}
.hd-deco-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,169,110,0.4), transparent);
}
.hd-deco-symbol {
  font-size: 0.7rem;
  color: rgba(201,169,110,0.5);
  letter-spacing: 2px;
}

.hd-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 5px;
  margin-top: 8px;
  text-transform: uppercase;
}

.ilchin {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 9px 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(201,169,110,0.05);
  backdrop-filter: blur(10px);
}

.ilchin-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: blink 2s infinite;
  box-shadow: 0 0 8px var(--gold);
  flex-shrink: 0;
}
@keyframes blink { 0%,100%{opacity:.3} 50%{opacity:1} }

.ilchin-date {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  padding-right: 10px;
  border-right: 1px solid rgba(201,169,110,0.15);
}

#ilchinText {
  font-size: 0.85rem;
  color: var(--gold-light);
  letter-spacing: 0.5px;
}

/* 헤더 좌측 컨테이너 — 뒤로가기 + 새 대화 */
.hd-left {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 헤더 우측 컨테이너 — userBtn + 언어버튼 묶음 */
.hd-right {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 언어 버튼 */
.langs {
  display: flex;
  gap: 0;
  flex-wrap: nowrap;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  overflow: hidden;
}
.lb {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  border: none;
  border-right: 1px solid rgba(255,255,255,0.08);
  padding: 5px 10px;
  cursor: pointer;
  background: none;
  transition: all .2s;
  white-space: nowrap;
}
.lb:last-child { border-right: none; }
.lb:hover, .lb.on { color: var(--gold); background: rgba(201,169,110,0.1); }

/* 뒤로 버튼 */
.back {
  font-size: 0.7rem;
  color: var(--text-dim);
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  transition: all .2s;
}
.back:hover { color: var(--gold); border-color: var(--gold-dim); }

/* ── 모드 화면 ── */
#screen-mode {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 44px 28px 44px;
  gap: 36px;
  overflow-y: auto;
}

@media (min-width: 600px) {
  #screen-mode {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 56px 44px;
    gap: 36px;
  }
  .mode-left  { width: 100%; max-width: 640px; display: flex; flex-direction: column; gap: 28px; align-items: center; text-align: center; }
  .mode-right { width: 100%; max-width: 640px; display: flex; flex-direction: column; gap: 20px; }
}

.section-label {
  text-align: center;
  font-size: 0.68rem;
  letter-spacing: 6px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.section-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 1.5rem;
  font-weight: 200;
  color: var(--gold-light);
  text-align: center;
  line-height: 1.65;
  letter-spacing: 1px;
}

.section-desc {
  font-size: 0.92rem;
  color: #b0b0b0;
  text-align: center;
  line-height: 2;
}

/* 오행 칩 */
.ohaeng-chips {
  display: flex;
  justify-content: center;
  gap: 16px;
}
.chip {
  font-size: 0.9rem;
  font-weight: 400;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .5;
  transition: all .3s;
  cursor: default;
  letter-spacing: 0;
}
.chip:hover {
  opacity: 1;
  box-shadow: 0 0 16px currentColor;
  transform: scale(1.1);
}
.chip.chip-active {
  opacity: 1;
  box-shadow: 0 0 18px 4px currentColor;
  transform: scale(1.15);
  animation: chipPulse 1.8s ease-in-out infinite;
}
@keyframes chipPulse {
  0%, 100% { box-shadow: 0 0 14px 2px currentColor; transform: scale(1.12); }
  50%       { box-shadow: 0 0 26px 8px currentColor; transform: scale(1.2); }
}

/* 모드 카드 */
.cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  position: relative;
  border-radius: 18px;
  padding: 28px 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 22px;
  background: var(--card);
  transition: all .3s ease;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(201,169,110,0.3), rgba(201,169,110,0.05), rgba(201,169,110,0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,169,110,0.04) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
.card:hover::after { opacity: 1; }
.card:hover {
  background: rgba(201,169,110,0.05);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,169,110,0.25);
}

.card-icon {
  font-size: 2.4rem;
  width: 56px;
  flex-shrink: 0;
  text-align: center;
  filter: drop-shadow(0 0 12px rgba(201,169,110,0.3));
}

.card-body { flex: 1; }

.card-name {
  font-family: 'Noto Serif KR', serif;
  font-size: 1.1rem;
  color: var(--gold);
  font-weight: 400;
  letter-spacing: 1px;
  margin-bottom: 7px;
}

.card-desc {
  font-size: 0.86rem;
  color: #b0b0b0;
  line-height: 1.8;
}

.card-arrow {
  font-size: 1.2rem;
  color: rgba(201,169,110,0.4);
  flex-shrink: 0;
  transition: all .3s;
}
.card:hover .card-arrow {
  color: var(--gold);
  transform: translateX(4px);
}

.disclaimer {
  font-size: 0.75rem;
  color: #999;
  text-align: center;
  line-height: 1.9;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ── 채팅 화면 ── */
#screen-chat {
  flex: 1;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

#chat-window {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 20px;
  scroll-behavior: smooth;
}
#chat-window::-webkit-scrollbar { width: 2px; }
#chat-window::-webkit-scrollbar-thumb { background: var(--border); }

.bubble {
  max-width: 92%;
  padding: 16px 20px;
  font-size: 0.95rem;
  line-height: 1.9;
  border-radius: 18px;
  animation: pop .35s ease;
  white-space: pre-wrap;
  flex-shrink: 0; /* 말풍선이 찌그러지는 것 방지 */
  will-change: transform, opacity; /* GPU 가속 */
  transform: translate3d(0, 0, 0); /* 하드웨어 가속 활성화 */
  user-select: text;
  -webkit-user-select: text;
}
.bubble-ai {
  align-self: flex-start;
  background: var(--bubble-ai-bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
  position: relative;
  padding-bottom: 24px; /* 복사 버튼 공간 확보 */
}
.bubble-user {
  align-self: flex-end;
  background: rgba(201,169,110,0.1);
  border: 1px solid var(--gold-dim);
  color: var(--gold-light);
  border-bottom-right-radius: 4px;
}
/* AI 말풍선 복사 버튼 */
.bubble-copy-btn {
  position: absolute;
  bottom: 6px;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.7rem;
  color: var(--text-dim);
  opacity: 0;
  transition: opacity .2s, color .2s;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1;
}
.bubble-ai:hover .bubble-copy-btn,
.bubble-copy-btn.visible { opacity: 1; }
.bubble-copy-btn:hover { color: var(--gold); background: rgba(255,255,255,0.05); }
.bubble-copy-btn.copied { color: #4bc87a; opacity: 1; }

/* 음료 카드 */
.rx-card {
  align-self: flex-start;
  width: 92%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--gold-dim);
  animation: pop .5s ease;
  flex-shrink: 0; /* 대화가 길어져도 처방 카드가 절대 찌그러지거나 숨겨지지 않음 */
}
.rx-top {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.rx-icon {
  font-size: 2.4rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.rx-info {}
.rx-label {
  font-size: 0.68rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: .6;
  margin-bottom: 4px;
}
.rx-name {
  font-family: 'Noto Serif KR', serif;
  font-size: 1.05rem;
  font-weight: 400;
  margin-bottom: 4px;
}
.rx-desc {
  font-size: 0.78rem;
  opacity: .7;
  line-height: 1.6;
}
.rx-bottom {
  padding: 12px 20px;
  font-size: 0.72rem;
  background: rgba(0,0,0,0.3);
  border-top: 1px solid rgba(255,255,255,0.05);
  color: var(--text-dim);
  line-height: 1.7;
}
.rx-share-btn:hover { background: rgba(255,255,255,0.04); color: var(--gold); }

/* ── 기운 + 일진 듀오 카드 ── */
.rx-duo {
  align-self: flex-start;
  width: 92%;
  display: flex;
  gap: 10px;
  animation: pop .5s ease;
  flex-shrink: 0;
}
/* 왼쪽: 강한 기운 한자 카드 */
.rx-ki-card {
  flex: 0 0 38%;
  border-radius: 16px;
  border: 1px solid;
  background: linear-gradient(160deg, #0f0f0f, #080808);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 10px 18px;
  gap: 5px;
  text-align: center;
}
.rx-ki-eyebrow {
  font-size: 0.6rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: .55;
  margin-bottom: 4px;
}
.rx-ki-hanja {
  font-family: 'Noto Serif KR', serif;
  font-size: 3.8rem;
  line-height: 1;
  font-weight: 700;
}
.rx-ki-name {
  font-family: 'Noto Serif KR', serif;
  font-size: 0.78rem;
  opacity: .8;
  margin-top: 2px;
}
/* 오른쪽: 오늘 행동 카드 */
.rx-act-card {
  flex: 1;
  border-radius: 16px;
  border: 1px solid;
  background: linear-gradient(160deg, #0f0f0f, #080808);
  padding: 18px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.rx-act-eyebrow {
  font-size: 0.6rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: .55;
  margin-bottom: 2px;
}
.rx-act-icon {
  font-size: 1.55rem;
  line-height: 1;
  margin-bottom: 2px;
}
.rx-act-name {
  font-family: 'Noto Serif KR', serif;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.3;
}
.rx-act-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.65;
  margin-top: 2px;
}

/* 사주 오행 게이지 (마이페이지) */
.saju-gauge-section { margin: 24px 0 0; }
.saju-gauge-wrap { display: flex; flex-direction: column; gap: 18px; margin: 18px 0 0; }
.saju-gauge-row { display: flex; align-items: center; gap: 14px; }
.saju-gauge-label {
  width: 64px;
  font-size: 0.88rem;
  font-family: 'Noto Serif KR', serif;
  color: var(--text);
  flex-shrink: 0;
  letter-spacing: 0.5px;
}
.saju-gauge-bar-bg {
  flex: 1;
  height: 11px;
  background: rgba(255,255,255,0.06);
  border-radius: 6px;
  overflow: visible;
  position: relative;
}
.saju-gauge-bar {
  height: 100%;
  border-radius: 6px;
  width: 0;
  transition: width 1.1s cubic-bezier(.4,0,.2,1);
  position: relative;
  filter: brightness(1.2) drop-shadow(0 0 5px var(--glow-color, currentColor));
}
.saju-gauge-pct {
  width: 40px;
  font-size: 0.85rem;
  font-family: 'Pretendard', sans-serif;
  font-weight: 600;
  color: var(--text);
  text-align: right;
  flex-shrink: 0;
}

/* 오행 캘린더 모달 */
#cal-modal {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(0,0,0,0.72);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

/* 공용 모달 (토큰 내역 등) */
.modal {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(0,0,0,0.72);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.modal-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%;
  box-sizing: border-box;
}
.cal-inner {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%; max-width: 380px;
  padding: 24px 20px 20px;
}
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.cal-title { font-family: 'Noto Serif KR', serif; font-size: 1rem; color: var(--gold); letter-spacing: 1px; }
.cal-close { background: none; border: none; color: var(--text-dim); font-size: 1.1rem; cursor: pointer; }
.cal-nav { display: flex; align-items: center; gap: 12px; }
.cal-nav-btn { background: none; border: 1px solid var(--border); color: var(--text-dim); border-radius: 6px; padding: 2px 10px; cursor: pointer; font-size: 0.85rem; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; margin-bottom: 6px; }
.cal-weekday { text-align: center; font-size: 0.65rem; color: var(--text-dim); padding: 4px 0; opacity: 0.5; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.cal-cell {
  aspect-ratio: 1; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; color: var(--text-dim);
  position: relative;
}
.cal-cell.has-entry { color: #fff; font-weight: 600; }
.cal-cell.today { outline: 1.5px solid var(--gold); outline-offset: 1px; }
.cal-cell.empty { background: none; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; justify-content: center; }
.cal-legend-item { display: flex; align-items: center; gap: 4px; font-size: 0.7rem; color: var(--text-dim); }
.cal-legend-dot { width: 8px; height: 8px; border-radius: 50%; }

/* 드로어 배지 shimmer */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.drawer-teaser-badge {
  background: linear-gradient(90deg, rgba(201,169,110,0.1) 25%, rgba(201,169,110,0.3) 50%, rgba(201,169,110,0.1) 75%);
  background-size: 200% auto;
  animation: shimmer 2.4s linear infinite;
}

/* 입력창 */
.input-row {
  padding: 16px 20px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--border);
  background: var(--hd-bg);
  flex-shrink: 0;
}
#inp {
  flex: 1;
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 0.95rem;
  font-family: 'Pretendard', sans-serif;
  outline: none;
  transition: border-color .2s, background .2s;
}
#inp::placeholder { color: var(--text-dim); opacity: 0.6; }
#inp:focus { border-color: rgba(201,169,110,0.6); }
#inp:disabled { opacity: .3; }

#send {
  width: 50px; height: 50px;
  border-radius: 12px;
  border: none;
  background: var(--gold);
  color: #111;
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
#send:hover { background: var(--gold-light); }
#send:disabled { opacity: .25; cursor: not-allowed; }

/* ── 회원가입 화면 ── */
#screen-signup {
  flex: 1;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  padding: 40px 32px 40px;
  gap: 32px;
}

@media (min-width: 600px) {
  #screen-signup {
    padding: 52px 90px;
    justify-content: center;
  }
}

/* 모바일: 폼 그리드 2열 축소 */
@media (max-width: 540px) {
  #screen-signup { padding: 32px 20px 40px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .half { grid-column: 1 / -1; }
  .signup-headline { font-size: 1.55rem; }
}

.signup-header { margin-bottom: 4px; }
.signup-headline {
  font-family: 'Noto Serif KR', serif;
  font-size: 1.9rem;
  font-weight: 200;
  color: var(--gold-light);
  line-height: 1.55;
  white-space: pre-line;
  margin-bottom: 12px;
  letter-spacing: 0;
  text-shadow: 0 0 40px rgba(201,169,110,0.2);
}
.signup-sub {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.85;
  margin-bottom: 6px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 18px 16px;
  max-width: 100%;
}
.form-grid .full  { grid-column: 1 / -1; }
.form-grid .half  { grid-column: 1 / -1; }
.form-grid .third { grid-column: auto; }

/* 넓은 화면에서만 3열 */
@media (min-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .form-grid .half { grid-column: span 2; }
  .form-grid .third { grid-column: span 1; }
}

.field { display: flex; flex-direction: column; gap: 9px; }
.field label {
  font-size: 0.8rem;
  color: rgba(201,169,110,0.7);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.field input, .field select {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 15px 18px;
  color: var(--text);
  font-size: 1rem;
  font-family: 'Pretendard', sans-serif;
  outline: none;
  transition: border-color .2s, background .2s;
  width: 100%;
}
.field input::placeholder { color: var(--text-dim); opacity: 0.6; }
.field input:focus, .field select:focus {
  border-color: rgba(201,169,110,0.6);
}
.field select { cursor: pointer; appearance: none; color: var(--text); }
.field select option { background: var(--bg); color: var(--text); }

.gender-row { display: flex; gap: 10px; }
.gender-btn {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  color: var(--text-dim);
  font-size: 0.88rem;
  font-family: 'Pretendard', sans-serif;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
}
.gender-btn.active {
  border-color: var(--gold-dim);
  background: rgba(201,169,110,0.1);
  color: var(--gold);
}

.submit-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, rgba(201,169,110,0.9), rgba(201,169,110,0.7));
  border: none;
  border-radius: 12px;
  color: #111;
  font-size: 1.05rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Pretendard', sans-serif;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all .2s;
  margin-top: 14px;
}
.submit-btn:hover { background: var(--gold); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(201,169,110,0.2); }
.submit-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.signup-notice {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.42);
  text-align: center;
  line-height: 1.9;
  padding: 4px 8px;
}

/* 성공 화면 */
.signup-success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  flex: 1;
}
.success-icon { font-size: 3rem; animation: pop .4s ease; }
.success-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 1.2rem;
  color: var(--gold);
  font-weight: 200;
  letter-spacing: 2px;
}
.success-desc { font-size: 0.84rem; color: var(--text-dim); line-height: 1.9; }
.success-back {
  margin-top: 8px;
  padding: 12px 28px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: none;
  color: var(--gold);
  font-size: 0.85rem;
  font-family: 'Pretendard', sans-serif;
  cursor: pointer;
  transition: all .2s;
}
.success-back:hover { background: rgba(201,169,110,0.08); }

/* 모드 화면 가입 버튼 */
.signup-link {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  cursor: pointer;
  padding: 10px;
  transition: color .2s;
  letter-spacing: 1px;
}
.signup-link:hover { color: var(--gold); }
.signup-link span { border-bottom: 1px solid currentColor; padding-bottom: 1px; }

/* 카드 잠금 오버레이 힌트 */
.card-lock {
  font-size: 0.72rem;
  color: var(--gold);
  opacity: .7;
  margin-top: 6px;
  letter-spacing: 0.5px;
}

/* 다크/라이트 토글 버튼 */
.theme-toggle-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 32px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all .2s;
  flex-shrink: 0;
  line-height: 1;
}
.theme-toggle-btn:hover {
  background: var(--card);
  border-color: var(--gold-dim);
}

/* 헤더 유저 버튼 */
.user-btn {
  width: auto;
  height: 30px;
  padding: 0 14px;
  border-radius: 15px;
  background: rgba(201,169,110,0.12);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Pretendard', sans-serif;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  flex-shrink: 0;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.user-btn:hover { background: rgba(201,169,110,0.25); box-shadow: 0 0 12px var(--gold-dim); }

/* 마이페이지 화면 */
#screen-mypage {
  flex: 1;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden; /* 가로 스크롤 방지 */
  padding: 100px 32px 60px; /* 상단 패딩 더 증가 80 → 100 */
  max-width: 100vw; /* 화면 너비 초과 방지 */
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch; /* iOS 부드러운 스크롤 */
}

/* 스크롤바 숨기기 (기능은 유지) */
#screen-mypage::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}
#screen-mypage {
  -ms-overflow-style: none;  /* IE, Edge */
  scrollbar-width: none;  /* Firefox */
}

/* mypage-wrap 제거 — 불필요한 컨테이너 */
#mypage-wrap {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 600px) {
  #screen-mypage {
    padding: 52px 90px 80px;
    justify-content: flex-start;
    max-width: 800px; /* 최대 너비 제한 */
    margin: 0 auto;
  }
}
@media (max-width: 540px) {
  #screen-mypage { padding: 90px 20px 60px; } /* 모바일 상단 여백 더 증가 70 → 90 */
}
@media (max-width: 400px) {
  #screen-mypage { padding: 85px 16px 56px; } /* 초소형 화면 */
}
.mypage-profile {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}
.mypage-avatar {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(201,169,110,0.12);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-family: 'Noto Serif KR', serif;
  font-size: 1.5rem;
  font-weight: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mypage-name-disp {
  font-family: 'Noto Serif KR', serif;
  font-size: 1.15rem;
  color: var(--gold-light);
  font-weight: 200;
  margin-bottom: 4px;
}
.mypage-email-disp {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.3px;
}
.mypage-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 24px;
}
.mypage-section-label {
  font-size: 0.72rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: rgba(201,169,110,0.65);
  margin-bottom: 20px;
}

/* 마이페이지 생년월일 그리드 */
.mypage-birth-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 540px) {
  .mypage-birth-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 10px;
  }
}
@media (max-width: 400px) {
  .mypage-birth-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* 마이페이지 상세 정보 그리드 */
.mypage-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.mypage-detail-grid .field-full {
  grid-column: 1 / -1;
}
@media (max-width: 540px) {
  .mypage-detail-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .mypage-detail-grid .field {
    grid-column: 1 / -1;
  }
}
.mypage-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.mypage-action-btn {
  flex: 1;
  min-width: 120px;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: none;
  color: var(--text-dim);
  font-size: 0.8rem;
  font-family: 'Pretendard', sans-serif;
  cursor: pointer;
  transition: all .25s;
  text-align: center;
}
.mypage-action-btn:hover { border-color: rgba(255,255,255,0.18); color: var(--text); }
.mypage-action-btn.danger { color: #c06060; }
.mypage-action-btn.danger:hover { border-color: #c06060; background: rgba(192,96,96,0.06); }

/* 구글 로그인 */
.google-btn-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  min-height: 44px;
}
.google-btn-wrap > div {
  width: 100%;
  max-width: 400px;
}
.or-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0 8px;
}
.or-divider::before, .or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.or-divider span {
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  white-space: nowrap;
}
.google-filled {
  border-color: rgba(201,169,110,0.7) !important;
  background: rgba(201,169,110,0.06) !important;
  transition: border-color .4s, background .4s;
}

/* ── 로그인 화면 ── */
#screen-login {
  flex: 1;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  overflow-y: auto;
}
.login-wrap {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 1.75rem;
  font-weight: 200;
  color: var(--gold-light);
  line-height: 1.55;
  white-space: pre-line;
  margin-bottom: 6px;
  text-shadow: 0 0 40px rgba(201,169,110,0.2);
}
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle {
  position: absolute;
  right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  font-size: 0.85rem; opacity: 0.35; transition: opacity .2s;
  padding: 0; color: var(--text); line-height: 1;
}
.pw-toggle:hover { opacity: 0.75; }
.login-err {
  font-size: 0.78rem;
  color: #e07070;
  min-height: 18px;
  text-align: center;
}

/* ── 토큰 칩 (채팅 입력창) ── */
.token-chip {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  color: rgba(201,169,110,0.7);
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0 10px 0 4px;
  border-right: 1px solid var(--border);
  cursor: pointer;
  transition: color .2s;
  user-select: none;
}
.token-chip:hover { color: var(--gold); }
.token-chip.low { color: #e07070; }

/* ── 마이페이지 토큰 섹션 ── */
.token-balance-display {
  text-align: center;
  padding: 22px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  margin-bottom: 16px;
}
.token-balance-num {
  font-family: 'Noto Serif KR', serif;
  font-size: 3rem;
  font-weight: 200;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 5px;
  text-shadow: 0 0 30px rgba(201,169,110,0.3);
}
.token-balance-unit {
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 4px;
  text-transform: uppercase;
}

/* 패키지 그리드 */
.pkg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
@media (max-width: 540px) {
  .pkg-grid { grid-template-columns: 1fr 1fr; }
}
.pkg-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 14px;
  cursor: pointer;
  background: var(--card);
  transition: all .25s;
  position: relative;
  overflow: hidden;
}
.pkg-card:hover {
  border-color: var(--gold-dim);
  background: rgba(201,169,110,0.05);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.pkg-card.sub-card { border-color: rgba(201,169,110,0.15); }
.pkg-sub-label {
  position: absolute;
  top: 8px; right: 8px;
  font-size: 0.72rem;
  background: rgba(201,169,110,0.15);
  color: var(--gold);
  border-radius: 999px;
  padding: 2px 7px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.pkg-badge {
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.pkg-tokens {
  font-family: 'Noto Serif KR', serif;
  font-size: 1.3rem;
  color: var(--gold-light);
  font-weight: 200;
  margin-bottom: 3px;
}
.pkg-price {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.pkg-btn {
  width: 100%;
  padding: 7px 8px;
  border: 1px solid var(--gold-dim);
  border-radius: 8px;
  background: none;
  color: var(--gold);
  font-size: 0.68rem;
  font-family: 'Pretendard', sans-serif;
  pointer-events: none;
  letter-spacing: 0.5px;
}


/* ── 퀵액세스 바 (메인 화면 하단) ── */
.quick-access-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.quick-access-row .quick-box {
  width: 100%;
  max-width: 480px;
}
@media (min-width: 600px) {
  .quick-access-row {
    width: 100%;
    max-width: 640px;
    margin-top: 0;
  }
}
.quick-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: all .25s;
  position: relative;
  overflow: hidden;
  text-align: left;
}
.quick-box::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.fortune-box::before{ background: linear-gradient(135deg, rgba(212,165,116,0.1), transparent 70%); }
.token-box::before  { background: linear-gradient(135deg, rgba(201,169,110,0.1), transparent 70%); }
.support-box::before{ background: linear-gradient(135deg, rgba(90,168,224,0.1),  transparent 70%); }
.quick-box:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.45); }
.quick-box:hover::before { opacity: 1; }
.fortune-box:hover{ border-color: rgba(212,165,116,0.5); }
.token-box:hover  { border-color: rgba(201,169,110,0.5); }
.support-box:hover{ border-color: rgba(90,168,224,0.4); }
.quick-icon { font-size: 1.6rem; flex-shrink: 0; line-height: 1; }
.quick-body { flex: 1; min-width: 0; }
.quick-title {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--gold-light);
  margin-bottom: 4px;
}
.support-box .quick-title { color: #7ec8f0; }
.quick-desc {
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quick-arrow {
  font-size: 1.3rem;
  color: rgba(201,169,110,0.35);
  transition: all .25s;
  flex-shrink: 0;
}
.fortune-box .quick-arrow { color: rgba(212,165,116,0.35); }
.support-box .quick-arrow { color: rgba(90,168,224,0.35); }
.quick-box:hover .quick-arrow { transform: translateX(3px); }
.fortune-box:hover .quick-arrow { color: #d4a574; }
.token-box:hover  .quick-arrow { color: var(--gold); }
.support-box:hover .quick-arrow { color: #7ec8f0; }
@media (max-width: 400px) {
  .quick-box { padding: 14px 12px; gap: 10px; }
  .quick-title { font-size: 0.82rem; }
  .quick-desc { display: none; }
}

/* ── 법적 푸터 ── */
.legal-footer {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 12px 0 4px;
}
.legal-footer a {
  font-size: 0.72rem;
  color: rgba(201,169,110,0.4);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color .2s;
}
.legal-footer a:hover { color: rgba(201,169,110,0.75); }

/* ── 법적 모달 ── */
/* ── 범용 모달 오버레이 (상세 풀이 등) ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 1200;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-overlay.active {
  display: flex;
}
.modal-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 22px;
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: fadeIn .25s ease;
  will-change: transform, opacity;
  transform: translate3d(0, 0, 0);
  user-select: text;
  -webkit-user-select: text;
}
.modal-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--gold-light);
  margin-bottom: 6px;
}
.detail-area-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.detail-area-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.detail-area-body {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.75;
  user-select: text;
  -webkit-user-select: text;
}

.legal-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(6,6,8,0.88);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 9000;
  animation: fadeIn .2s ease;
}
.legal-modal-box {
  background: #111114;
  border: 1px solid rgba(201,169,110,0.2);
  border-radius: 16px 16px 0 0;
  width: 100%; max-width: 640px;
  max-height: 82vh;
  display: flex; flex-direction: column;
  padding: 0 0 env(safe-area-inset-bottom,0);
}
.legal-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(201,169,110,0.12);
}
.legal-modal-title {
  font-size: 0.88rem; letter-spacing: 0.08em;
  color: var(--gold); font-weight: 600;
}
.legal-modal-close {
  background: none; border: none; color: rgba(255,255,255,0.4);
  font-size: 1.2rem; cursor: pointer; padding: 0 4px;
}
.legal-modal-body {
  overflow-y: auto; padding: 20px;
  font-size: 0.78rem; line-height: 1.8;
  color: rgba(255,255,255,0.55);
}
.legal-modal-body h3 {
  font-size: 0.82rem; color: rgba(201,169,110,0.8);
  margin: 18px 0 6px; font-weight: 600; letter-spacing: 0.06em;
}
.legal-modal-body h3:first-child { margin-top: 0; }
.legal-modal-body p { margin: 0 0 8px; }
.legal-modal-body table {
  width: 100%; border-collapse: collapse;
  margin: 8px 0; font-size: 0.75rem;
}
.legal-modal-body td, .legal-modal-body th {
  border: 1px solid rgba(201,169,110,0.15);
  padding: 6px 8px; text-align: left; vertical-align: top;
}
.legal-modal-body th {
  color: rgba(201,169,110,0.7); font-weight: 600; background: rgba(201,169,110,0.04);
}

/* ── 토큰충전 모달 ── */
#token-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(8px);
}
@media (min-width: 600px) {
  #token-modal { align-items: center; }
  .token-modal-box {
    border-radius: 24px !important;
    border-bottom: 1px solid var(--border) !important;
  }
}
.token-modal-box {
  width: 100%;
  max-width: 520px;
  background: #0d0d11;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  padding: 28px 22px 44px;
  animation: tmSlideUp .28s ease;
}
@keyframes tmSlideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.token-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.token-modal-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 1.15rem;
  font-weight: 200;
  color: var(--gold);
  letter-spacing: 3px;
}
.token-modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all .2s;
  display: flex; align-items: center; justify-content: center;
}
.token-modal-close:hover { background: rgba(255,255,255,0.14); color: var(--text); }
.token-modal-balance {
  text-align: center;
  padding: 18px 16px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  margin-bottom: 18px;
}
.token-modal-balance-num {
  font-family: 'Noto Serif KR', serif;
  font-size: 2.8rem;
  font-weight: 200;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
  text-shadow: 0 0 30px rgba(201,169,110,0.3);
}
.token-modal-balance-lbl {
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 4px;
  text-transform: uppercase;
}
.token-modal-note {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: 16px;
  line-height: 1.7;
  padding: 12px 14px;
  background: rgba(255,255,255,0.02);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.05);
}

/* ── Change 1: 무료 토큰 배너 ── */
.free-token-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  background: linear-gradient(90deg, rgba(201,169,110,0.12), rgba(201,169,110,0.06), rgba(201,169,110,0.12));
  border: 1px solid rgba(201,169,110,0.3);
  border-radius: 10px;
  font-size: 0.78rem;
  color: var(--gold-light);
  letter-spacing: 0.5px;
  animation: fadeIn .4s ease;
  cursor: pointer;
  transition: background .2s;
}
.free-token-banner:hover { background: rgba(201,169,110,0.18); }
.free-token-banner .ftb-icon { font-size: 0.9rem; }
.free-token-banner strong { color: var(--gold); font-weight: 600; }

/* ── 베타 배너 ── */
.beta-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  background: linear-gradient(90deg, rgba(74,196,120,0.10), rgba(74,196,120,0.05), rgba(74,196,120,0.10));
  border: 1px solid rgba(74,196,120,0.28);
  border-radius: 10px;
  font-size: 0.78rem;
  color: #7de8a8;
  letter-spacing: 0.4px;
  animation: fadeIn .4s ease;
}
.beta-banner strong { color: #a8f0c4; font-weight: 600; }

/* ── Change 3: BEST 카드 강조 ── */
.pkg-card.best-card {
  border-color: var(--gold-dim);
  background: rgba(201,169,110,0.06);
  box-shadow: 0 0 20px rgba(201,169,110,0.08), inset 0 0 30px rgba(201,169,110,0.03);
}
.pkg-best-badge {
  display: block;
  background: var(--gold);
  color: #060608;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 7px;
  border-radius: 999px;
  margin-top: 10px;
  text-transform: uppercase;
  text-align: center;
}
.pkg-unit-price {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-top: -8px;
  margin-bottom: 10px;
}

/* ── Change 4: 채팅 추천 질문 칩 ── */
.suggest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 4px;
  animation: fadeIn .4s ease;
}
.suggest-chip {
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text-dim);
  background: var(--card);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.suggest-chip:hover {
  border-color: var(--gold-dim);
  color: var(--gold-light);
  background: rgba(201,169,110,0.06);
}

/* ── Change 2: 채팅 첫 입력 구조화 폼 ── */
#firstInputForm {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  animation: fadeIn .3s ease;
}
.fif-row {
  display: flex;
  gap: 8px;
}
.fif-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.fif-label {
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.fif-input {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--text);
  font-size: 0.85rem;
  font-family: 'Pretendard', sans-serif;
  outline: none;
  transition: border-color .2s;
  width: 100%;
  /* select/number input 브라우저 기본 외형 제거 */
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: none;
}
/* number input 스피너 화살표 숨김 (크롬/사파리) */
.fif-input[type="number"]::-webkit-outer-spin-button,
.fif-input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.fif-input:focus { border-color: var(--gold-dim); }
/* select 드롭다운 화살표 커스텀 (fifTime 유지용) */
.fif-input[type="select"],
select.fif-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c9a96e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
  color: var(--text);
}
select.fif-input option { background: var(--bg); color: var(--text); }
.fif-submit {
  width: 100%;
  padding: 11px;
  background: var(--gold);
  color: #060608;
  border: none;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Pretendard', sans-serif;
  cursor: pointer;
  transition: background .2s;
}
.fif-submit:hover { background: var(--gold-light); }
.fif-optional-note {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-align: center;
}

/* 로딩 */
.loading { display:flex; gap:6px; padding:8px 4px; }
.loading span {
  width:7px; height:7px;
  background: var(--gold);
  border-radius: 50%;
  animation: bounce 1.4s infinite;
}
.loading span:nth-child(2){animation-delay:.2s}
.loading span:nth-child(3){animation-delay:.4s}
/* 사이클 문구 로더 */
.loading-msg {
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.loader-text {
  font-size: 0.82rem;
  color: var(--text-dim);
  opacity: 1;
  transition: opacity 0.25s ease;
  font-style: italic;
}
.loader-progress {
  width: 200px; /* 고정 너비로 변경 */
  min-width: 200px;
  max-width: 100%;
  height: 3px;
  background: rgba(201,169,110,0.15);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.loader-progress-bar {
  height: 100%;
  background: linear-gradient(90deg,
    rgba(201,169,110,0.4),
    rgba(201,169,110,0.8),
    rgba(201,169,110,0.4)
  );
  background-size: 200% 100%;
  animation: loadingProgress 2s ease-in-out forwards,
             shimmer 1.5s ease-in-out infinite;
  border-radius: 2px;
  width: 0%;
}
@keyframes loadingProgress {
  0% { width: 0%; }
  100% { width: 95%; }
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
  letter-spacing: 0.01em;
}
@keyframes bounce { 0%,80%,100%{transform:translateY(0);opacity:.3} 40%{transform:translateY(-6px);opacity:1} }
@keyframes pop {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
#screen-mode, #screen-chat, #screen-signup, #screen-login, #screen-mypage { animation: fadeIn .3s ease; }

/* ── 모바일 최적화 ── */
@media (max-width: 480px) {

  /* ───── 헤더: 겹침 완전 해소 ───── */
  /* hd를 flex-column으로 바꿔 absolute 겹침 제거 */
  .hd {
    padding: 8px 12px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
  }

  /* hd-right을 normal flow 상단 우측으로 */
  .hd-right {
    position: static;
    transform: none;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    min-height: 32px;
  }

  /* 뒤로 버튼 — hd-left 컨테이너 안에 위치 */
  .back {
    font-size: 0.68rem;
    padding: 3px 8px;
  }

  /* hd-left 모바일 조정 */
  .hd-left {
    top: 10px;
    left: 12px;
    transform: none;
  }

  /* 로고 */
  .hd-logo { font-size: 1.7rem; letter-spacing: 10px; margin-top: 2px; }

  /* 장식선 */
  .hd-deco { margin-top: 8px; max-width: 220px; }

  /* 서브 태그라인 · 일진 배지 — 공간 확보를 위해 숨김 */
  .hd-sub  { display: none; }
  .ilchin  { display: none; }

  /* 언어 버튼 — 모바일에서는 헤더 언어바 숨김 (사이드 드로어에서 선택) */
  .hd-right .langs { display: none; }
  .lb { font-size: 0.68rem; padding: 4px 7px; }

  /* ───── 각 화면 스크롤 가능하게 ───── */
  #screen-mode,
  #screen-signup,
  #screen-login,
  #screen-mypage {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ───── 모드 화면 — 여유롭게 ───── */
  #screen-mode {
    padding: 36px 22px 60px;
    gap: 32px;
    /* 그리드 해제하고 flex-column 유지 */
    display: flex;
    flex-direction: column;
  }

  .section-label { letter-spacing: 4px; }
  .section-title { font-size: 1.3rem; line-height: 1.7; }
  .section-desc  { font-size: 0.86rem; line-height: 2.0; }

  /* 오행 칩 */
  .ohaeng-chips { gap: 14px; margin: 8px 0; }
  .chip { width: 42px; height: 42px; font-size: 0.85rem; }

  /* 모드 카드 */
  .card {
    padding: 26px 22px;
    gap: 18px;
    border-radius: 18px;
    min-height: 110px;
    align-items: center;
  }
  .card-icon { font-size: 2.1rem; width: 50px; }
  .card-name { font-size: 1rem; margin-bottom: 8px; }
  .card-desc {
    font-size: 0.82rem;
    line-height: 1.85;
    word-break: keep-all;
    word-wrap: break-word;
  }
  /* mode-right: grid로 두 카드 동일 높이 + 간격 확보 */
  .mode-right {
    display: grid !important;
    grid-template-rows: 1fr 1fr auto !important;
    gap: 20px !important;
  }
  /* カ드가 grid 셀을 꽉 채우도록 */
  .mode-right .card {
    height: 100%;
    align-items: center;
  }

  /* 면책 안내 */
  .disclaimer { font-size: 0.63rem; padding-top: 12px; }

  /* ───── 로그인 화면 ───── */
  #screen-login {
    justify-content: flex-start;   /* center → start: 스크롤 방해 해소 */
    padding: 32px 24px 56px;
    align-items: center;
  }
  .login-wrap { gap: 14px; width: 100%; max-width: 420px; }
  .login-title { font-size: 1.45rem; }

  /* ───── 회원가입 화면 ───── */
  #screen-signup { padding: 28px 20px 56px; gap: 28px; }
  .signup-headline { font-size: 1.4rem; }
  .signup-sub { font-size: 0.84rem; line-height: 1.9; }
  .form-grid { gap: 16px 14px; }

  /* ───── 마이페이지 ───── */
  #screen-mypage { padding: 90px 20px 60px; }
  .mypage-actions { flex-direction: column; }
  .mypage-action-btn { min-width: unset; padding: 14px 16px; }
  .mypage-profile { gap: 14px; margin-bottom: 24px; }
  .mypage-avatar { width: 48px; height: 48px; font-size: 1.3rem; }
  .mypage-name-disp { font-size: 1.05rem; }
  .mypage-email-disp { font-size: 0.74rem; }

  /* 마이페이지 form-grid 모바일 최적화 */
  #screen-mypage .form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  #screen-mypage .form-grid .field {
    grid-column: 1 / -1;
  }
  #screen-mypage .form-grid .field.third,
  #screen-mypage .form-grid .field.half {
    grid-column: 1 / -1;
  }

  /* 마이페이지 알림·액션 버튼 영역 */
  .mypage-actions > div {
    width: 100%;
  }
  .notif-toggle-btn, .notif-settings-btn {
    font-size: 0.85rem !important;
    padding: 12px 14px !important;
  }

  /* 하단 카드 마진 조정 */
  .mp-bottom-cards {
    margin: 16px 0 20px;
  }

  /* 토큰 밸런스 모바일 크기 조정 */
  .token-balance-num {
    font-size: 2.4rem;
  }
  .token-balance-display {
    padding: 18px 14px;
  }

  /* 저장 버튼 크기 */
  #mypageSaveBtn {
    padding: 15px 20px;
    font-size: 0.9rem;
  }

  /* 섹션 라벨 */
  .mypage-section-label {
    font-size: 0.68rem;
    letter-spacing: 4px;
    margin-bottom: 16px;
  }

  /* 디바이더 간격 */
  .mypage-divider {
    margin-bottom: 20px;
  }

  /* Input 및 Select 터치 영역 확대 */
  #screen-mypage input,
  #screen-mypage select {
    font-size: 0.9rem;
    padding: 12px 14px;
    min-height: 44px;
  }

  /* 성별 버튼 터치 영역 */
  .gender-btn {
    padding: 13px 12px;
    font-size: 0.86rem;
    min-height: 44px;
  }

  /* ───── 채팅 입력창 ───── */
  .input-row { padding: 10px 12px; gap: 8px; }
  .token-chip { font-size: 0.68rem; padding: 0 8px 0 2px; }
  #inp { font-size: 0.88rem; padding: 11px 14px; }
  #send { width: 44px; height: 44px; font-size: 0.9rem; }

  /* 채팅 버블 */
  .bubble { font-size: 0.88rem; padding: 13px 16px; }
  #chat-window { padding: 20px 14px; gap: 18px; }

  /* ───── 패키지 그리드 ───── */
  .pkg-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pkg-grid.sub-grid { grid-template-columns: 1fr; }
  .pkg-card { padding: 16px 14px; }
  .pkg-tokens { font-size: 1.1rem; }
  .pkg-price  { font-size: 0.7rem; }

  /* ───── 관리자 패널 ───── */
  .admin-box { padding: 22px 16px 20px; }
  .admin-card { padding: 14px 14px; gap: 10px; }
  .admin-approve-btn { padding: 8px 14px; font-size: 0.75rem; }
}

/* 극소형 화면 (375px 미만 — 아이폰 SE 등) */
@media (max-width: 374px) {
  .hd-logo { font-size: 1.45rem; letter-spacing: 7px; }
  .lb { font-size: 0.5rem; padding: 4px 5px; }
  .hd-deco { display: none; }

  /* 마이페이지 극소형 최적화 */
  #screen-mypage { padding: 85px 14px 56px; }
  .mypage-profile { gap: 12px; }
  .mypage-avatar { width: 44px; height: 44px; font-size: 1.2rem; }
  .mypage-name-disp { font-size: 1rem; }
  .mypage-email-disp { font-size: 0.72rem; }
  .mypage-birth-grid { gap: 8px; }
  .mypage-detail-grid { gap: 12px; }
  .token-balance-num { font-size: 2.2rem; }
  .mp-bottom-cards { margin: 14px 0 18px; }
  .mp-bc-icon { font-size: 1.2rem; width: 32px; }
  .mp-bc-title { font-size: 0.82rem; }
  .mp-bc-desc { font-size: 0.7rem; }
}

/* ── 이용 안내 모달 ── */
#guide-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  animation: fadeIn .3s ease;
}
.guide-box {
  background: #0d0d10;
  border: 1px solid rgba(201,169,110,0.3);
  border-radius: 22px;
  padding: 36px 32px 28px;
  max-width: 440px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.7);
}
.guide-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 1.25rem;
  font-weight: 200;
  color: var(--gold-light);
  letter-spacing: 1px;
  text-align: center;
}
.guide-deco {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,169,110,0.35), transparent);
}
.guide-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.guide-item {
  font-size: 0.88rem;
  color: #c0c0c0;
  line-height: 1.75;
  padding-left: 4px;
}
.guide-confirm-btn {
  margin-top: 4px;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--gold-dim);
  background: rgba(201,169,110,0.1);
  color: var(--gold);
  font-size: 0.92rem;
  font-family: 'Pretendard', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: 0.5px;
}
.guide-confirm-btn:hover {
  background: rgba(201,169,110,0.22);
  box-shadow: 0 4px 20px rgba(201,169,110,0.15);
}
.guide-skip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: background .2s;
  margin-top: -4px;
}
.guide-skip-row:hover { background: rgba(255,255,255,0.06); }
.guide-skip-row input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
}
.guide-skip-row span {
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.3px;
  user-select: none;
}
@media (max-width: 480px) {
  .guide-box { padding: 28px 22px 22px; gap: 16px; border-radius: 18px; }
  .guide-title { font-size: 1.1rem; }
  .guide-item { font-size: 0.85rem; }
}

/* ── 관리자 버튼 (헤더) ── */
.admin-hd-btn {
  position: relative;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-dim);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  flex-shrink: 0;
}
.admin-hd-btn:hover { color: var(--gold); border-color: var(--gold-dim); }
.admin-hd-dot {
  position: absolute;
  top: -2px; right: -2px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #e05a4a;
  border: 2px solid var(--bg);
  display: none;
  animation: dotPulse 1.5s ease infinite;
}
.admin-hd-dot.on { display: block; }
@keyframes dotPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(224,90,74,0.4); }
  50%      { box-shadow: 0 0 0 4px rgba(224,90,74,0); }
}

/* ══════════════════════════════════════
   ── 사이드 드로어 메뉴 ──
══════════════════════════════════════ */
#menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0);
  pointer-events: none;
  transition: background .3s ease;
}
#menu-overlay.open {
  background: rgba(0,0,0,0.55);
  pointer-events: all;
}

#side-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(320px, 88vw);
  z-index: 9001;
  background: var(--hd-bg);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: -8px 0 40px rgba(0,0,0,0.4);
}
#side-drawer.open {
  transform: translateX(0);
}

/* 드로어 헤더 */
.drawer-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.drawer-brand {
  font-family: 'Noto Serif KR', serif;
  font-size: 1.1rem;
  font-weight: 200;
  letter-spacing: 6px;
  color: var(--gold);
}
.drawer-close {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: none;
  color: var(--text-dim);
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  flex-shrink: 0;
}
.drawer-close:hover { color: var(--text); border-color: var(--gold-dim); }

/* 프로필 섹션 */
.drawer-profile {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background .2s;
}
.drawer-profile:hover { background: var(--card); }
.drawer-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(201,169,110,0.15);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.drawer-user-info { flex: 1; min-width: 0; }
.drawer-user-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drawer-user-email {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drawer-token-badge {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(201,169,110,0.12);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 비로그인 프로필 */
.drawer-login-prompt {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.drawer-login-btn {
  width: 100%;
  padding: 11px;
  background: rgba(201,169,110,0.12);
  border: 1px solid var(--gold-dim);
  border-radius: 10px;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Pretendard', sans-serif;
  cursor: pointer;
  transition: all .2s;
}
.drawer-login-btn:hover { background: rgba(201,169,110,0.22); }

/* 드로어 티저 */
.drawer-teaser-badge {
  font-size: 0.73rem;
  color: var(--gold);
  background: rgba(201,169,110,0.1);
  border: 1px solid rgba(201,169,110,0.2);
  border-radius: 20px;
  padding: 5px 12px;
  text-align: center;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}
.drawer-teaser-preview {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.drawer-teaser-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.05);
  font-size: 0.8rem;
  color: var(--text-dim);
  filter: blur(0.4px);
  opacity: 0.6;
  pointer-events: none;
}

/* 메뉴 섹션 */
.drawer-section {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.drawer-section-label {
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 8px 8px;
}
.drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s;
  color: var(--text);
  font-size: 0.88rem;
  border: none;
  background: none;
  width: 100%;
  font-family: 'Pretendard', sans-serif;
  text-align: left;
}
.drawer-item:hover { background: var(--card); }
.drawer-item.active { background: rgba(201,169,110,0.1); color: var(--gold); }
.drawer-item-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--card);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.drawer-item-text { flex: 1; }
.drawer-item-sub {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 1px;
}
.drawer-item-arrow { color: var(--text-dim); font-size: 0.8rem; }

/* 언어 선택 (드로어 내) */
.drawer-langs {
  display: flex;
  gap: 6px;
  padding: 4px 8px 8px;
}
.drawer-lb {
  flex: 1;
  padding: 8px 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: none;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: 'Pretendard', sans-serif;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
}
.drawer-lb:hover { border-color: var(--gold-dim); color: var(--gold); }
.drawer-lb.on { background: rgba(201,169,110,0.12); border-color: var(--gold-dim); color: var(--gold); }

/* 테마 토글 (드로어 내) */
.drawer-theme-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px;
  border-radius: 10px;
}
.drawer-theme-label { font-size: 0.88rem; color: var(--text); }
.drawer-theme-toggle {
  display: flex;
  gap: 6px;
}
.drawer-theme-btn {
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-dim);
  font-size: 0.78rem;
  cursor: pointer;
  font-family: 'Pretendard', sans-serif;
  transition: all .2s;
}
.drawer-theme-btn.on { background: rgba(201,169,110,0.12); border-color: var(--gold-dim); color: var(--gold); }

/* 드로어 푸터 */
.drawer-footer {
  padding: 16px 20px;
  margin-top: auto;
  flex-shrink: 0;
}
.drawer-version {
  font-size: 0.62rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-align: center;
}

/* 햄버거 버튼 */
.menu-btn {
  width: 32px; height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 7px;
  transition: all .2s;
  flex-shrink: 0;
}
.menu-btn:hover { border-color: var(--gold-dim); background: var(--card); }
.menu-btn span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text-dim);
  border-radius: 2px;
  transition: all .2s;
}
.menu-btn:hover span { background: var(--gold); }

/* ── 관리자 패널 ── */
#admin-panel {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 16px 5vh;
  overflow-y: auto;
}
.admin-box {
  position: relative;
  background: #0d0d11;
  border: 1px solid rgba(201,169,110,0.2);
  border-radius: 20px;
  padding: 26px 22px 22px;
  width: min(500px, 100%);
  max-height: 85dvh;
  overflow-y: auto;
  animation: payBoxIn .2s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(201,169,110,0.2) transparent;
}
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.admin-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 0.9rem;
  color: var(--gold);
  letter-spacing: 3px;
}
.admin-header-right { display: flex; gap: 8px; align-items: center; }
.admin-refresh {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-dim);
  font-size: 0.68rem;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: 0.5px;
}
.admin-refresh:hover { color: var(--gold); border-color: var(--gold-dim); }
.admin-close-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1rem;
  cursor: pointer;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.admin-close-btn:hover { color: var(--gold); background: rgba(201,169,110,0.1); }
.admin-tabs {
  display: flex;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}
.admin-tab {
  flex: 1;
  background: none;
  border: none;
  border-right: 1px solid rgba(255,255,255,0.08);
  color: var(--text-dim);
  font-size: 0.7rem;
  padding: 7px 4px;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: 0.5px;
}
.admin-tab:last-child { border-right: none; }
.admin-tab.on { color: var(--gold); background: rgba(201,169,110,0.1); }
.admin-empty {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  padding: 36px 0;
  letter-spacing: 1px;
}
.admin-card {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.02);
  transition: border-color .2s;
}
.admin-card:hover { border-color: rgba(201,169,110,0.2); }
.admin-card-info { flex: 1; min-width: 0; }
.admin-card-email {
  font-size: 0.8rem;
  color: var(--gold-light);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-card-detail {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 3px;
}
.admin-card-time {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.22);
  margin-top: 2px;
}
.admin-approve-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #4bc87a, #2ea85e);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
  flex-shrink: 0;
}
.admin-approve-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.admin-approve-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; filter: none; }
.admin-approved-tag {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(75,200,122,0.25);
  color: rgba(75,200,122,0.7);
  font-size: 0.72rem;
  flex-shrink: 0;
}

/* ── 전역 select 드롭다운 텍스트/옵션 색상 (모든 브라우저/OS 대응) ──── */
/* select 자체: 어두운 앱 배경에서 잘 보이도록 밝은 색 */
select { color: #e8d8b0 !important; }
/* option 목록: 어두운 배경 + 골드 텍스트 */
select option { background-color: #1a1410 !important; color: #e8d8b0 !important; }

/* ── 메인화면 언어 선택 행 ──────────────────────────────────────── */
.main-lang-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px 4px;
}
.main-lb {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  color: var(--text-dim);
  font-size: 0.75rem;
  cursor: pointer;
  transition: border-color .2s, color .2s;
  letter-spacing: 0.3px;
}
.main-lb:hover { border-color: rgba(201,169,110,0.4); color: var(--gold-dim); }
.main-lb.on { border-color: var(--gold-dim); color: var(--gold); }

/* ── 마이페이지 토큰 0 안내 ─────────────────────────────────────── */
.mp-zero-note {
  margin: 12px 20px 0;
  padding: 12px 16px;
  background: rgba(201,169,110,0.08);
  border: 1px solid rgba(201,169,110,0.22);
  border-radius: 12px;
  font-size: 0.78rem;
  color: var(--gold-dim);
  line-height: 1.55;
  text-align: center;
  letter-spacing: 0.2px;
}

/* ── 마이페이지 하단 카드 (충전·상담) ──────────────────────────── */
.mp-bottom-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 20px 24px;
}
.mp-bottom-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.mp-bottom-card:hover {
  border-color: rgba(201,169,110,0.25);
  background: rgba(201,169,110,0.05);
}
.mp-bc-icon {
  font-size: 1.3rem;
  width: 36px;
  text-align: center;
  flex-shrink: 0;
  color: var(--gold);
}
.mp-bc-body { flex: 1; min-width: 0; }
.mp-bc-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  letter-spacing: 0.2px;
}
.mp-bc-desc {
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.4;
}
.mp-bc-arrow {
  font-size: 1.2rem;
  color: var(--text-dim);
  flex-shrink: 0;
  opacity: 0.6;
}

/* ════════════════════════════════════════
   홈 프리뷰 배너
════════════════════════════════════════ */
.home-preview-banner {
  background: linear-gradient(135deg, var(--card) 0%, rgba(var(--accent-rgb,139,90,43),0.15) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 12px 0 8px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.home-preview-banner:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.home-preview-icon { font-size: 2.2rem; flex-shrink: 0; }
.home-preview-text { flex: 1; min-width: 0; }
.home-preview-label { font-size: 0.7rem; color: var(--text-dim); letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 3px; }
.home-preview-title { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.home-preview-sub { font-size: 0.75rem; color: var(--accent); }
.home-preview-arrow { font-size: 1.4rem; color: var(--text-dim); opacity: 0.6; }

/* 스트릭 배지 */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #ff6b35, #f7c59f);
  color: #fff;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* 공유 버튼 */
.rx-share-btn:hover { border-color: var(--accent); color: var(--accent); }

/* 상세 풀이 버튼 */
.rx-detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}
.rx-detail-btn:hover { background: var(--accent); color: #fff; }
.rx-detail-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 알림 버튼 */
.notif-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.82rem;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
  margin-top: 8px;
}
.notif-toggle-btn.active { border-color: var(--accent); background: rgba(var(--accent-rgb,139,90,43),0.1); }
.notif-toggle-btn .notif-icon { font-size: 1.1rem; }

/* 상세 풀이 모달 내용 */
.detail-area-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.detail-area-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}
.detail-area-body {
  font-size: 0.83rem;
  color: var(--text);
  line-height: 1.7;
}

/* ════════════════════════════════════════
   스트릭 섹션
════════════════════════════════════════ */
.streak-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}
.streak-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.streak-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.streak-stat {
  flex: 1;
  text-align: center;
  background: var(--bg);
  border-radius: 12px;
  padding: 12px 8px;
}
.streak-stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}
.streak-stat-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}
.streak-checkin-btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--accent), #c8a06a);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
.streak-checkin-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.streak-checkin-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.streak-bonus-msg {
  font-size: 0.75rem;
  color: #ff6b35;
  text-align: center;
  margin-top: 8px;
  font-weight: 600;
}

/* ════════════════════════════════════════
   오행 히트맵
════════════════════════════════════════ */
.heatmap-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}
.heatmap-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.heatmap-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.heatmap-cell {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  opacity: 0.85;
  cursor: default;
  transition: transform 0.15s;
  position: relative;
}
.heatmap-cell:hover { transform: scale(1.3); z-index: 1; }
.heatmap-empty { background: var(--bg); border: 1px solid var(--border); }

/* ════════════════════════════════════════
   오늘의 행운 아이템
════════════════════════════════════════ */

/* ════════════════════════════════════════
   피드백 (맞아요/달라요)
════════════════════════════════════════ */
.rx-feedback-btn:hover, .rx-feedback-btn.active { border-color: var(--accent); background: rgba(var(--accent-rgb,139,90,43),0.12); color: var(--accent); font-weight: 700; }

/* ════════════════════════════════════════
   레퍼럴 섹션
════════════════════════════════════════ */
.referral-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}
.referral-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.referral-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 14px;
  line-height: 1.5;
}
.referral-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.referral-code-box {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 3px;
  text-align: center;
}
.referral-copy-btn {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.referral-copy-btn:hover { background: var(--accent); color: #fff; }
.referral-generate-btn {
  width: 100%;
  padding: 11px;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 12px;
  transition: opacity 0.2s;
}
.referral-generate-btn:hover { opacity: 0.85; }
.referral-claim-row {
  display: flex;
  gap: 8px;
}
.referral-claim-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.referral-claim-input::placeholder { text-transform: none; letter-spacing: 0; color: var(--text-dim); }
.referral-claim-btn {
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.referral-claim-btn:hover { border-color: var(--accent); color: var(--accent); }
.referral-used-count {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 10px;
  text-align: center;
}

/* ════════════════════════════════════════
   프로필 공유 모달
════════════════════════════════════════ */
.profile-share-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.profile-share-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px 28px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  position: relative;
}
.profile-share-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none; border: none;
  font-size: 1.3rem;
  color: var(--text-dim);
  cursor: pointer;
}
.profile-share-avatar {
  font-size: 3rem;
  margin-bottom: 10px;
}
.profile-share-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.profile-share-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.profile-share-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}
.profile-share-stat-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
}
.profile-share-stat-label {
  font-size: 0.68rem;
  color: var(--text-dim);
}
.profile-share-actions {
  display: flex;
  gap: 10px;
}
.profile-share-actions button {
  flex: 1;
  padding: 11px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.profile-share-actions button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}
.profile-share-actions button:hover { opacity: 0.85; }

/* ════════════════════════════════════════
   오행 인디케이터 (메인화면)
════════════════════════════════════════ */
.ohi-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 10px;
  text-align: center;
}
.ohi-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 6px;
}
.ohi-el.active {
  opacity: 1;
  filter: none;
  border-color: currentColor;
  transform: scale(1.12);
  box-shadow: 0 4px 18px rgba(0,0,0,0.25);
  animation: ohiPulse 2s ease-in-out infinite;
}
.ohi-el[data-o="木"]  { color: #4caf7d; }
.ohi-el[data-o="火"]  { color: #e05a5a; }
.ohi-el[data-o="土"]  { color: #c8a06a; }
.ohi-el[data-o="金"]  { color: #a0aaaa; }
.ohi-el[data-o="水"]  { color: #5b9bd5; }
.ohi-el.active[data-o="木"] { background: rgba(76,175,125,0.13); }
.ohi-el.active[data-o="火"] { background: rgba(224,90,90,0.13); }
.ohi-el.active[data-o="土"] { background: rgba(200,160,106,0.13); }
.ohi-el.active[data-o="金"] { background: rgba(160,170,170,0.13); }
.ohi-el.active[data-o="水"] { background: rgba(91,155,213,0.13); }
.ohi-sym {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}
.ohi-name {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}
@keyframes ohiPulse {
  0%, 100% { box-shadow: 0 4px 18px rgba(0,0,0,0.2); }
  50%       { box-shadow: 0 6px 28px rgba(0,0,0,0.35); }
}

/* ════════════════════════════════════════
   SNS 공유 시트
════════════════════════════════════════ */
.share-sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  z-index: 1300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.share-sheet-box {
  background: var(--card);
  border-radius: 24px 24px 0 0;
  padding: 20px 20px 36px;
  width: 100%;
  max-width: 480px;
}
.share-sheet-title {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 0.4px;
}
.share-sheet-text-preview {
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 18px;
  line-height: 1.5;
  word-break: break-all;
}
.share-opts-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.share-opt-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 12px;
  transition: background 0.2s;
}
.share-opt-btn:hover { background: var(--bg); }
.share-opt-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.share-opt-label {
  font-size: 0.6rem;
  color: var(--text-dim);
  text-align: center;
  word-break: keep-all;
}
.share-sheet-cancel {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.share-sheet-cancel:hover { opacity: 0.8; }

/* ══════════════════════════════════════════════════════════════════════
   게스트 모드 스타일
   ══════════════════════════════════════════════════════════════════════ */

.card-guest {
  border: 1px dashed rgba(201,169,110,0.4);
  background: rgba(201,169,110,0.05);
}

#screen-guest {
  flex: 1;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.guest-wrap {
  max-width: 580px;
  width: 100%;
  margin: auto;
  padding: 48px 40px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  box-sizing: border-box;
}

@media (max-width: 480px) {
  #screen-guest {
    padding: 16px;
  }
  .guest-wrap {
    padding: 32px 24px;
  }
}

.guest-title {
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: 2px;
  margin-bottom: 12px;
  color: var(--gold);
}

.guest-subtitle {
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 36px;
}

.guest-notice {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.7;
  padding: 16px;
  border: 1px solid rgba(201,169,110,0.15);
  border-radius: 10px;
  background: rgba(201,169,110,0.03);
  margin-top: 20px;
  text-align: center;
}

.guest-err {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(224,90,74,0.1);
  border: 1px solid rgba(224,90,74,0.3);
  color: #e05a4a;
  font-size: 0.85rem;
  display: none;
}

/* 게스트 결과 화면 */
#screen-guest-result {
  flex: 1;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  padding: 100px 24px 80px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100vw;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  #screen-guest-result {
    padding: 80px 16px 60px;
  }
}

.guest-result-wrap {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
}

.guest-result-title {
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 2px;
  margin-bottom: 24px;
  color: var(--gold);
  text-align: center;
}

#guestReadingContent {
  margin: 24px 0;
  padding: 24px;
  min-height: 120px;
  line-height: 1.9;
}

.guest-signup-cta {
  margin: 32px 0;
  padding: 24px;
  border: 2px solid rgba(201,169,110,0.3);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(201,169,110,0.08) 0%, rgba(201,169,110,0.02) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.cta-icon {
  font-size: 2.5rem;
}

.cta-body {
  text-align: center;
}

.cta-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--gold-light);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.cta-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.cta-btn {
  width: 100%;
  padding: 14px 24px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--gold) 0%, #b89760 100%);
  color: var(--bg);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(201,169,110,0.3);
}

.guest-back-btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 16px;
}

.guest-back-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}
