/* 축하한컷 공개 웹 카드 — share-card.html 시안에서 발전(사진 포함 버전).
   모바일 우선(카톡 인앱 브라우저). 브랜드 코랄 유지. */
:root {
  --ink: #191f28;
  --sub: rgba(255, 255, 255, 0.9);
  --card-radius: 26px;
  --coral: #ff3e6c;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, system-ui, sans-serif;
  background: #0e0f13;
  color: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
}
/* 배경: 은은한 브랜드 글로우 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(255, 62, 108, 0.28), transparent 60%),
    radial-gradient(90% 60% at 100% 110%, rgba(255, 197, 49, 0.14), transparent 55%);
}

.stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.72);
  display: flex;
  align-items: center;
  gap: 7px;
}
.eyebrow .dot {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  background: linear-gradient(135deg, #ff5a7d, #e62e59);
}

/* 카드 — 앱 renderToImage 와 동일 지오메트리로 합성한 캔버스가 카드 면 전체를 채운다.
   base(1080×1440 고정 해상도, CSS 다운스케일) + fx(파티클 오버레이). */
.card {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--card-radius);
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  background: #10131a;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.06);
  transform: translateZ(0);
}
.card canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
/* base = 카드 합성면(배경·장식·프레임·사진·텍스트). 앱 최종 이미지와 픽셀 정합 */
#base { z-index: 2; }
/* fx = 인터랙티브 파티클 오버레이 */
#fx { z-index: 3; }
.taphint {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.34);
  padding: 9px 16px;
  border-radius: 100px;
  backdrop-filter: blur(4px);
  pointer-events: none;
  white-space: nowrap;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
}

.lineage { font-size: 12.5px; color: rgba(255, 255, 255, 0.66); text-align: center; }
.lineage b { color: #fff; }

.cta {
  display: block;
  width: 100%;
  background: var(--coral);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  padding: 16px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  box-shadow: 0 14px 30px -10px rgba(255, 62, 108, 0.7);
  transition: transform 0.12s;
}
.cta:active { transform: scale(0.98); }
.sub-note {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  max-width: 34ch;
}

/* 폴백(만료/미존재) 페이지 */
.stage.fallback { gap: 20px; }
.fallback-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--card-radius);
  padding: 40px 26px;
  text-align: center;
}
.fallback-emoji { font-size: 46px; margin-bottom: 14px; }
.fallback-card h1 { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.fallback-card p { font-size: 14px; line-height: 1.55; color: rgba(255, 255, 255, 0.72); }

/* 모션 최소화 선호 — 애니메이션 정지(파티클 밀도는 JS 에서도 축소) */
@media (prefers-reduced-motion: reduce) {
  .taphint { animation: none; }
}
