/* ============================================================
   궁합 보기 모듈 스타일
   ============================================================ */

/* 결과화면 진입 네비게이션 */
.mode-nav {
  margin: 26px auto 4px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  max-width: 420px;
}
.mode-nav-t {
  font-size: 12px; letter-spacing: .16em; text-align: center;
  color: var(--glow, #c9a6ff); opacity: .65; margin-bottom: 15px;
}
.mode-nav-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-nav-btns .mn-full { grid-column: 1 / -1; }
.mode-nav button svg { width: 16px; height: 16px; flex-shrink: 0; }

/* 궁합 모달 헤더 아이콘 */
.compat-head span:first-child,
.monthly-head span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.compat-head svg, .monthly-head svg { width: 18px; height: 18px; flex-shrink: 0; }

/* 궁합 진입 (메인 CTA) — 사이트 알약 버튼 톤 + 은은한 펄스 */
.mode-nav .mode-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 14.5px; font-weight: 600; letter-spacing: .08em; color: #fff;
  padding: 14px 24px; border-radius: 40px; cursor: pointer;
  background: linear-gradient(135deg, rgba(255,75,140,.30), rgba(180,60,255,.24));
  border: 1.5px solid rgba(255,75,140,.6);
  box-shadow: 0 0 20px rgba(255,75,140,.28), inset 0 1px 0 rgba(255,255,255,.1);
  transition: transform .12s, box-shadow .18s, background .18s, border-color .18s;
}
.mode-nav .mode-btn::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  animation: cpRing 2.6s ease-out infinite;
}
@keyframes cpRing {
  0%       { box-shadow: 0 0 0 0 rgba(255,75,140,.38); }
  70%,100% { box-shadow: 0 0 0 11px rgba(255,75,140,0); }
}
.mode-nav .mode-btn:hover {
  transform: scale(1.04);
  background: linear-gradient(135deg, rgba(255,75,140,.48), rgba(180,60,255,.4));
  border-color: rgba(255,75,140,.9);
  box-shadow: 0 0 32px rgba(255,75,140,.5), inset 0 1px 0 rgba(255,255,255,.14);
}
.mode-nav .mode-btn:active { transform: scale(.98); }

/* 곧 추가될 모드 — 잠긴 느낌 */
.mode-nav .mode-soon {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: inherit; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: rgba(246,239,227,.5);
  padding: 12px 10px; border-radius: 40px; cursor: pointer;
  background: rgba(255,255,255,.03);
  border: 1.5px solid rgba(246,239,227,.13);
  transition: transform .12s, color .18s, border-color .18s;
}
.mode-nav .mode-soon::after {
  content: 'SOON'; font-size: 8px; letter-spacing: .12em; opacity: .7;
  border: 1px solid currentColor; border-radius: 7px; padding: 1px 4px;
}
.mode-nav .mode-soon:hover { color: rgba(246,239,227,.78); border-color: rgba(246,239,227,.28); }
.mode-nav .mode-soon:active { transform: scale(.96); }

/* ── 궁합 모달 ── */
.compat-modal {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(8,8,16,.72); backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
  overflow-y: auto; padding: 24px 14px 50px;
}
.compat-modal.open { opacity: 1; pointer-events: auto; }
.compat-sheet {
  width: 100%; max-width: 440px; margin: auto;
  background: radial-gradient(120% 90% at 50% 0%, #232142 0%, #16142a 60%, #100e1f 100%);
  border: 1px solid #3a3460; border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0,0,0,.6); padding: 16px 18px 26px;
  transform: translateY(16px); transition: transform .3s;
}
.compat-modal.open .compat-sheet { transform: translateY(0); }
.compat-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 17px; font-weight: 800; color: #f0eaff; letter-spacing: .5px;
  margin-bottom: 6px;
}
.compat-close {
  background: none; border: none; color: #aaa1d6; font-size: 20px;
  cursor: pointer; line-height: 1; padding: 4px 6px;
}
.compat-body { text-align: center; }
.compat-guide {
  font-size: 14px; color: #c8bdf5; font-weight: 600; min-height: 20px; margin: 10px 0 4px;
}

/* 카드 두 칸 */
.compat-slots { display: flex; justify-content: center; gap: 16px; margin: 14px 0 6px; }
.compat-slot { width: 124px; }
.cs-lbl { font-size: 12.5px; color: #b3a8ec; font-weight: 700; margin-bottom: 7px; }
.cs-wrap { width: 124px; height: 186px; perspective: 800px; margin: 0 auto; position: relative; }
.cs-card {
  width: 100%; height: 100%; position: relative; cursor: pointer;
  transition: transform .55s cubic-bezier(.2,.8,.2,1.25); transform-style: preserve-3d;
}
.cs-card.flipped { transform: rotateY(180deg); }
.cs-card.empty { opacity: .85; }
.cs-card.empty .cs-back { animation: csFloat 2.4s ease-in-out infinite; }
@keyframes csFloat { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-5px);} }

