/* ==========================================================================
   썸시그널 · 디자인 시스템
   ========================================================================== */
:root {
  /* 베이스 */
  --bg: #fdfbfc;
  --bg-soft: #faf6f8;
  --surface: #ffffff;
  --ink: #1f1d28;
  --ink-soft: #4a4757;
  --muted: #8a8497;
  --line: #f0e7ec;
  --line-strong: #e4d6df;

  /* 파스텔 포인트 */
  --pink: #ff7aa1;
  --pink-strong: #ff5c8a;
  --pink-deep: #d63a6d;
  --pink-soft: #ffe5ed;
  --pink-mist: #fff3f7;
  --sky: #8ccff0;
  --sky-soft: #e5f4ff;
  --sky-mist: #f3faff;
  --lavender: #d9d4ff;
  --lavender-soft: #f1eeff;
  --mint: #b5e6da;
  --mint-soft: #e9f7f3;
  --gold: #d49a3a;
  --gold-soft: #fff3dc;
  --danger: #d8485f;

  /* 그림자 */
  --shadow-sm: 0 4px 14px rgba(214, 58, 109, 0.06);
  --shadow-md: 0 14px 34px rgba(78, 50, 70, 0.08);
  --shadow-lg: 0 28px 56px rgba(78, 50, 70, 0.12);
  --shadow-pink: 0 18px 36px rgba(255, 92, 138, 0.22);

  /* 반경 */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* 트랜지션 */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Segoe UI", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 10% -10%, rgba(255, 218, 230, 0.55), transparent 60%),
    radial-gradient(900px 700px at 100% 0%, rgba(214, 240, 255, 0.55), transparent 60%),
    radial-gradient(800px 700px at 50% 110%, rgba(238, 232, 255, 0.45), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, select, input { font: inherit; color: inherit; }

/* ==========================================================================
   인트로 오버레이
   ========================================================================== */
body.is-intro { overflow: hidden; }

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: block;
  padding: 0;
  background: #fff5f9; /* 이미지 로딩 전 짧은 시간 동안 보일 베이스 컬러 */
  overflow: hidden;
  transition: opacity var(--ease) 0.6s, visibility 0s linear 0.6s;
}

.intro-overlay.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  display: none; /* 풀스크린 배경 이미지가 있으니 블롭 비활성 */
}

.intro-bg .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
  animation: blobFloat 14s ease-in-out infinite;
}

.intro-bg .blob-pink {
  width: 380px; height: 380px;
  background: radial-gradient(circle, #ffb1c8, transparent 70%);
  top: -80px; left: -60px;
}

.intro-bg .blob-sky {
  width: 420px; height: 420px;
  background: radial-gradient(circle, #b8dffb, transparent 70%);
  bottom: -120px; right: -80px;
  animation-delay: -5s;
}

.intro-bg .blob-lavender {
  width: 280px; height: 280px;
  background: radial-gradient(circle, #d8cfff, transparent 70%);
  top: 40%; left: 60%;
  animation-delay: -9s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(20px, -30px) scale(1.05); }
  66%      { transform: translate(-15px, 20px) scale(0.97); }
}

.intro-skip {
  position: absolute;
  top: 22px;
  right: 24px;
  z-index: 2;
  padding: 9px 16px;
  border: 1px solid rgba(214, 58, 109, 0.18);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  color: var(--pink-deep);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background var(--ease) 0.2s, transform var(--ease) 0.2s;
}

.intro-skip:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
}

/* 인트로 스테이지: 카드 없이 전체 화면을 차지 */
.intro-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.intro-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  text-align: center;
  gap: 8px;
  padding: 40px clamp(24px, 6vw, 80px) clamp(80px, 14vh, 140px);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  pointer-events: none;
  overflow: hidden;
  isolation: isolate;
}

/* 풀스크린 배경 이미지 */
.intro-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1s var(--ease), transform 9s linear;
  user-select: none;
  pointer-events: none;
  z-index: -2;
}

