/* ─────────────────────────────────────────────
   매칭 결과 화면
   style.css 의 변수·유틸을 그대로 씁니다.
   ───────────────────────────────────────────── */

/* ── 미리보기 전환기 (실제 앱에는 없음) ───── */
.preview-switch {
  position: fixed; z-index: 60;
  top: calc(var(--safe-t) + 12px); left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 4px;
  padding: 4px;
  background: rgba(20,8,34,.86);
  border: 1px solid var(--card-line);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}
.ps-btn {
  border: 0; background: transparent;
  color: var(--ink-faint);
  font: inherit; font-size: 12.5px; font-weight: 700;
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  transition: color .2s ease, background .2s ease;
}
.ps-btn.is-on { background: var(--grad); color: #fff; }

.app { padding-top: 46px; }

/* ── 메뉴 버튼 (우측 상단) ─────────────────── */
.menu-btn {
  position: fixed; z-index: 74;
  top: calc(var(--safe-t) + 14px); right: 14px;
  width: 42px; height: 42px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  border-radius: 13px;
  background: rgba(20,8,34,.7);
  border: 1px solid var(--card-line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  cursor: pointer; padding: 0;
  transition: transform .16s ease, border-color .2s ease;
}
.menu-btn:active { transform: scale(.93); }
.menu-btn span {
  display: block; width: 17px; height: 2px; border-radius: 2px;
  background: var(--ink);
  transition: transform .3s cubic-bezier(.2,.9,.25,1), opacity .2s ease;
}
.menu-btn.is-on span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.is-on span:nth-child(2) { opacity: 0; }
.menu-btn.is-on span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── 메뉴 서랍 ─────────────────────────────── */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 72;
  background: rgba(4,2,8,.66);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .3s ease;
}
.drawer-backdrop.is-on { opacity: 1; }
.drawer-backdrop[hidden] { display: none; }

.drawer {
  position: fixed; z-index: 73;
  top: 0; right: 0;
  width: min(84vw, 330px); height: 100svh;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.2,.9,.25,1);

  display: flex; flex-direction: column;
  padding: calc(var(--safe-t) + 68px) 18px calc(var(--safe-b) + 18px);
  background: linear-gradient(190deg, #1c0e2e, #100619);
  border-left: 1px solid rgba(255,255,255,.12);
  box-shadow: -24px 0 60px -20px rgba(0,0,0,.9);
}
.drawer.is-on { transform: translateX(0); }
.drawer[hidden] { display: none; }

/* 항목을 아래로 밀어 엄지로 닿게 합니다 */
.dw-spacer { flex: 1; min-height: 12px; }

.dw-head { display: flex; align-items: center; gap: 12px; }
.dw-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad); color: #fff;
  font-size: 19px; font-weight: 800;
  flex: 0 0 auto;
}
.dw-name { font-size: 17px; font-weight: 800; letter-spacing: -.03em; }
.dw-phone { font-size: 12.5px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }

