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

:root {
  --bg-dark: #090a0d;
  --card-bg: #131418;
  --btn-bg: #1c1d24;
  --btn-hover: #252730;
  --text-main: #f1f2f6;
  --text-sub: #8d909b;
  --text-muted: #6b6e7a;
  
  --wine-light: #b01e2c;
  --wine-main: #7a0f19;
  --wine-dark: #40050b;
  --wine-sub: rgba(122, 15, 25, 0.18);
  --wine-border: rgba(176, 30, 44, 0.42);

  --gold-light: #fbbf24;
  --gold-main: #d97706;
  --gold-sub: rgba(245, 158, 11, 0.14);
  --gold-border: rgba(245, 158, 11, 0.45);
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card, .color-card, .door-card, .rps-card, .zener-card, .start-accent-btn, .action-btn, .lang-btn, .game-btn, .game-btn-advanced {
  touch-action: manipulation;
}

.star-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0.5;
  animation: twinkle 3s infinite ease-in-out;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.12; }
}

#celebration-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
}

.portal-flash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  z-index: 10000;
  transition: opacity 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.portal-flash.flash-active {
  opacity: 0.88;
}

#intro-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #050608;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 16px;
  z-index: 9999;
  overflow: hidden;
  transition: opacity 0.6s ease;
}

.orb-stage {
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1), filter 0.65s ease, opacity 0.65s ease;
}

.orb-stage.warp-explode {
  transform: scale(4.2);
  filter: blur(14px) brightness(2.2);
  opacity: 0;
}

.mystic-crystal-orb {
  position: absolute;
  width: 270px;
  height: 270px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.3) 0%, rgba(176, 30, 44, 0.25) 32%, rgba(40, 5, 11, 0.45) 70%, rgba(9, 10, 13, 0.85) 100%);
  box-shadow: inset 0 0 35px rgba(255, 157, 165, 0.25), 0 0 50px rgba(176, 30, 44, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 157, 165, 0.22);
  animation: orbPulse 4s infinite ease-in-out;
  z-index: 1;
}