/* 텍스트 가독성용 그라데이션 (하단을 더 강하게) */
.intro-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 35%,
    rgba(255, 245, 250, 0.55) 60%,
    rgba(255, 240, 246, 0.92) 100%
  );
  z-index: -1;
  pointer-events: none;
}

.intro-slide.is-active .intro-art {
  opacity: 1;
  transform: scale(1);
}

.intro-slide.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.intro-slide.is-past {
  opacity: 0;
  transform: translateY(-18px);
}

.intro-slide em {
  display: block;
  color: var(--pink-deep);
  font-style: normal;
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 700;
  letter-spacing: -0.01em;
  opacity: 0.92;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.6);
}

.intro-slide strong {
  display: block;
  font-size: clamp(32px, 5.6vw, 56px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-weight: 900;
  background: linear-gradient(135deg, #2a1f29 0%, #6b3b58 55%, var(--pink-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(255, 255, 255, 0.7));
}

.intro-slide--brand .intro-brand {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: center;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-md);
}

.intro-slide--brand .intro-brand i {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-weight: 900;
  font-style: normal;
  color: #fff;
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink-strong) 100%);
  box-shadow: 0 6px 14px rgba(255, 92, 138, 0.4);
}

.intro-slide--brand .intro-brand b {
  font-size: 18px;
  color: var(--pink-deep);
}

.intro-dots {
  position: absolute;
  bottom: 38px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
}

.intro-dots i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(214, 58, 109, 0.22);
  transition: all 0.3s var(--ease);
}

.intro-dots i.is-active {
  width: 28px;
  border-radius: var(--r-pill);
  background: var(--pink-strong);
}

.intro-dots i.is-past {
  background: rgba(214, 58, 109, 0.45);
}

/* ==========================================================================
   본문 페이드인
   ========================================================================== */
body.is-intro .app-shell {
  opacity: 0;
  transform: translateY(12px);
}

body.is-ready .app-shell {
  animation: appShellIn 0.85s var(--ease) both;
}

@keyframes appShellIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   레이아웃
   ========================================================================== */
.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

/* ==========================================================================
   히어로
   ========================================================================== */
.hero { color: var(--ink); }

.intro-hero {
  position: relative;
  display: grid;
  gap: 22px;
  padding: 28px 32px 22px;
  border-radius: var(--r-xl);
  background:
    radial-gradient(600px 280px at 100% 0%, rgba(214, 240, 255, 0.7), transparent 70%),
    radial-gradient(500px 280px at 0% 100%, rgba(255, 218, 230, 0.7), transparent 70%),
    rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(244, 210, 222, 0.7);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(6px);
  overflow: hidden;
}

.hero-art {
  position: absolute;
  top: 18px;
  right: 22px;
  width: clamp(150px, 22vw, 220px);
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--r-lg);
  pointer-events: none;
  user-select: none;
  opacity: 0.96;
  box-shadow: 0 20px 36px rgba(78, 50, 70, 0.18), 0 2px 6px rgba(255, 255, 255, 0.6) inset;
  border: 1px solid rgba(255, 255, 255, 0.7);
  animation: heroFloat 7s ease-in-out infinite;
  z-index: 0;
}

.intro-hero > .brand-row,
.intro-hero > .hero-headline,
.intro-hero > .message-marquee { position: relative; z-index: 1; }

@keyframes heroFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-8px) rotate(-1.5deg); }
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink-strong) 100%);
  font-weight: 900;
  font-size: 16px;
  box-shadow: 0 8px 18px rgba(255, 92, 138, 0.32);
}

.brand-name, .brand-note, .eyebrow { margin: 0; }
.brand-name { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.brand-note { color: var(--muted); font-size: 13px; }

.hero-headline {
  display: grid;
  gap: 14px;
  padding: 8px 0 4px;
}

.hero-headline h1 {
  margin: 0;
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.025em;
  font-weight: 900;
  background: linear-gradient(135deg, #2a1f29 0%, var(--pink-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-headline p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
}

/* ==========================================================================
   롤링 배너
   ========================================================================== */
.message-marquee {
  overflow: hidden;
  border: 1px solid rgba(214, 58, 109, 0.12);
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--pink-mist) 0%, var(--sky-mist) 100%);
  position: relative;
  mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}