.dw-feature {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 15px 15px;
  margin-bottom: 12px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(255,61,129,.24), rgba(168,85,247,.14));
  border: 1px solid rgba(255,61,129,.34);
  color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  transition: transform .16s ease, border-color .2s ease;
}
.dw-feature:active { transform: scale(.975); }
.dwf-emoji { font-size: 26px; flex: 0 0 auto; }
.dwf-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dwf-body b { font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.dwf-body small { font-size: 11.5px; color: var(--ink-faint); }
.dwf-tag {
  flex: 0 0 auto;
  font-size: 10px; font-weight: 800; letter-spacing: .04em;
  padding: 4px 8px; border-radius: 6px;
  background: rgba(255,255,255,.14); color: var(--ink-dim);
}

.dw-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.dw-list button, .dw-list a {
  width: 100%; text-decoration: none;
  display: flex; align-items: center; gap: 12px;
  padding: 15px 13px;
  border: 0; border-radius: var(--r-md);
  background: transparent; color: var(--ink-dim);
  font: inherit; font-size: 14.5px; font-weight: 600; text-align: left;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.dw-list button:hover, .dw-list a:hover { background: rgba(255,255,255,.06); color: var(--ink); }
.dw-list button:active, .dw-list a:active { background: rgba(255,255,255,.1); }
.dw-list span { font-size: 17px; }

.dw-close {
  width: 100%; margin-top: 14px;
  padding: 14px; border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--card-line);
  color: var(--ink-dim);
  font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer;
}

/* ── 잠금화면 알림 미리보기 ────────────────── */
.lockscreen {
  position: relative; z-index: 4;
  width: 100%; max-width: 460px;
  margin: calc(var(--safe-t) + 60px) auto 0;
  padding: 0 var(--pad);
  text-align: center;
}
.ls-cap {
  font-size: 10.5px; font-weight: 700; letter-spacing: .18em;
  color: var(--ink-faint); margin-bottom: 9px;
}
.ls-noti {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 15px;
  border-radius: 20px;
  background: rgba(255,255,255,.11);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  text-align: left;
  box-shadow: 0 12px 34px -14px rgba(0,0,0,.85);
}
.ls-icon {
  flex: 0 0 auto;
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center; font-size: 21px;
  background: var(--grad);
}
.ls-body { min-width: 0; }
.ls-app {
  font-size: 11px; font-weight: 700; color: var(--ink-dim);
  letter-spacing: .02em; margin-bottom: 2px;
}
.ls-app span { float: right; color: var(--ink-faint); font-weight: 500; }
.ls-title { font-size: 14.5px; font-weight: 700; letter-spacing: -.02em; line-height: 1.4; }
.ls-note { font-size: 11px; color: var(--ink-faint); margin-top: 9px; }
.ls-note b { color: var(--ink-dim); font-weight: 700; }

/* ── 컨페티 ────────────────────────────────── */
.confetti { position: fixed; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.confetti i {
  position: absolute; top: -8%;
  border-radius: 2px; opacity: 0;
  animation-name: fall;
  animation-timing-function: cubic-bezier(.25,.6,.4,1);
  animation-fill-mode: forwards;
}
@keyframes fall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  8%   { opacity: 1; }
  100% { transform: translateY(112vh) rotate(calc(var(--spin) * 780deg)); opacity: 0; }
}

/* ── 성공 ──────────────────────────────────── */
.hit-mark { position: relative; display: grid; place-items: center; width: 176px; height: 176px; }

.hit-glow {
  position: absolute; inset: 0; margin: auto;
  width: 128px; height: 128px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,61,129,.85), transparent 68%);
  filter: blur(20px);
  animation: glowPulse 2.4s ease-in-out infinite;
}
@keyframes glowPulse { 50% { transform: scale(1.28); opacity: .78; } }

.hit-heart {
  font-size: 76px;
  filter: drop-shadow(0 0 24px rgba(255,61,129,.9));
  animation: popIn .75s cubic-bezier(.2,1.5,.4,1) both, beat 1.7s ease-in-out 1s infinite;
}
@keyframes popIn { from { transform: scale(0) rotate(-24deg); opacity: 0; } }

.orbit {
  position: absolute; font-size: 21px;
  animation: orbit 6.5s linear infinite;
  transform-origin: 50% 50%;
}
.o1 { animation-delay: 0s;    }
.o2 { animation-delay: -2.2s; }
.o3 { animation-delay: -4.4s; }
@keyframes orbit {
  from { transform: rotate(0deg)   translateX(74px) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(74px) rotate(-360deg); }
}

.hit-eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: .16em;
  color: var(--ink-faint);
}

.hit-title {
  font-size: 42px; font-weight: 800; letter-spacing: -.045em; line-height: 1.1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: riseIn .6s cubic-bezier(.2,.9,.25,1) .12s both;
}
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } }

.hit-lede { color: var(--ink-dim); font-size: 15.5px; animation: riseIn .6s cubic-bezier(.2,.9,.25,1) .2s both; }
.hit-lede b { color: var(--ink); font-weight: 700; }

/* 매칭 카드 */
.match-card {
  width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 26px 20px 20px;
  border-radius: var(--r-lg);
  background: linear-gradient(155deg, rgba(255,61,129,.18), rgba(168,85,247,.12) 60%, rgba(34,211,238,.10));
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px -26px rgba(255,61,129,.6);
  animation: cardPop .7s cubic-bezier(.2,1.1,.35,1) .3s both;
}
@keyframes cardPop { from { opacity: 0; transform: translateY(26px) scale(.94); } }

.mc-tag {
  font-size: 10px; font-weight: 800; letter-spacing: .24em; color: var(--cyan);
  border: 1px solid rgba(34,211,238,.45);
  padding: 4px 12px; border-radius: 999px;
}
.mc-label { font-size: 11.5px; color: var(--ink-faint); letter-spacing: .12em; margin-top: 6px; }
.mc-phone {
  font-size: 31px; font-weight: 800; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 26px rgba(255,61,129,.5);
}
.mc-sub { font-size: 13.5px; color: var(--ink-dim); }

