/* ==========================================================================
   상품 PR 포스터 — 속마음·썸 타이밍·궁합·재회 페이지 공통.
   히어로 한 장(모션 그래프가 주인공) → 리포트가 알려 주는 세 가지 → 같은 페이지 입력칸.
   모션은 js/components/product-poster.js. 낮 모드 계기판(.pp-monitor)은 히어로 그림이 비치는 얇은 유리다. 밤 모드는 반투명 어두운 계기판을 유지한다.
   ========================================================================== */

/* ── 히어로 ─────────────────────────────────────────────────────────────── */
.pp-hero { padding-bottom: 34px; min-height: 0; }
.pp-hero::before {
  background: linear-gradient(95deg, rgba(6,2,14,.96) 0%, rgba(6,2,14,.9) 44%, rgba(6,2,14,.55) 58%, rgba(6,2,14,.2) 72%);
}
.pp-tag {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  font-family: var(--font-main); font-weight: 800; font-size: 14px; letter-spacing: .12em; color: var(--neon-lime);
}
.pp-live { width: 10px; height: 10px; border-radius: 50%; background: var(--neon-pink); box-shadow: 0 0 10px var(--neon-pink); animation: pp-blink 1.05s steps(2, start) infinite; }
@keyframes pp-blink { to { opacity: .25; } }
.pp-hero .pp-title {
  margin: 14px 0 12px; max-width: 13em;
  font-size: clamp(34px, 5.6vw, 64px); font-weight: 900; line-height: 1.1; letter-spacing: -.02em; color: #fff;
}
.pp-title em {
  display: inline-block; font-style: normal; color: #ff5fd2;
  text-shadow: 0 0 18px rgba(255, 95, 210, .45);
  transform-origin: 30% 70%;
}
.pp-title em.is-beat { animation: pp-thump .42s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pp-thump {
  0% { transform: scale(1); }
  30% { transform: scale(1.07); text-shadow: 0 0 34px rgba(255, 95, 210, .9); }
  100% { transform: scale(1); }
}
.pp-hero .pp-lead { max-width: 34em; font-size: 16px; line-height: 1.75; color: var(--hero-text); opacity: .92; }

/* 심박 모니터 — 히어로 폭을 꽉 채우는 한 줄 */
.pp-monitor {
  position: relative; height: clamp(150px, 20vw, 230px); margin: 26px -20px 22px;
  background: linear-gradient(180deg, rgba(8,3,30,.35), rgba(8,3,30,.78) 55%, rgba(8,3,30,.35));
  border-block: 1px solid rgba(0, 229, 255, .16);
}
.pp-monitor canvas, .pp-cut-viz > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pp-readout {
  position: absolute; top: 12px; right: max(20px, calc((100% - 1180px) / 2)); z-index: 1;
  display: grid; justify-items: end; line-height: 1; font-family: var(--font-main); font-weight: 900; font-variant-numeric: tabular-nums; color: var(--neon-lime);
  text-shadow: 0 0 12px rgba(0, 255, 163, .45);
}
.pp-readout-label { font-family: 'Pretendard', sans-serif; font-size: 13px; font-weight: 700; color: var(--neon-cyan); text-shadow: none; }
.pp-readout-num { display: inline-flex; align-items: baseline; gap: 6px; font-size: clamp(36px, 4.8vw, 58px); }
.pp-readout-num i { font-style: normal; font-size: .55em; color: #ff5fd2; text-shadow: 0 0 12px rgba(255, 95, 210, .7); }
.pp-readout.is-beat .pp-readout-num i { animation: pp-thump .42s cubic-bezier(.2, 1.6, .4, 1); }
.pp-readout-note { font-family: 'Pretendard', sans-serif; font-size: 11px; color: rgba(255, 255, 255, .55); text-shadow: none; }

.pp-hero-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.pp-cta {
  display: inline-flex; align-items: center; gap: 8px; padding: 16px 28px; border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #c21f9c 0%, #a81a8f 45%, #7a22d6 100%); color: #fff; /* 흰 글자 5:1 이상 */
  font-size: 18px; font-weight: 900; letter-spacing: -.01em; text-decoration: none;
  box-shadow: 0 10px 28px rgba(203, 35, 162, .5); transition: transform .2s, box-shadow .2s;
}
.pp-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(203, 35, 162, .7); }
.pp-cta:focus-visible, .pp-cta-sub:focus-visible { outline: 3px solid var(--neon-cyan); outline-offset: 3px; }
.pp-cta-sub { color: var(--neon-cyan); font-size: 15px; font-weight: 700; text-decoration: none; }
.pp-cta-sub:hover { text-decoration: underline; }
.pp-hero .chip-row { flex-basis: 100%; margin-top: 4px; }

/* ── 리포트가 알려 주는 세 가지 ─────────────────────────────────────────── */
.pp-cuts { margin: 52px 0 12px; }
.pp-cuts-title { margin: 0 0 18px; font-size: clamp(22px, 3vw, 28px); font-weight: 900; letter-spacing: -.01em; color: var(--text-pure); }
.pp-cut-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pp-cut {
  display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 20px; border-radius: 20px;
  background: var(--bg-card); border: 1px solid var(--border-box-purple);
}
.pp-cut-viz { position: relative; height: 176px; display: grid; place-items: center; margin-bottom: 8px; }
.pp-cut-viz[data-pp-motion="heat"] { display: block; width: 100%; }
.pp-cut-tag { margin: 0; font-family: var(--font-main); font-weight: 800; font-size: 13px; letter-spacing: .1em; color: var(--neon-cyan); }
.pp-cut h3 { margin: 0; font-size: 19px; font-weight: 900; line-height: 1.35; color: var(--text-pure); }
.pp-cut p:not(.pp-cut-tag) { margin: 0; font-size: 15px; line-height: 1.65; color: var(--text-sub); }

/* 물결 게이지 */
.pp-cut-viz svg { width: 100%; height: 176px; display: block; overflow: visible; } /* 격자 칸 안에서 %높이는 풀리므로 칸 높이로 고정 */
.pp-lq-ring { fill: none; stroke: var(--border-hair); stroke-width: 6; }
.pp-lq-arc { fill: none; stroke: var(--neon-cyan); stroke-width: 6; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(0, 229, 255, .6)); }
.pp-lq-well { fill: rgba(131, 56, 236, .08); }
.pp-lq-back { fill: rgba(131, 56, 236, .45); }
.pp-lq-num { font-family: 'Pretendard', sans-serif; font-weight: 900; font-size: 36px; fill: #fff; paint-order: stroke; stroke: rgba(7, 2, 32, .8); stroke-width: 5px; } /* 물결 위·아래 어디서나 읽히게 테두리 */

/* 흐름 선 */
.pp-cut-viz[data-pp-motion="flow"] { position: relative; }
.pp-fl-area { fill: rgba(203, 35, 162, .14); opacity: 0; }
.pp-fl-line { fill: none; stroke: var(--neon-pink); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.pp-fl-dot { fill: var(--neon-cyan); opacity: 0; }
.pp-fl-ping { fill: none; stroke: var(--neon-cyan); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.pp-fl-now { position: absolute; top: 6px; right: 6px; font-family: 'Pretendard', sans-serif; font-size: 12px; font-weight: 800; color: var(--neon-cyan); }
.is-play .pp-fl-line { animation: pp-draw 1.6s cubic-bezier(.45, 0, .2, 1) forwards; }
.is-play .pp-fl-area { animation: pp-fade .6s 1.2s forwards; }
.is-play .pp-fl-dot { animation: pp-fade .2s 1.55s forwards; }
.is-play .pp-fl-ping { animation: pp-ping 1.4s 1.6s ease-out 3; }
@keyframes pp-draw { to { stroke-dashoffset: 0; } }
@keyframes pp-fade { to { opacity: 1; } }
@keyframes pp-ping { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }
.is-still .pp-fl-line { stroke-dashoffset: 0; animation: none; }
.is-still .pp-fl-area, .is-still .pp-fl-dot { opacity: 1; animation: none; }

/* 막대 레이스 */
.pp-cut-viz[data-pp-motion="race"] { position: relative; display: block; width: 100%; height: 176px; }
.pp-rc-bar {
  position: absolute; left: 0; right: 0; top: 0; height: calc(100% / var(--pp-rc-rows, 5)); padding: 3px 0;
  transition: transform .6s cubic-bezier(.5, 0, .2, 1);
}
.pp-rc-fill {
  position: absolute; left: 0; top: 3px; bottom: 3px; width: 0; border-radius: 8px;
  transition: width .6s cubic-bezier(.5, 0, .2, 1); opacity: .85;
}
.pp-rc-label { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 800; color: #fff; white-space: nowrap; text-shadow: 0 1px 3px rgba(0, 0, 0, .55); }
.pp-rc-num { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-family: var(--font-main); font-weight: 800; font-variant-numeric: tabular-nums; font-size: 15px; color: var(--text-sub); }
.pp-rc-bar.is-top .pp-rc-num { color: var(--neon-lime); }
.pp-rc-bar.is-c0 .pp-rc-fill { background: linear-gradient(90deg, #cb23a2, #ff5fd2); }
.pp-rc-bar.is-c1 .pp-rc-fill { background: linear-gradient(90deg, #5b1bb8, #8338ec); }
.pp-rc-bar.is-c2 .pp-rc-fill { background: linear-gradient(90deg, #007f95, #00c6e0); }
.pp-rc-bar.is-c3 .pp-rc-fill { background: linear-gradient(90deg, #008a5a, #00d18a); }
.pp-rc-bar.is-c4 .pp-rc-fill { background: linear-gradient(90deg, #a07900, #e0b400); }

/* 태그 — 짚어 주는 지점이 차례로 튀어 오른다 */
.pp-cut-viz[data-pp-motion="tags"] { display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 8px; padding: 0 6px; }
.pp-cut-viz[data-pp-motion="tags"] span {
  padding: 8px 14px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 800; color: var(--text-pure);
  background: color-mix(in srgb, var(--neon-pink) 16%, transparent); border: 1px solid color-mix(in srgb, var(--neon-pink) 55%, transparent);
  opacity: 0; transform: translateY(10px) scale(.9);
}
.pp-cut-viz[data-pp-motion="tags"] span:nth-child(even) { background: color-mix(in srgb, var(--neon-cyan) 12%, transparent); border-color: color-mix(in srgb, var(--neon-cyan) 50%, transparent); }
.pp-cut-viz[data-pp-motion="tags"].is-play span { animation: pp-tag .45s cubic-bezier(.2, 1.5, .4, 1) forwards; }
.pp-cut-viz[data-pp-motion="tags"].is-play span:nth-child(2) { animation-delay: .35s; }
.pp-cut-viz[data-pp-motion="tags"].is-play span:nth-child(3) { animation-delay: .7s; }
.pp-cut-viz[data-pp-motion="tags"].is-play span:nth-child(4) { animation-delay: 1.05s; }
.pp-cut-viz[data-pp-motion="tags"].is-play span:nth-child(5) { animation-delay: 1.4s; }
@keyframes pp-tag { to { opacity: 1; transform: none; } }
.pp-cut-viz[data-pp-motion="tags"].is-still span { opacity: 1; transform: none; animation: none; }

/* ── 이런 밤, 그 사람은 이렇게 읽혀 — 상황 칩 + 대화 ──────────────────── */
.pp-voices { margin: 56px 0 12px; }
.pp-voices-body {
  display: grid; grid-template-columns: minmax(200px, 250px) minmax(0, 1fr); gap: 18px; align-items: start;
  padding: 18px; border-radius: 22px; background: var(--bg-card); border: 1px solid var(--border-box-purple);
}
.pp-voices-chips { display: flex; flex-direction: column; gap: 8px; }
.pp-voice-chip {
  min-height: 44px; padding: 10px 16px; border-radius: 14px; text-align: left; cursor: pointer;
  border: 1px solid var(--border-box-purple); background: transparent; color: var(--text-sub);
  font: inherit; font-size: 15px; font-weight: 800; transition: background .2s, border-color .2s, color .2s;
}
.pp-voice-chip:hover { border-color: var(--neon-pink); color: var(--text-pure); }
.pp-voice-chip[aria-pressed="true"] { background: linear-gradient(135deg, #cb23a2, #7a22d6); border-color: transparent; color: #fff; }
.pp-voice-chip:focus-visible { outline: 3px solid var(--neon-cyan); outline-offset: 2px; }
.pp-chat { display: flex; flex-direction: column; gap: 10px; min-height: 300px; padding: 4px; }
.pp-bubble { margin: 0; max-width: 88%; padding: 12px 16px; border-radius: 18px; font-size: 15.5px; line-height: 1.7; animation: pp-pop .32s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pp-pop { from { opacity: 0; transform: translateY(8px) scale(.96); } }
.pp-bubble.is-me { align-self: flex-end; border-bottom-right-radius: 6px; background: linear-gradient(135deg, #cb23a2, #a51d70); /* 흰 글자 4.5:1 */ color: #fff; font-weight: 700; }
.pp-bubble.is-read { align-self: flex-start; border-bottom-left-radius: 6px; background: var(--bg-card-inner); border: 1px solid var(--border-box-bright); color: var(--text-pure); }
.pp-bubble-tag { display: block; margin-bottom: 4px; font-size: 12.5px; font-weight: 800; color: var(--neon-cyan); }
.pp-bubble-text { margin: 0; min-height: 1.7em; }
.pp-bubble.is-typing { display: inline-flex; gap: 5px; padding: 14px 18px; }
.pp-bubble.is-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-sub); animation: pp-dot 1s infinite ease-in-out; }
.pp-bubble.is-typing i:nth-child(2) { animation-delay: .15s; }
.pp-bubble.is-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes pp-dot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }
.pp-bubble.is-locked { position: relative; border-color: color-mix(in srgb, var(--neon-yellow) 55%, var(--border-box-bright)); }
.pp-bubble.is-locked .pp-bubble-tag { color: var(--neon-yellow); }
.pp-lock-veil { display: grid; gap: 7px; margin: 8px 0 10px; filter: blur(3px); }
.pp-lock-veil i { display: block; height: 11px; border-radius: 6px; background: linear-gradient(90deg, color-mix(in srgb, var(--text-sub) 45%, transparent), color-mix(in srgb, var(--text-sub) 12%, transparent)); }
.pp-lock-veil i + i { width: 72%; }
.pp-lock-note { display: block; font-size: 13px; font-weight: 800; color: var(--neon-yellow); }
.pp-voices-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 16px; }
.pp-voices-price { margin: 0; font-size: 15px; font-weight: 700; color: var(--text-sub); }
.pp-voices-price b { color: var(--text-pure); }
.pp-voices-note { margin: 10px 0 0; font-size: 13px; line-height: 1.6; color: var(--text-muted); }
.pp-field-note { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); }

/* ── 입력칸(CTA 목적지) ─────────────────────────────────────────────────── */
.pp-input { margin: 44px 0 20px; scroll-margin-top: 84px; }
.pp-input-title { margin: 0 0 6px; font-size: clamp(22px, 3vw, 28px); font-weight: 900; color: var(--text-pure); }
.pp-input-desc { margin: 0 0 16px; font-size: 15px; line-height: 1.7; color: var(--text-sub); }
.pp-more { margin: 36px 0 12px; }
.pp-more p { margin: 0 0 10px; font-size: 15px; font-weight: 800; color: var(--text-sub); }

@media (max-width: 900px) {
  .pp-voices-body { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .pp-voices-chips { flex-direction: row; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .pp-voice-chip { flex: 0 0 auto; white-space: nowrap; }
  .pp-bubble { max-width: 94%; }
  /* 좁은 화면은 마스코트가 글자 뒤로 오므로 세로 덮개로 글자를 지킨다 */
  .pp-hero::before { background: linear-gradient(180deg, rgba(6,2,14,.72) 0%, rgba(6,2,14,.88) 45%, rgba(6,2,14,.95) 100%); }
  .pp-cut-grid { grid-template-columns: minmax(0, 1fr); }
  .pp-monitor { margin: 20px -18px 18px; }
  .pp-readout { top: 8px; right: 14px; }
  .pp-hero .pp-lead { font-size: 15px; }
}
@media (max-width: 599px) {
  /* 좁은 화면은 계기판을 띠 위쪽 한 줄로 올리고 그림은 그 아래에 그린다 — 숫자가 그림을 가리지 않는다 */
  .pp-monitor { height: 200px; }
  .pp-monitor canvas { top: 40px; height: calc(100% - 40px); }
  .pp-readout { top: 6px; left: 18px; right: 18px; display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; }
  .pp-readout-num { font-size: 34px; }
}
@media (max-width: 560px) {
  .pp-cta { flex: 1 1 100%; justify-content: center; }
  .pp-cta-sub { flex: 1 1 100%; text-align: center; }
}
/* 낮 모드 — 막대 레이스는 흰 카드 위라 라벨이 채움 밖으로 나가면 사라진다: 채움을 옅게, 라벨을 잉크로 */
html[data-theme="light"] .pp-rc-fill { opacity: .3; }
html[data-theme="light"] .pp-rc-label { color: var(--text-pure); text-shadow: none; }
@media (prefers-reduced-motion: reduce) {
  .pp-live, .pp-title em.is-beat, .pp-readout.is-beat .pp-readout-num i, .pp-bubble, .pp-bubble.is-typing i { animation: none; }
  .pp-rc-bar, .pp-rc-fill { transition: none; }
}