.message-marquee div {
  display: flex;
  width: max-content;
  gap: 36px;
  padding: 12px 24px;
  color: var(--pink-deep);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.005em;
  white-space: nowrap;
  animation: marqueeMove 28s linear infinite;
}

.message-marquee span {
  display: inline-flex;
  align-items: center;
  gap: 36px;
}

.message-marquee span::after {
  content: "♡";
  color: var(--sky);
  font-size: 12px;
}

@keyframes marqueeMove {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ==========================================================================
   인포 카드 (3단)
   ========================================================================== */
.intro-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.intro-info article {
  position: relative;
  padding: 22px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.intro-info article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.intro-info article:nth-child(1) { background: linear-gradient(165deg, var(--pink-mist) 0%, #fff 70%); }
.intro-info article:nth-child(2) { background: linear-gradient(165deg, var(--sky-mist) 0%, #fff 70%); }
.intro-info article:nth-child(3) { background: linear-gradient(165deg, var(--lavender-soft) 0%, #fff 70%); }

.intro-info article span {
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--pink-deep);
  font-weight: 900;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(214, 58, 109, 0.12);
}

.intro-info strong {
  display: block;
  margin-top: 14px;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.intro-info p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}

/* ==========================================================================
   개인정보 안내
   ========================================================================== */
.privacy-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
  padding: 22px 24px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(140, 207, 240, 0.35);
  background: linear-gradient(120deg, var(--sky-mist) 0%, #fff 70%);
  box-shadow: var(--shadow-sm);
}

.privacy-note h2 {
  margin: 6px 0 0;
  font-size: 20px;
  letter-spacing: -0.015em;
}

.privacy-note p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}

.trust-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.privacy-note .trust-strip span {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(140, 207, 240, 0.5);
  background: #fff;
  color: #266a8e;
  font-size: 13px;
  font-weight: 700;
}

/* ==========================================================================
   패널 (공통)
   ========================================================================== */
.panel, .sub-panel {
  margin-top: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.section-heading { margin-bottom: 14px; }

.eyebrow {
  color: var(--pink-deep);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h2, h3 { margin: 6px 0 0; letter-spacing: -0.015em; }
h2 { font-size: 22px; }
h3 { font-size: 19px; }

.upload-panel, #peoplePanel { padding: 22px; }
.upload-panel .section-heading,
#peoplePanel .section-heading { margin-bottom: 14px; }
.upload-panel h2, #peoplePanel h2 { font-size: 20px; }

/* ==========================================================================
   업로드 영역
   ========================================================================== */
.drop-zone {
  position: relative;
  min-height: 96px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px 14px;
  text-align: left;
  border: 1.5px dashed rgba(255, 122, 161, 0.45);
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--pink-mist) 0%, #fff 70%);
  cursor: pointer;
  padding: 18px 20px;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

.drop-zone:hover {
  border-color: var(--pink-strong);
  background: linear-gradient(135deg, #ffe1ea 0%, #fff 70%);
  transform: translateY(-1px);
}

.drop-zone strong {
  font-size: 15px;
}

.drop-zone strong, .drop-zone small {
  grid-column: 2;
  text-align: left;
}

.drop-zone input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
}

.upload-icon {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink-strong) 100%);
  font-weight: 900;
  font-size: 12px;
  box-shadow: 0 6px 14px rgba(255, 92, 138, 0.3);
}

.drop-zone small,
.helper-text,
.notice,
.advice {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.file-summary, .notice {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--pink-mist);
  border: 1px solid rgba(255, 122, 161, 0.22);
  color: var(--ink-soft);
}

/* ==========================================================================
   파스/스코어/시그널 그리드
   ========================================================================== */
.parse-grid, .score-grid, .signal-grid, .summary-grid, .chooser-grid {
  display: grid;
  gap: 14px;
}

.parse-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.parse-card, .score-card, .temperature-card, .balance-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px;
  background: #fff;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.parse-card:hover, .score-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.parse-card span, .score-card span,
.temperature-card p, .balance-card p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.parse-card strong, .score-card strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.chooser-grid {
  margin-top: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chooser-grid label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
}

select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 0 14px;
  background: #fff;
  font-weight: 600;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

select:focus {
  outline: none;
  border-color: var(--pink-strong);
  box-shadow: 0 0 0 4px rgba(255, 92, 138, 0.12);
}

/* ==========================================================================
   버튼
   ========================================================================== */
.primary-button, .ghost-button {
  min-height: 46px;
  border: 0;
  border-radius: var(--r-md);
  padding: 0 22px;
  cursor: pointer;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
}

.primary-button {
  margin-top: 14px;
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink-strong) 100%);
  color: #fff;
  box-shadow: var(--shadow-pink);
}

.primary-button:hover { transform: translateY(-1px); filter: brightness(1.04); }
.primary-button:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.4); }

.ghost-button {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.ghost-button:hover {
  border-color: var(--pink-strong);
  color: var(--pink-deep);
}

/* ==========================================================================
   결과 헤더
   ========================================================================== */
.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.result-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* 카카오톡 공유 버튼 — 카카오 노란색 브랜드 컬러 */
.kakao-share-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 0;
  border-radius: var(--r-pill);
  background: #FEE500; /* 카카오 공식 노란색 */
  color: #181600;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(254, 229, 0, 0.4);
  transition: transform var(--ease) 0.2s, box-shadow var(--ease) 0.2s, filter var(--ease) 0.2s;
}

.kakao-share-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(254, 229, 0, 0.5);
  filter: brightness(1.02);
}

.kakao-share-button:active {
  transform: translateY(0);
}

.kakao-share-button .kakao-icon {
  font-size: 16px;
  line-height: 1;
}

.verdict-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 14px;
  margin-top: 18px;
}