.mc-actions { display: flex; gap: 9px; width: 100%; margin-top: 14px; }
.mc-btn {
  flex: 1; text-align: center; text-decoration: none;
  padding: 14px 10px; border-radius: 999px;
  font-size: 14.5px; font-weight: 800; letter-spacing: -.02em;
  transition: transform .16s ease;
}
.mc-btn:active { transform: scale(.96); }
.mc-call { background: var(--grad); color: #fff; box-shadow: 0 10px 26px -10px rgba(255,61,129,.8); }
.mc-sms  { background: rgba(255,255,255,.09); color: var(--ink); border: 1px solid var(--card-line); }

/* ── 매칭 없음 ─────────────────────────────── */
.miss-mark { position: relative; display: grid; place-items: center; width: 140px; height: 140px; }
.miss-heart { font-size: 58px; animation: floaty 4s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-11px); } }

.miss-ring {
  position: absolute; inset: 0; margin: auto;
  width: 106px; height: 106px; border-radius: 50%;
  border: 1.5px dashed rgba(255,255,255,.20);
  animation: slowSpin 22s linear infinite;
}
@keyframes slowSpin { to { transform: rotate(360deg); } }

.miss-title {
  font-size: 33px; font-weight: 800; letter-spacing: -.04em; line-height: 1.2;
  animation: riseIn .6s cubic-bezier(.2,.9,.25,1) .1s both;
}

