/* 닮은꽃테스트 — 아이보리/핑크 뷰티 무드. 결과 카드 색은 JS가 --ff-accent/--ff-bg/--ff-ink 주입 */
:root {
  --ffx-cream: #fdf8f4;
  --ffx-ink: #4a3b42;
  --ffx-rose: #e6799b;
  --ffx-rose-d: #c74e75;
  --ffx-line: #f0e2e8;
}

.ff-wrap {
  background: linear-gradient(180deg, #fdf3f6 0%, #fbf6f2 100%);
  min-height: 100vh;
  padding: 18px 14px 60px;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ffx-ink);
}
.ff-inner { max-width: 560px; margin: 0 auto; }
.ff-wrap, .ff-inner { overflow-x: hidden; }
.ff-avg-grid, .ff-panels, .ff-flower-list { min-width: 0; }
.ff-avg-cell { min-width: 0; overflow: hidden; }
.ff-panels canvas { width: 100%; height: auto; }

.ff-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ff-home, .ff-admin { color: #b58ba0; text-decoration: none; font-size: 14px; }
.ff-admin { background: #fceef4; padding: 5px 12px; border-radius: 20px; }

.ff-hero { text-align: center; padding: 14px 0 6px; }
.ff-crest { font-size: 46px; line-height: 1; }
.ff-title {
  font-family: 'Nanum Myeongjo', serif; font-weight: 800;
  font-size: 34px; margin: 8px 0 6px; color: #7d3557; letter-spacing: 1px;
}
.ff-sub { font-size: 15px; color: #a5768c; }
.ff-quote {
  font-family: 'Nanum Myeongjo', serif; font-style: italic;
  font-size: 18px; color: #c74e75; margin-top: 12px;
}

.ff-badges { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin: 16px 0; }
.ff-badge {
  background: #fff; border: 1px solid var(--ffx-line); color: #a5768c;
  font-size: 12px; padding: 6px 11px; border-radius: 20px;
}

.ff-card {
  background: #fff; border: 1px solid var(--ffx-line); border-radius: 18px;
  padding: 20px; margin-bottom: 16px;
  box-shadow: 0 2px 14px rgba(199, 78, 117, .05);
}
.ff-sec-title { font-weight: 700; font-size: 16px; color: #7d3557; margin-bottom: 14px; text-align: center; }

.ff-flower-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ff-flower-item {
  background: #fdf3f7; border-radius: 12px; padding: 12px 4px; text-align: center;
}
.ff-flower-item .g { font-size: 24px; display: block; }
.ff-flower-item .n { font-size: 12px; color: #a5768c; margin-top: 4px; }
.ff-flower-note { font-size: 13px; color: #b58ba0; text-align: center; margin-top: 14px; line-height: 1.7; }
.ff-flower-note b { color: #c74e75; }

/* 업로드 */
.ff-drop {
  border: 2px dashed #f0bcd0; border-radius: 16px; padding: 34px 16px; text-align: center;
  cursor: pointer; transition: .2s; background: #fefafc;
}
.ff-drop.drag { border-color: var(--ffx-rose); background: #fdeef4; }
.ff-drop .ic { font-size: 42px; }
.ff-drop .t { font-weight: 700; font-size: 17px; color: #7d3557; margin: 10px 0 4px; }
.ff-drop .s { font-size: 13px; color: #b58ba0; }
.ff-drop .s2 { font-size: 12px; color: #c9a3b5; margin-top: 12px; }
.ff-file { display: none; }
.ff-status { text-align: center; font-size: 13px; color: #c74e75; margin-top: 12px; min-height: 18px; }
.ff-privacy {
  margin-top: 14px; padding: 12px 14px; background: #f3f8f3; border: 1px solid #d9ebd9;
  border-radius: 12px; font-size: 12.5px; color: #4a6a4a; text-align: center; line-height: 1.7;
}
.ff-privacy b { color: #2e7d32; }

/* 버튼 */
.ff-btn {
  border: none; border-radius: 12px; padding: 13px 18px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: .15s; font-family: inherit;
}
.ff-btn:active { transform: scale(.97); }
.ff-btn-primary { background: var(--ffx-rose); color: #fff; margin-top: 16px; }
.ff-btn-primary:hover { background: var(--ffx-rose-d); }
.ff-btn-accent { background: #fff; color: var(--ffx-rose-d); border: 1.5px solid var(--ffx-rose); }
.ff-btn-ghost { background: #f7eef2; color: #a5768c; }
.ff-btn-row { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.ff-btn-row .ff-btn { flex: 1; min-width: 120px; }

.ff-hidden { display: none !important; }

/* ── 매거진 화보 결과 카드 ────────────────────────────── */
.ff-mag {
  --ff-accent: #e6799b; --ff-bg: #fdeaf1; --ff-ink: #8f3159;
  background: var(--ff-bg); border-radius: 18px; padding: 26px 22px; text-align: center;
  border: 1px solid rgba(0,0,0,.04);
}
.ff-mag-top { letter-spacing: 4px; font-size: 13px; color: var(--ff-accent); font-weight: 600; }
.ff-mag-sub { font-size: 13px; color: var(--ff-ink); margin-top: 4px; opacity: .8; }
.ff-face-ring {
  width: 150px; height: 150px; margin: 18px auto 14px; border-radius: 50%;
  overflow: hidden; border: 4px solid #fff; box-shadow: 0 0 0 2px var(--ff-accent);
  background: #fff;
}
.ff-face-ring canvas { width: 100%; height: 100%; display: block; }
.ff-emoji { font-size: 30px; }
.ff-flowername {
  font-family: 'Nanum Myeongjo', serif; font-weight: 800; font-size: 40px;
  color: var(--ff-ink); margin: 2px 0 6px;
}
.ff-oneliner { font-size: 14px; color: var(--ff-accent); margin-bottom: 20px; padding: 0 6px; line-height: 1.6; }
.ff-makeup-tag {
  display: inline-block; background: #fff; color: var(--ff-ink);
  font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 20px;
  margin: -8px auto 20px; border: 1px solid var(--ff-accent);
}
.ff-makeup-tag span { color: var(--ff-accent); }
.ff-makeup-tag em {
  font-style: normal; font-size: 11px; font-weight: 700;
  background: var(--ff-accent); color: #fff; padding: 2px 8px; border-radius: 10px; margin-right: 4px;
}

.ff-axes { background: #fff; border-radius: 14px; padding: 16px 18px; margin-bottom: 16px; }
.ff-axis-row { display: flex; align-items: center; margin-bottom: 11px; }
.ff-axis-row:last-child { margin-bottom: 0; }
.ff-axis-row .lab { font-size: 13px; color: var(--ff-ink); width: 48px; text-align: left; }
.ff-axis-row .track {
  flex: 1; height: 7px; background: var(--ff-bg); border-radius: 4px; margin: 0 10px; overflow: hidden;
}
.ff-axis-row .track i { display: block; height: 100%; width: 0; background: var(--ff-accent); border-radius: 4px; transition: width .8s ease; }
.ff-axis-row b { font-size: 12px; color: var(--ff-accent); width: 26px; text-align: right; font-weight: 600; }

.ff-ai-box {
  background: #fff; border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; text-align: center;
}
.ff-ai-text {
  font-family: 'Nanum Myeongjo', serif; font-style: italic; font-size: 15px;
  line-height: 1.9; color: var(--ff-ink); white-space: pre-wrap;
}
.ff-ai-text.ff-loading { opacity: .5; font-style: normal; }
.ff-ai-seal { margin-top: 12px; font-size: 13px; color: var(--ff-accent); }

.ff-detail-link { display: inline-block; margin-top: 6px; color: var(--ff-ink); font-size: 14px; font-weight: 600; text-decoration: none; }

/* 분석 시각화 (접이식) */
.ff-panels-wrap { margin-top: 16px; }
.ff-panels-wrap summary { cursor: pointer; font-size: 13px; color: #b58ba0; text-align: center; list-style: none; }
.ff-panels-wrap summary::-webkit-details-marker { display: none; }
.ff-panels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.ff-panels canvas { width: 100%; border-radius: 10px; background: #fdeef4; display: block; }
.ff-panels .lbl { font-size: 11px; color: #b58ba0; text-align: center; margin-top: 5px; }

.ff-disclaimer { font-size: 12px; color: #c9a3b5; text-align: center; margin-top: 16px; line-height: 1.7; }

/* 평균 얼굴 */
.ff-avg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ff-avg-cell {
  background: #fdf3f7; border-radius: 12px; padding: 10px 6px; text-align: center;
  text-decoration: none; display: block; transition: .15s;
}
.ff-avg-cell:hover { background: #fceaf1; transform: translateY(-2px); }
.ff-avg-cell.locked { opacity: .5; }
.ff-avg-cell canvas { border-radius: 8px; width: 100%; height: auto; max-width: 130px; }
.ff-avg-cell .n { font-size: 13px; color: #7d3557; font-weight: 600; margin-top: 6px; }
.ff-avg-cell .c { font-size: 11px; color: #b58ba0; margin-top: 2px; }

/* 댓글 */
.ff-comments {
  background: #fff; border: 1px solid var(--ffx-line); border-radius: 18px; padding: 20px; margin-bottom: 16px;
}
.ff-cform input[type=text], .ff-cform textarea {
  width: 100%; border: 1px solid var(--ffx-line); border-radius: 10px; padding: 10px 12px;
  font-size: 14px; margin-bottom: 8px; font-family: inherit; box-sizing: border-box; background: #fefafc;
}
.ff-cform textarea { min-height: 64px; resize: vertical; }
.ff-hp { display: none; }
.ff-comment { border-top: 1px solid var(--ffx-line); padding: 12px 0; }
.ff-comment .meta { font-size: 12px; color: #b58ba0; margin-bottom: 5px; }
.ff-comment .meta .nick { font-weight: 700; color: #7d3557; }
.ff-comment .body { font-size: 14px; color: var(--ffx-ink); line-height: 1.6; white-space: pre-wrap; }
.ff-comment .act { margin-top: 7px; display: flex; gap: 8px; }
.ff-comment .act button {
  background: #fdf3f7; border: none; border-radius: 16px; padding: 4px 12px; font-size: 12px;
  color: #a5768c; cursor: pointer;
}
.ff-comment .act button.on { background: #fbd4e2; color: #c74e75; }
.ff-replies { margin-left: 18px; margin-top: 8px; padding-left: 12px; border-left: 2px solid #fceaf1; }
.ff-replyform textarea { width: 100%; border: 1px solid var(--ffx-line); border-radius: 10px; padding: 8px 10px; font-size: 13px; margin: 6px 0; box-sizing: border-box; }

.ff-mini-footer { text-align: center; font-size: 12px; color: #c9a3b5; margin-top: 8px; }
.ff-c-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }
.ff-c-pager .ff-c-pg {
  background: #fdf3f7; border: 1px solid var(--ffx-line); border-radius: 16px;
  padding: 6px 14px; font-size: 13px; color: #c74e75; cursor: pointer; font-family: inherit;
}
.ff-c-pager .ff-c-pg:disabled { color: #d9c2ce; cursor: default; }
.ff-c-pager .ff-c-pgnum { font-size: 12px; color: #b58ba0; }.ff-mini-footer a { color: #b58ba0; text-decoration: none; }

@media (max-width: 420px) {
  .ff-flower-list { grid-template-columns: repeat(3, 1fr); }
  .ff-title { font-size: 30px; }
}

/* 다른 테스트 상호 추천 */
.ff-cross-link { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; border: 1px solid var(--ffx-line); border-radius: 14px; text-decoration: none; transition: .2s; }
.ff-cross-link:hover { border-color: var(--ffx-rose); background: #fdf8fa; }
.ff-cross-emoji { font-size: 34px; flex: none; }
.ff-cross-txt { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.ff-cross-txt b { font-size: 15px; color: var(--ffx-ink); }
.ff-cross-txt small { font-size: 12.5px; color: #b58ba0; }
.ff-cross-arrow { font-size: 20px; color: var(--ffx-rose); flex: none; }