.final-card, .traffic-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  background: #fff;
}

.final-card {
  background:
    radial-gradient(400px 200px at 100% 0%, rgba(255, 218, 230, 0.55), transparent 70%),
    linear-gradient(180deg, #fff, #fffafc);
  border-color: rgba(255, 122, 161, 0.22);
}

.final-card-head, .traffic-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.final-card-head span, .traffic-head span,
.action-box span, .next-action span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.final-card-head strong {
  display: block;
  margin-top: 4px;
  color: var(--pink-deep);
  font-size: 36px;
  line-height: 1;
  font-weight: 900;
}

.final-card-head strong b {
  font-size: 52px;
  background: linear-gradient(135deg, var(--pink-strong) 0%, var(--pink-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.temp-range, .temp-confidence {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
}

.temp-confidence {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.final-card-head em {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: var(--r-pill);
  color: var(--pink-deep);
  background: var(--pink-soft);
  border: 1px solid rgba(255, 122, 161, 0.3);
  font-style: normal;
  font-weight: 900;
  font-size: 13px;
}

.thermometer {
  position: relative;
  height: 24px;
  margin: 22px 14px 18px 0;
  border-radius: var(--r-pill);
  background: #f4eef1;
  box-shadow: inset 0 0 0 1px rgba(32, 33, 42, 0.04);
}

.thermometer i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sky) 0%, var(--lavender) 40%, var(--pink) 75%, var(--pink-strong) 100%);
}

.thermometer b {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--pink-strong);
  transform: translate(-50%, -50%);
  box-shadow: 0 6px 14px rgba(255, 92, 138, 0.32);
}

.thermometer.is-empty i { width: 0% !important; background: #e6deeb; }
.thermometer.is-empty b {
  left: 0% !important;
  border-color: #b9b2c3;
  box-shadow: none;
}

.calibration-panel ul {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.calibration-panel li + li { margin-top: 4px; }

.action-box {
  padding: 16px;
  border: 1px solid rgba(255, 122, 161, 0.22);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.85);
}

.action-box strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
  color: var(--pink-deep);
  letter-spacing: -0.015em;
}

.action-box p, .traffic-card p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 14px;
}