/* 다음 확인 카드 */
.next-card {
  width: 100%; text-align: center;
  padding: 20px 18px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--card-line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.nc-label { font-size: 11.5px; color: var(--ink-faint); letter-spacing: .14em; }
.nc-time {
  font-size: 38px; font-weight: 800; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 4px 0 2px;
}
.nc-sub { font-size: 12.5px; color: var(--ink-dim); }

/* 슬롯 */
.slots { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.slots-label { font-size: 13px; color: var(--ink-dim); text-align: left; }
.slots-label b { color: var(--ink); font-weight: 800; }

.slot-row { display: flex; flex-direction: column; gap: 8px; }
.slot {
  display: flex; align-items: center;
  padding: 14px 16px;
  border-radius: var(--r-md);
  font-size: 14.5px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.slot.is-filled {
  background: linear-gradient(120deg, rgba(255,61,129,.20), rgba(168,85,247,.13));
  border: 1px solid rgba(255,255,255,.16);
  color: var(--ink);
}
.slot.is-empty {
  background: rgba(255,255,255,.035);
  border: 1.5px dashed var(--card-line);
  color: var(--ink-faint);
  font-weight: 600;
}

.slots-hint { font-size: 12.5px; color: var(--ink-faint); text-align: left; }
.slots-hint b { color: var(--cyan); font-weight: 700; }

/* 빈 슬롯은 버튼 — 탭하면 추가 시트가 열립니다 */
button.slot {
  width: 100%; font-family: inherit; cursor: pointer;
  justify-content: space-between;
  transition: transform .16s ease, border-color .2s ease, background .2s ease;
}
button.slot:active { transform: scale(.98); }
button.slot.is-empty:hover {
  border-color: rgba(255,61,129,.55);
  background: rgba(255,61,129,.07);
  color: var(--ink-dim);
}
.slot em {
  font-style: normal; font-size: 11.5px; font-weight: 700;
  color: var(--pink); letter-spacing: -.01em;
}

/* ── 등록 기록 ─────────────────────────────── */
#view-log { justify-content: flex-start; gap: 16px; }

.log-title {
  font-size: 30px; font-weight: 800; letter-spacing: -.04em;
  animation: riseIn .6s cubic-bezier(.2,.9,.25,1) both;
}

.log-stat {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 0;
  padding: 18px 12px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--card-line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.ls-item { flex: 1; text-align: center; }
.ls-div { width: 1px; align-self: stretch; background: var(--card-line); }
.ls-num { font-size: 32px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ls-num.is-hit { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ls-cap2 { font-size: 11.5px; color: var(--ink-faint); letter-spacing: .1em; margin-top: 2px; }

.log-list { list-style: none; width: 100%; display: flex; flex-direction: column; gap: 8px; }

.log-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 15px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--card-line);
  text-align: left;
}
.log-item.is-hit {
  background: linear-gradient(120deg, rgba(255,61,129,.20), rgba(168,85,247,.12));
  border-color: rgba(255,61,129,.42);
  box-shadow: 0 10px 30px -16px rgba(255,61,129,.75);
}
.log-item.is-now { border-color: rgba(34,211,238,.35); }

.li-badge { font-size: 21px; flex: 0 0 auto; }
.li-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.li-body b { font-size: 15px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.li-body small { font-size: 11.5px; color: var(--ink-faint); }

.li-tag {
  flex: 0 0 auto;
  font-size: 11px; font-weight: 700;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: var(--ink-faint);
  border: 1px solid var(--card-line);
}
.li-tag.is-hit { background: var(--grad); color: #fff; border-color: transparent; }
.li-tag.is-now { color: var(--cyan); border-color: rgba(34,211,238,.4); }

.log-warn {
  width: 100%;
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 15px;
  border-radius: var(--r-md);
  background: rgba(34,211,238,.08);
  border: 1px solid rgba(34,211,238,.24);
  text-align: left;
}
.log-warn p { font-size: 12.5px; line-height: 1.6; color: var(--ink-dim); }
.log-warn b { color: var(--ink); font-weight: 700; }

/* ── 슬롯 추가 시트 ────────────────────────── */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(4,2,8,.66);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .28s ease;
}
.sheet-backdrop.is-on { opacity: 1; }
.sheet-backdrop[hidden] { display: none; }

.sheet {
  position: fixed; z-index: 71;
  left: 50%; bottom: 0;
  width: 100%; max-width: 460px;
  transform: translate(-50%, 100%);
  transition: transform .34s cubic-bezier(.2,.9,.25,1);

  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 10px var(--pad) calc(var(--safe-b) + 20px);
  border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, #1b0d2c, #120720);
  border-top: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 -20px 60px -20px rgba(0,0,0,.9);
}
.sheet.is-on { transform: translate(-50%, 0); }
.sheet[hidden] { display: none; }

.sheet-grip {
  width: 40px; height: 4px; border-radius: 99px;
  background: rgba(255,255,255,.22); margin-bottom: 8px;
}

.sheet-title { font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
.sheet-sub { font-size: 13.5px; color: var(--ink-dim); margin-bottom: 6px; }
.sheet-sub b { color: var(--cyan); font-weight: 700; }

.opt {
  width: 100%;
  display: flex; align-items: center; gap: 13px;
  padding: 16px 17px;
  border-radius: var(--r-lg);
  background: rgba(255,255,255,.055);
  border: 1px solid var(--card-line);
  color: var(--ink);
  font: inherit; text-align: left; cursor: pointer;
  transition: transform .16s ease, border-color .2s ease, background .2s ease;
}
.opt:active { transform: scale(.975); }
.opt:hover { border-color: rgba(255,61,129,.5); background: rgba(255,255,255,.08); }

.opt-free:hover { border-color: rgba(34,211,238,.5); }

.opt-icon { font-size: 27px; line-height: 1; flex: 0 0 auto; }
.opt-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.opt-body b { font-size: 15.5px; font-weight: 800; letter-spacing: -.02em; }
.opt-body small { font-size: 12px; color: var(--ink-faint); line-height: 1.45; }

.opt-price {
  flex: 0 0 auto;
  font-size: 15px; font-weight: 800; letter-spacing: -.02em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.opt-free .opt-price { background: none; color: var(--cyan); }

/* 공유 시트 */
.privacy-note {
  width: 100%;
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 14px; margin-bottom: 4px;
  border-radius: var(--r-md);
  background: rgba(34,211,238,.08);
  border: 1px solid rgba(34,211,238,.24);
  text-align: left;
}
.privacy-note p { font-size: 12px; line-height: 1.6; color: var(--ink-dim); }
.privacy-note b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }

.share-preview {
  width: 100%; max-width: 190px;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-md);
  overflow: hidden;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--card-line);
  display: grid; place-items: center;
  margin-bottom: 4px;
}
.share-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-loading { font-size: 12px; color: var(--ink-faint); }
.sp-loading[hidden] { display: none; }

.sheet-note { font-size: 11.5px; color: var(--ink-faint); text-align: center; line-height: 1.6; margin-top: 4px; }
.sheet-note b { color: var(--ink-dim); font-weight: 700; }

.sheet-close {
  width: 100%; margin-top: 2px;
  padding: 14px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-faint);
  font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .confetti { display: none; }
}