/* 흔들거리며 충전 (점점 격해짐) */
.cs-wrap.charging { animation: csShake .56s ease-in-out; }
@keyframes csShake {
  0%   { transform: translate(0,0) rotate(0); }
  15%  { transform: translate(-2px,1px) rotate(-1.5deg); }
  30%  { transform: translate(2px,-1px) rotate(1.5deg); }
  45%  { transform: translate(-3px,1px) rotate(-2deg); }
  60%  { transform: translate(3px,-1px) rotate(2deg); }
  75%  { transform: translate(-4px,2px) rotate(-3deg); }
  90%  { transform: translate(4px,-2px) rotate(3deg) scale(1.05); }
  100% { transform: translate(0,0) rotate(0); }
}
/* 쾅! 충격 (스케일 펀치 + 충격 링) */
.cs-wrap.slam { animation: csSlam .43s cubic-bezier(.2,.85,.25,1); }
@keyframes csSlam {
  0%   { transform: scale(1.16); }
  35%  { transform: scale(.94); }
  65%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}
.cs-wrap.slam::after {
  content: ''; position: absolute; inset: -7px; border-radius: 17px;
  border: 2px solid rgba(255,170,235,.85); pointer-events: none;
  box-shadow: 0 0 22px rgba(255,150,230,.5);
  animation: csShock .5s ease-out forwards;
}
@keyframes csShock {
  0%   { opacity: .9; transform: scale(.82); }
  100% { opacity: 0;  transform: scale(1.3); }
}
.cs-face {
  position: absolute; inset: 0; border-radius: 12px; overflow: hidden;
  backface-visibility: hidden; border: 1px solid #4a4280;
  box-shadow: 0 8px 22px rgba(0,0,0,.45);
}
.cs-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-front { transform: rotateY(180deg); }
.cs-name { font-size: 12px; color: #c3b7f0; margin-top: 8px; min-height: 16px; font-weight: 600; }

.compat-controls { margin-top: 14px; }
.compat-action, .compat-again {
  font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  border: none; border-radius: 24px; padding: 12px 30px; color: #fff;
  background: linear-gradient(135deg, #7b5be6, #a94fd6);
  box-shadow: 0 6px 18px rgba(123,91,230,.4);
}
.compat-action:active, .compat-again:active { transform: scale(.96); }
.compat-again {
  margin-top: 16px; background: rgba(255,255,255,.06); color: #c4bbe6;
  box-shadow: none; border: 1px solid #3a3460;
}

/* 결과 */
.compat-result { display: none; margin-top: 18px; }
.compat-result.show { display: block; animation: crIn .4s ease; }
@keyframes crIn { from{ opacity:0; transform: translateY(8px);} to{ opacity:1; transform:none;} }
.cr-num {
  font-size: 46px; font-weight: 800; line-height: 1;
  background: linear-gradient(90deg,#ffd56b,#ff8fd0,#9b8cff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cr-cap { font-size: 13px; color: #cbbfff; margin-top: 3px; }
.cr-bar { height: 8px; border-radius: 6px; background: #2a2742; overflow: hidden; margin: 12px auto 0; max-width: 280px; }
.cr-bar > i { display: block; height: 100%; width: 0; border-radius: 6px;
  background: linear-gradient(90deg,#7b5be6,#ff8fd0); transition: width 1s ease; }
.cr-top { font-size: 14px; color: #efe7ff; line-height: 1.6; margin: 16px 0 12px; }
.cr-top b { color: #fff; }
.cr-line {
  background: rgba(255,255,255,.04); border: 1px solid #332d55; border-radius: 12px;
  padding: 11px 13px; margin: 8px 0; font-size: 13px; line-height: 1.55; color: #d6cdf5; text-align: left;
}
.cr-close { font-size: 14px; color: #ffe6a8; font-weight: 700; line-height: 1.5; margin: 14px 0 2px; }

/* 모달 안 다른 운세 네비 */
.mode-more { margin-top: 22px; padding-top: 16px; border-top: 1px solid #2c2747; }
.mode-more-t { font-size: 12.5px; color: #9d93d4; letter-spacing: 1px; margin-bottom: 11px; }
.mode-more-btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.mm-btn {
  font-family: inherit; font-size: 12.5px; font-weight: 700; padding: 11px 4px;
  border-radius: 12px; cursor: pointer; color: #d8cffa;
  background: rgba(255,255,255,.05); border: 1px solid #3a3460;
}
.mm-btn:active { transform: scale(.95); }

@media (max-width: 360px) {
  .compat-slots { gap: 11px; }
  .compat-slot, .cs-wrap { width: 110px; }
  .cs-wrap { height: 165px; }
}