.deciding-message {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
}

.deciding-message[data-polarity="positive"] {
  border-color: rgba(181, 230, 218, 0.7);
  background: var(--mint-soft);
}

.deciding-message[data-polarity="caution"] {
  border-color: rgba(212, 154, 58, 0.3);
  background: var(--gold-soft);
}

.deciding-message span, .deciding-message small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.deciding-message blockquote {
  margin: 8px 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   신호등 (트래픽카드)
   ========================================================================== */
.traffic-card {
  background: linear-gradient(180deg, #fff, #fafbff);
  border-color: rgba(140, 207, 240, 0.25);
}

.traffic-light {
  display: grid;
  gap: 7px;
  padding: 10px;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, #2c2737 0%, #1f1a28 100%);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

.traffic-light i {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #4a4257;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.traffic-light[data-status="red"] [data-light="red"] {
  background: #ff6878;
  box-shadow: 0 0 18px rgba(255, 104, 120, 0.7), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.traffic-light[data-status="yellow"] [data-light="yellow"] {
  background: #ffc764;
  box-shadow: 0 0 18px rgba(255, 199, 100, 0.7), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.traffic-light[data-status="green"] [data-light="green"] {
  background: #5ed4a3;
  box-shadow: 0 0 18px rgba(94, 212, 163, 0.7), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.traffic-head strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  letter-spacing: -0.015em;
}

.next-action {
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--sky-mist);
  border: 1px solid rgba(140, 207, 240, 0.35);
}

.next-action strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   요약/온도
   ========================================================================== */
.summary-grid {
  margin-top: 18px;
  grid-template-columns: minmax(240px, 0.8fr) minmax(280px, 1.2fr);
}

.temperature-card { background: linear-gradient(135deg, var(--pink-mist) 0%, #fff 60%); }

.temp-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--pink-deep);
}

.temp-value span { font-size: 64px; line-height: 1; font-weight: 900; }
.temp-value small { font-size: 20px; }

.temperature-card strong {
  display: inline-block;
  margin-top: 10px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.direction-row {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-weight: 800;
}

.meter {
  height: 10px;
  border-radius: var(--r-pill);
  background: #f4eef1;
  overflow: hidden;
  margin-top: 8px;
}

.meter span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--sky), var(--pink-strong));
}

.balance-card em {
  display: inline-block;
  margin-top: 14px;
  color: var(--pink-deep);
  font-style: normal;
  font-weight: 900;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.badge-row span {
  padding: 7px 12px;
  border-radius: var(--r-pill);
  background: var(--pink-mist);
  border: 1px solid rgba(255, 122, 161, 0.22);
  color: var(--pink-deep);
  font-size: 13px;
  font-weight: 700;
}

.score-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* ==========================================================================
   트렌드 패널
   ========================================================================== */
.trend-panel {
  padding: 28px;
  background: linear-gradient(180deg, #fff 0%, #fbf8fb 100%);
}

.trend-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.trend-head p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
}

.trend-head strong {
  flex: 0 0 auto;
  padding: 12px 16px;
  border-radius: var(--r-pill);
  background: var(--pink-soft);
  color: var(--pink-deep);
  border: 1px solid rgba(255, 122, 161, 0.3);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.trend-rising .trend-head strong {
  background: var(--pink-soft);
  border-color: rgba(255, 122, 161, 0.3);
  color: var(--pink-deep);
}

.trend-falling .trend-head strong {
  background: var(--gold-soft);
  border-color: rgba(212, 154, 58, 0.3);
  color: var(--gold);
}

.trend-flat .trend-head strong,
.trend-unknown .trend-head strong {
  background: var(--mint-soft);
  border-color: rgba(181, 230, 218, 0.6);
  color: #2f8a78;
}

.trend-chart {
  margin-top: 18px;
  padding: 8px 4px 2px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  overflow: hidden;
}

.trend-chart:empty { display: none; }
.trend-chart svg { display: block; width: 100%; height: 220px; }

.trend-chart .trend-area { fill: url("#trendAreaGradient"); }

.trend-chart .trend-line {
  fill: none;
  stroke: url("#trendLineGradient");
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-chart .trend-cursor {
  stroke: rgba(32, 33, 42, 0.16);
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.trend-chart .trend-active-dot {
  fill: #fff;
  stroke: var(--pink-strong);
  stroke-width: 5;
}

.trend-chart .trend-hit { fill: transparent; cursor: pointer; pointer-events: all; }
.trend-chart text { fill: var(--ink); font-size: 16px; font-weight: 800; }

.trend-tooltip { pointer-events: none; }

.trend-tooltip rect {
  fill: rgba(255, 255, 255, 0.98);
  stroke: rgba(255, 122, 161, 0.4);
  filter: drop-shadow(0 10px 20px rgba(32, 33, 42, 0.14));
}

.trend-tooltip text { font-size: 12px; font-weight: 800; }
.trend-tooltip .tooltip-date { fill: var(--muted); }
.trend-tooltip .tooltip-main { fill: var(--pink-deep); font-size: 15px; }
.trend-tooltip .tooltip-sub { fill: var(--ink); }

.trend-bars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.trend-chip {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
}

.trend-chip span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.trend-chip strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   레이더 (썸스탯)
   ========================================================================== */
.radar-panel {
  display: grid;
  gap: 14px;
  align-items: start;
  padding-top: 20px;
}

.radar-layout {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(300px, 1fr);
  gap: 24px;
  align-items: start;
}

.radar-heading h3 { margin-top: 0; }
.radar-heading .helper-text { margin: 4px 0 0; }

.radar-chart { width: 100%; max-width: 300px; margin: 0 auto; }
.radar-chart svg { display: block; width: 100%; height: auto; }

.radar-ring { fill: none; stroke: #f0e7ec; stroke-width: 1; }
.radar-spoke { stroke: #f4eef1; stroke-width: 1; }

.radar-shape {
  fill: rgba(255, 122, 161, 0.20);
  stroke: var(--pink-strong);
  stroke-width: 3;
  stroke-linejoin: round;
}

.radar-point {
  fill: #fff;
  stroke: var(--pink-strong);
  stroke-width: 3;
}

.radar-chart text { fill: var(--ink); font-size: 12px; font-weight: 800; }

.radar-legend { display: grid; gap: 12px; }

.radar-profile {
  margin-bottom: 10px;
  padding: 16px;
  border: 1px solid rgba(255, 122, 161, 0.22);
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--pink-mist) 0%, #fff 60%);
}

.radar-profile strong {
  display: block;
  color: var(--pink-deep);
  font-size: 20px;
  letter-spacing: -0.01em;
}

.radar-profile p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 14px;
}

.radar-legend-row {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) 42px;
  gap: 8px;
  align-items: center;
}

.radar-legend-row span { color: var(--muted); font-size: 13px; font-weight: 600; }
.radar-legend-row strong { text-align: right; font-size: 14px; }

.radar-legend-row i {
  grid-column: 1 / -1;
  height: 7px;
  border-radius: var(--r-pill);
  background: #f4eef1;
  overflow: hidden;
}

.radar-legend-row b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--sky), var(--pink-strong));
}

.stat-review {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.stat-review > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fcfbfd;
}

.stat-review strong { display: block; font-size: 14px; letter-spacing: -0.005em; }
.stat-review ul { margin-top: 8px; padding-left: 18px; }
.stat-review li { margin: 6px 0; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }

/* ==========================================================================
   스코어 카드
   ========================================================================== */
.score-card { min-height: 118px; }

.score-card .bar {
  height: 8px;
  margin-top: 12px;
  border-radius: var(--r-pill);
  overflow: hidden;
  background: #f4eef1;
}

.score-card .bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--sky), var(--pink-strong));
}