.astral-ring {
  position: absolute;
  width: 310px;
  height: 310px;
  border-radius: 50%;
  border: 1px dashed rgba(229, 144, 152, 0.25);
  animation: ringRotate 24s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes orbPulse {
  0%, 100% { transform: scale(0.97); }
  50% { transform: scale(1.03); }
}

@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.typing-line {
  font-family: "Silkscreen", monospace;
  font-size: 2.1rem;
  font-weight: 700;
  margin: 3px 0;
  min-height: 3rem;
  text-align: center;
  position: relative;
  z-index: 2;
  background: linear-gradient(135deg, #ffffff 0%, #ffc5cb 45%, #e59098 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.app-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 450px;
  height: 60px;
  background: rgba(9, 10, 13, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
}

.brand-title {
  font-family: "Silkscreen", monospace;
  font-size: 1.1rem;
  font-weight: 700;
  background: linear-gradient(180deg, #f3f4f6 0%, #9ca3af 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-desc {
  font-size: 0.72rem;
  color: var(--text-sub);
  margin-top: 3px;
}

.language-selector {
  display: flex;
  background: #15161c;
  padding: 3px;
  border-radius: 12px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  border-radius: 9px;
  padding: 5px 8px;
  font-size: 0.72rem;
  cursor: pointer;
}

.lang-btn.active {
  background: #252732;
  color: #ffffff;
}

/* 🔥 텅 빈 공간 현상을 없애기 위한 높이 및 패딩 재정돈 */
#main-content {
  position: relative;
  z-index: 1;
  margin-top: 60px;
  width: 100%;
  max-width: 450px;
  display: flex;
  flex-direction: column;
  padding: 12px 12px 24px 12px;
  opacity: 1;
}

.spacer-top { display: none; }
.spacer-bottom { display: none; }

.main-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 26px;
  padding: 24px 16px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  text-align: center;
  overflow: hidden;
  position: relative;
}

.intro-hero-card {
  padding: 34px 18px 24px 18px;
  background: radial-gradient(circle at 50% 10%, rgba(122, 15, 25, 0.22) 0%, rgba(19, 20, 24, 0.98) 75%);
  border: 1px solid rgba(176, 30, 44, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.hero-badge {
  font-family: "Silkscreen", monospace;
  font-size: 0.76rem;
  letter-spacing: 1.5px;
  color: #ff9da5;
  background: rgba(122, 15, 25, 0.35);
  border: 1px solid var(--wine-border);
  padding: 5px 14px;
  border-radius: 20px;
}

.hero-provocative-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.4;
  color: #ffffff;
}

.hero-provocative-title .gradient-text {
  background: linear-gradient(135deg, #fbbf24 0%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-minimal-sub {
  font-size: 0.86rem;
  color: #9ca3af;
  line-height: 1.6;
}

.hero-start-btn {
  max-width: 320px;
  height: 56px;
  padding: 0 28px;
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 아코디언 컴포넌트 */
.accordion-container {
  width: 100%;
  margin-top: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(18, 19, 24, 0.7);
  overflow: hidden;
}

.accordion-trigger {
  width: 100%;
  background: transparent;
  border: none;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--text-main);
  text-align: left;
}

.acc-badge {
  font-family: "Silkscreen", monospace;
  font-size: 0.65rem;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  padding: 3px 8px;
  border-radius: 6px;
}

.acc-title { font-size: 0.82rem; color: #d1d5db; flex: 1; }
.acc-chevron { font-size: 0.72rem; color: #8d909b; transition: transform 0.3s ease; }
.accordion-container.is-open .acc-chevron { transform: rotate(180deg); color: var(--gold-light); }
.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.accordion-inner { padding: 6px 12px 14px 12px; display: flex; flex-direction: column; gap: 10px; }

.quote-accordion-card {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}

.quote-accordion-card .quote-en { font-style: italic; font-size: 0.88rem; font-weight: 700; color: #f1f2f6; margin-bottom: 6px; }
.quote-accordion-card .quote-author-line { font-size: 0.76rem; color: #e59098; margin-bottom: 6px; }
.quote-accordion-card .quote-kr { font-size: 0.8rem; color: #9ca3af; }

/* 모드 선택 */
.mode-step-container { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.mode-header-inline { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 0 4px; }
.mode-header-badge { background: rgba(122, 15, 25, 0.3); border: 1px solid var(--wine-border); color: #ff9da5; padding: 6px 14px; border-radius: 12px; font-size: 0.92rem; }
.mode-header-guide { font-size: 0.96rem; color: #ffffff; }

.mode-selection-wrap { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.game-grid-top { display: grid; gap: 12px; width: 100%; grid-template-columns: repeat(2, 1fr); }
.game-btn { background: var(--btn-bg); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 18px; padding: 22px 10px 18px 10px; gap: 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.game-btn:hover { background: var(--btn-hover); transform: translateY(-2px); border-color: var(--wine-border); }

.icon-box { width: 48px; height: 48px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); display: flex; align-items: center; justify-content: center; }
.icon-box svg { width: 24px; height: 24px; fill: none; stroke-width: 1.8; stroke: #d66d77; }
.game-label { font-size: 0.84rem; color: var(--text-main); text-align: center; }

.game-btn-advanced { background: linear-gradient(135deg, rgba(38, 30, 20, 0.88) 0%, rgba(22, 22, 28, 0.96) 100%); border: 1px solid rgba(245, 158, 11, 0.2); border-radius: 20px; display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; cursor: pointer; }
.advanced-left { display: flex; align-items: center; gap: 16px; text-align: left; }
.advanced-info-box { display: flex; flex-direction: column; gap: 5px; }
.advanced-tag { font-size: 0.7rem; color: #fde68a; background: var(--gold-sub); border: 1px solid var(--gold-border); padding: 3px 8px; border-radius: 6px; width: fit-content; }
.advanced-title { font-size: 0.96rem; color: #ffffff; }
.advanced-sub { font-size: 0.74rem; color: #d1d5db; line-height: 1.4; }
.advanced-arrow { font-size: 1.15rem; color: var(--gold-light); }

/* 워런 버핏 스토리 카드 */
.story-card { background: transparent; border: none; border-radius: 0; padding: 12px 8px 18px 8px; text-align: center; box-shadow: none; }
.story-tag { display: inline-block; font-size: 0.72rem; color: #e59098; background: var(--wine-sub); border: 1px solid var(--wine-border); padding: 4px 10px; border-radius: 8px; margin-bottom: 12px; }
.story-header { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 12px; }
.story-icon { font-size: 24px; background: transparent; display: flex; align-items: center; justify-content: center; }
.story-title-box strong { display: block; font-size: 0.92rem; color: #ffffff; line-height: 1.4; }
.story-title-box span { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 3px; }

.story-desc {
  font-size: 0.85rem;
  line-height: 1.7;
  color: #b8bccb;
  margin: 0;
  text-align: center;
  word-break: keep-all;
}

.start-accent-btn { background: linear-gradient(135deg, #a71d2a 0%, #730a13 55%, #420207 100%); color: #ffffff; border: 1px solid rgba(255, 255, 255, 0.18); padding: 17px 32px; border-radius: 30px; font-size: 1rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: 100%; max-width: 320px; }
.action-btn { background: linear-gradient(135deg, #373945, #22232c); color: #ffffff; border: 1px solid rgba(255, 255, 255, 0.12); padding: 16px 36px; border-radius: 30px; font-size: 0.95rem; cursor: pointer; width: 100%; max-width: 280px; margin-top: 10px; }

.progress-bar-wrap { width: 100%; height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 4px; margin-bottom: 18px; overflow: hidden; }
.progress-bar-fill { height: 100%; width: 20%; background: linear-gradient(90deg, #b01e2c, #f59e0b); transition: width 0.3s ease; }

.step-badge { display: inline-block; font-size: 1.05rem; padding: 6px 18px; border-radius: 22px; background: var(--wine-sub); color: #ff9da5; border: 1px solid var(--wine-border); margin-bottom: 14px; }
.question-text { font-size: 1.15rem; color: #ffffff; margin-bottom: 24px; line-height: 1.6; word-break: keep-all; }

.cards-container { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 20px 0 24px 0; flex-wrap: wrap; max-width: 420px; }

/* 카드 3D 플립 */
.card { width: 76px; height: 112px; perspective: 1000px; cursor: pointer; position: relative; background: transparent; border: none; }
.card-inner { position: relative; width: 100%; height: 100%; text-align: center; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); transform-style: preserve-3d; border-radius: 18px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45); }
.card.is-flipped .card-inner { transform: rotateY(180deg); }
.card-face { position: absolute; top: 0; left: 0; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 18px; display: flex; align-items: center; justify-content: center; }
.card-face-front { background-color: #171116; border: 1.5px solid var(--wine-border); z-index: 2; }
.card-face-front::after { content: "✦"; display: flex; align-items: center; justify-content: center; width: calc(100% - 14px); height: calc(100% - 14px); border: 1px solid rgba(176, 30, 44, 0.4); border-radius: 12px; font-size: 1.2rem; color: #e59098; }
.card-face-back { background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); color: #111215; font-size: 1.7rem; transform: rotateY(180deg); z-index: 1; }

/* 색상 오브 */
.color-card { width: 70px; height: 70px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 11px; background: radial-gradient(circle at 35% 30%, #2a2c36 0%, #15161c 65%, #0d0e12 100%); border: 2px solid rgba(176, 30, 44, 0.45); position: relative; }
.color-card.revealed { border: 3px solid rgba(255, 255, 255, 0.3); color: #ffffff; }

/* 아치형 도어 */
.door-card { width: 90px; height: 132px; border-radius: 20px; background: linear-gradient(145deg, #1f1419 0%, #0d0e12 100%); border: 1.5px solid var(--wine-border); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 10px 8px; }
.door-card svg { width: 100%; height: 100%; }

/* 가위바위보 */
.rps-card { width: 80px; height: 80px; border-radius: 22px; border: 2px solid rgba(255, 255, 255, 0.12); background: #1c1d24; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 38px; }

/* 제너 심볼 */
.zener-card { width: 74px; height: 108px; border-radius: 18px; background: linear-gradient(145deg, #181920 0%, #0e0f14 100%); border: 1.5px solid rgba(251, 191, 36, 0.4); display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #94a3b8; cursor: pointer; }
.zener-card.revealed { border: 2px solid var(--gold-light); color: #fde68a; }

.result-container { display: flex; justify-content: center; gap: 20px; margin: 18px 0; }
.result-card { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 0.84rem; color: var(--text-sub); }
.result-image { width: 74px; height: 74px; border-radius: 18px; background: #1c1d24; display: flex; align-items: center; justify-content: center; font-size: 36px; }

.result-msg { font-size: 0.98rem; margin: 22px 0 16px 0; padding: 18px; border-radius: 18px; line-height: 1.65; display: none; word-break: keep-all; }
.success { background: rgba(16, 185, 129, 0.14); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.35); }
.failure { background: rgba(122, 15, 25, 0.22); color: #ff9da5; border: 1px solid var(--wine-border); }
.draw { background: rgba(122, 15, 25, 0.16); color: #e59098; border: 1px solid var(--wine-border); }

.advice-header-tag { display: inline-block; font-size: 0.92rem; color: #fbbf24; background: rgba(245, 158, 11, 0.14); border: 1px solid rgba(245, 158, 11, 0.4); padding: 6px 18px; border-radius: 20px; margin-bottom: 20px; }
.advice-quote-box { background: linear-gradient(145deg, rgba(28, 20, 24, 0.85) 0%, rgba(18, 19, 24, 0.95) 100%); border: 1px solid var(--wine-border); border-radius: 20px; padding: 24px 20px; margin-bottom: 20px; text-align: center; }
.advice-quote-text { font-size: 1.1rem; color: #ffffff; line-height: 1.6; word-break: keep-all; }
.advice-desc { font-size: 0.88rem; line-height: 1.75; color: #c9ccd6; margin-bottom: 26px; padding: 0 8px; text-align: center; word-break: keep-all; }

.btn-group { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: rgba(20, 20, 24, 0.94); border: 1px solid rgba(255, 255, 255, 0.15); color: #ffffff; padding: 12px 22px; border-radius: 25px; font-size: 0.84rem; z-index: 10000; pointer-events: none; }
.hidden { display: none !important; }

/* 캡처 모달 */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(10px); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-content { background: #14151b; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 24px; width: 100%; max-width: 380px; padding: 20px 16px; display: flex; flex-direction: column; align-items: center; }
.modal-header { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.modal-title { font-size: 1.05rem; font-weight: 700; color: #fbbf24; }
.modal-close-btn { background: rgba(255, 255, 255, 0.08); border: none; color: #9ca3af; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; }
.modal-guide { font-size: 0.84rem; color: #e2e8f0; text-align: center; margin-bottom: 14px; background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.3); padding: 8px 14px; border-radius: 12px; width: 100%; }
.captured-img-container { width: 100%; max-height: 52vh; overflow-y: auto; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.15); margin-bottom: 16px; background: #090a0d; }
.captured-img-container img { width: 100%; display: block; }
.modal-btn { width: 100%; background: #252732; color: #ffffff; border: 1px solid rgba(255, 255, 255, 0.12); padding: 12px; border-radius: 16px; cursor: pointer; }

/* SEO 가이드 및 아티클 폰트 고정 */
.seo-guide-card, .seo-article-section, .site-footer {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif !important;
}
.seo-guide-card { text-align: left; padding: 24px 18px; border: 1px solid rgba(255, 255, 255, 0.08); }
.guide-list-wrap { display: flex; flex-direction: column; gap: 14px; }
.guide-item-box { background: rgba(0, 0, 0, 0.35); padding: 14px; border-radius: 12px; }
.guide-item-box.border-wine { border-left: 3px solid #b01e2c; }
.guide-item-box.border-cyan { border-left: 3px solid #38bdf8; }
.guide-item-box.border-gold { border-left: 3px solid #fbbf24; }
.guide-item-title { font-size: 0.88rem; font-weight: 700; display: block; margin-bottom: 5px; }
.guide-item-desc, .seo-text, .seo-lead-desc, .footer-desc {
  font-family: 'Pretendard', sans-serif !important;
  font-weight: 400 !important;
  font-size: 0.83rem !important;
  line-height: 1.7 !important;
  color: #94a3b8;
}
.seo-article-section { background: var(--card-bg); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 24px; padding: 26px 20px; text-align: left; }
.seo-main-title { font-size: 1.12rem; font-weight: 800; color: #ffffff; line-height: 1.45; margin-bottom: 14px; }
.site-footer { margin-top: 8px; padding: 24px 16px; text-align: center; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.watermark-sign { font-family: "Silkscreen", monospace; font-size: 0.68rem; color: rgba(255, 255, 255, 0.35); margin-top: 10px; }

body.in-game .seo-guide-card, body.in-game .seo-article-section { display: none; }

/* 오늘의 직감 카드 */
.daily-card { width: 100%; margin: 18px 0 4px; padding: 16px 14px; border: 1px solid rgba(251, 191, 36, 0.35); border-radius: 16px; background: linear-gradient(160deg, rgba(40, 30, 70, 0.7), rgba(15, 15, 30, 0.8)); text-align: center; }
.daily-head { display: flex; justify-content: space-between; align-items: center; font-size: 0.7rem; color: var(--text-muted); }
.daily-badge { font-family: "Silkscreen", monospace; color: #fde68a; }
.daily-title { font-size: 1.05rem; margin: 8px 0 10px; color: #fde68a; }
.daily-face { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 150px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.12); padding: 14px; width: 100%; }
.daily-back { cursor: pointer; color: #e2e8f0; font-size: 0.82rem; background: repeating-linear-gradient(45deg, rgba(251, 191, 36, 0.08) 0 8px, rgba(99, 102, 241, 0.1) 8px 16px); }
.daily-sigil { font-size: 2.2rem; color: #fbbf24; animation: dailyPulse 2.4s ease-in-out infinite; }
@keyframes dailyPulse { 0%, 100% { opacity: 0.7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.15); } }
.daily-front { background: rgba(0, 0, 0, 0.3); }
.daily-row { font-size: 0.8rem; color: #e2e8f0; }
.daily-advice { font-size: 0.85rem; line-height: 1.6; color: #fde68a; }