.signal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

ul { margin: 12px 0 0; padding-left: 20px; }
li { margin: 8px 0; line-height: 1.55; }

.compact-stats #statsGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.stat-chip {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
}

.stat-chip span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.stat-chip strong { display: block; margin-top: 4px; font-size: 16px; }

.hidden { display: none !important; }

/* 데모 모드 */
.demo-mode .hero,
.demo-mode .intro-info,
.demo-mode .privacy-note,
.demo-mode #uploadPanel,
.demo-mode #peoplePanel { display: none; }

.demo-mode .app-shell { padding-top: 8px; }

/* ==========================================================================
   반응형
   ========================================================================== */
@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 20px, 720px);
    padding-top: 14px;
  }

  .hero, .panel, .sub-panel { padding: 18px; }

  .intro-hero { padding: 22px 20px 18px; gap: 18px; }
  .hero-headline h1 { font-size: 26px; }

  .intro-slide {
    padding: 40px 22px clamp(90px, 14vh, 130px);
  }
  .intro-slide strong { font-size: 28px; }
  .intro-slide em { font-size: 15px; }

  /* 모바일에선 히어로 삽화를 작게, 위치 정돈 */
  .hero-art {
    width: clamp(96px, 26vw, 130px);
    top: 12px;
    right: 12px;
    opacity: 0.92;
  }
  .intro-hero { padding-right: clamp(110px, 30vw, 150px); }

  .trend-head p { font-size: 14px; }

  .intro-info, .privacy-note { grid-template-columns: 1fr; }
  .privacy-note { padding: 18px; }
  .privacy-note .trust-strip { justify-content: flex-start; }

  .drop-zone {
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 80px;
  }

  .upload-icon { width: 36px; height: 36px; font-size: 11px; }

  .parse-grid, .score-grid, .trend-bars, .signal-grid,
  .verdict-grid, .summary-grid, .chooser-grid,
  .radar-panel, .radar-layout, .stat-review,
  .compact-stats #statsGrid {
    grid-template-columns: 1fr;
  }

  .final-card-head { flex-direction: column; }
  .final-card-head strong b { font-size: 46px; }
  .result-head { align-items: stretch; flex-direction: column; }
  .trend-head { flex-direction: column; }
  .trend-chart svg { height: 180px; }
}

@media (prefers-reduced-motion: reduce) {
  .message-marquee div { animation: none; }
  .intro-bg .blob { animation: none; }
  .intro-slide { transition: opacity 0.3s linear; }
  .intro-slide.is-active .intro-art { animation: none; }
  .hero-art { animation: none; }
  body.is-ready .app-shell { animation: none; }
}

/* ==========================================================================
   피드백 패널 (Google Forms 임베드)
   ========================================================================== */
.feedback-panel {
  background:
    linear-gradient(180deg, rgba(255, 229, 237, 0.55), rgba(229, 244, 255, 0.35)),
    var(--surface);
  border: 1px solid var(--line-strong);
}

.feedback-panel .feedback-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}

.feedback-panel .feedback-head h3 {
  margin: 4px 0 6px;
  font-size: 22px;
  color: var(--ink);
}

.feedback-panel .feedback-head .helper-text {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.feedback-context {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  min-width: 160px;
}

.feedback-context span {
  display: grid;
  grid-template-columns: 60px 1fr;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
}

.feedback-context i {
  color: var(--muted);
  font-style: normal;
}

.feedback-context strong {
  color: var(--pink-deep);
  font-weight: 700;
  font-size: 13px;
  word-break: break-all;
}

.feedback-iframe {
  width: 100%;
  min-height: 1200px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.feedback-iframe.hidden { display: none; }

.feedback-fallback {
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: var(--gold-soft);
  color: var(--ink);
  border: 1px dashed var(--gold);
  line-height: 1.55;
}

.feedback-fallback strong { display: block; margin-bottom: 4px; color: var(--gold); }
.feedback-fallback code {
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.9em;
}

@media (max-width: 720px) {
  .feedback-panel .feedback-head {
    grid-template-columns: 1fr;
  }
  .feedback-iframe { min-height: 1500px; }
}

