/* 시크릿노트 17차 AI 도구 — 공통 스타일
 * 따뜻한 크림 라이트 브랜드 표준 (#ECE7DD + #FF5933 + Pretendard)
 * 회사 디자인 가이드 정합 (wiki/content/디자인_스타일_가이드.md)
 */

:root {
  /* 배경 위계: 페이지(크림 베이지) → 카드(흰/크림) */
  --bg: #ECE7DD;          /* 페이지 가장 바깥 — 브랜드 크림(전 페이지 통일, 2026-06-11) */
  --panel: #FFFFFF;       /* 1차 카드 — 흰색 */
  --panel2: #FAF7F2;      /* 입력/보조 면 — 크림 */
  --panel3: #F2EDE4;      /* 3차 보조 면 — 옅은 크림 */
  --border: #E8E2D5;      /* 따뜻한 라인 */
  --border-bright: #D8CEBC; /* 강조 라인(hover) */
  --accent: #FF5933;      /* 시그니처 주황 — 유지 */
  --accent-soft: rgba(255, 89, 51, 0.10);
  --accent-glow: rgba(255, 89, 51, 0.18);
  --text: #1A1A1A;        /* 본문 잉크 */
  --text-dim: #6B5A4E;    /* 보조 텍스트(따뜻한 갈색 회색) */
  --text-mute: #766A5C;   /* 약한 텍스트 (AA 통과 위해 따뜻한 톤 유지하며 약간 진하게) */
  --success: #1E8E4A;
  --warning: #B68A2E;     /* 골드 톤 경고(따뜻하게) */
  --danger: #D63B1A;      /* 진한 주황 톤 위험 */
  --info: #B68A2E;        /* 시크릿 골드 악센트 톤 */
  /* 추가 토큰 (값-치환 전용, 새 선택자 아님) */
  --accent-warm: #FF8A3D;
  --accent-deep: #D63B1A;
  --accent-bg: #FFEDE5;   /* 아주 옅은 주황 배경 */
  --gold: #B68A2E;
  --gold-text: #8A6519;
  --gold-bg: #FBF3DD;
  --surface: #FAF7F2;     /* 페르소나 v2 기존 var(--surface) 기본값과 일치 */
  --surface-dark: #F2EDE4;
  --shadow-card: 0 8px 28px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 12px 34px rgba(0, 0, 0, 0.09);
  --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.20);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Pretendard', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  min-height: 100vh;
  padding-bottom: 80px;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

/* ========== Header ========== */
header.app-header {
  padding: 32px 40px 24px;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
header.app-header .brand {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--text-dim);
}
header.app-header .brand .logo {
  display: inline-block;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: url(/assets/logo.png) center/cover no-repeat var(--accent);
  font-size: 0; /* "은" 자리표시 글자 숨김 — 얼굴 로고로 통일 */
}
header.app-header .tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}
header.app-header h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
header.app-header .sub {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 760px;
}
header.app-header a.back {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-mute);
}
header.app-header a.back:hover { color: var(--accent); }

/* ========== Container ========== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 40px;
}

/* ========== Section / Card ========== */
.section {
  margin-bottom: 32px;
}
.section h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text);
}
.section .desc {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 16px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  transition: all 0.15s;
}
.card:hover {
  border-color: var(--border-bright);
  box-shadow: var(--shadow-card-hover);
}

/* ========== Tool Cards (메인 페이지) ========== */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.tool-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
}
.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(255, 89, 51, 0.16);
}
.tool-card .day-num {
  display: inline-block;
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.tool-card .icon {
  font-size: 36px;
  margin-bottom: 12px;
  display: block;
}
.tool-card h3 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.3;
}
.tool-card p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}
.tool-card .arrow {
  margin-top: 14px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
}

/* ========== Form ========== */
.form-group {
  margin-bottom: 22px;
}
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.form-group label .req {
  color: var(--accent);
  margin-left: 4px;
}
.form-group label .opt {
  color: var(--text-mute);
  font-weight: 500;
  font-size: 12px;
  margin-left: 6px;
}
.form-group .help {
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 6px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group textarea {
  min-height: 80px;
  resize: vertical;
}
.form-group textarea.tall { min-height: 200px; }
.form-group textarea.xl { min-height: 320px; }

/* 2단 그리드 */
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 700px) {
  .row { grid-template-columns: 1fr; }
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-deep);
  box-shadow: 0 6px 20px rgba(255, 89, 51, 0.28);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-secondary {
  background: var(--panel3);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-block { width: 100%; }
.btn .spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== Result Area ========== */
.result-area {
  display: none;
  margin-top: 28px;
}
.result-area.active { display: block; }
.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.result-header h3 {
  font-size: 18px;
  font-weight: 800;
}
.result-header .meta {
  font-size: 12px;
  color: var(--text-mute);
}
.result-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 15px;
  line-height: 1.7;
  max-height: 600px;
  overflow-y: auto;
  color: var(--text);
  box-shadow: var(--shadow-card);
}
.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.result-actions .btn {
  font-size: 13px;
  padding: 10px 18px;
}

/* 경고 박스 */
.warn-box {
  background: var(--gold-bg);
  border: 1px solid rgba(182, 138, 46, 0.5);
  border-radius: 10px;
  padding: 14px 18px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--gold-text);
}
.error-box {
  background: #FFEDE5;
  border: 1px solid rgba(214, 59, 26, 0.5);
  border-radius: 10px;
  padding: 14px 18px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--danger);
}
.info-box {
  background: var(--accent-bg);
  border: 1px solid rgba(255, 89, 51, 0.20);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 18px;
  font-size: 14px;
  color: var(--text);
}

/* 인증 모달 */
.auth-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(26, 26, 26, 0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-modal.active { display: flex; }
.auth-modal .panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-modal);
}
.auth-modal h2 {
  font-size: 22px;
  margin-bottom: 8px;
}
.auth-modal p {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.auth-modal input {
  width: 100%;
  padding: 14px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  margin-bottom: 14px;
}
.auth-modal input:focus { outline: none; border-color: var(--accent); }

/* ========== 플레이스 URL 자동 분석 섹션 ========== */
.place-fetch {
  background: linear-gradient(135deg, #FFEDE5, #FAF7F2);
  border: 1px solid rgba(255, 89, 51, 0.45);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 28px;
}
.place-fetch h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-deep);
  margin-bottom: 6px;
}
.place-fetch p.desc {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 16px;
}
.place-fetch .url-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.place-fetch .url-row input {
  flex: 1;
  min-width: 280px;
  padding: 14px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
}
.place-fetch .url-row input:focus { outline: none; border-color: var(--accent); }
.place-fetch .url-row button {
  padding: 14px 24px;
  white-space: nowrap;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.place-fetch .url-row button:hover:not(:disabled) {
  background: var(--accent-deep);
}
.place-fetch .url-row button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.place-fetch .meta-box {
  display: none;
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--success);
  border-radius: 10px;
}
.place-fetch .fetch-error {
  display: none;
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid var(--danger);
  border-radius: 8px;
  color: var(--danger);
  font-size: 14px;
}
.place-fetch .help-text {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-mute);
  line-height: 1.6;
}

/* 자동 채워진 폼 필드 강조 */
.form-group input.auto-filled,
.form-group textarea.auto-filled,
.form-group select.auto-filled {
  border-color: var(--accent);
  background: rgba(255, 89, 51, 0.04);
}

/* 필드 라벨에 자동/수동 표시 */
.form-group label .badge-auto {
  display: inline-block;
  padding: 2px 8px;
  margin-left: 6px;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.form-group label .badge-manual {
  display: inline-block;
  padding: 2px 8px;
  margin-left: 6px;
  background: var(--panel3);
  color: var(--text-dim);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* 단계 표시 */
.steps {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}
.steps .step {
  flex: 1;
  height: 4px;
  background: var(--panel3);
  border-radius: 2px;
  position: relative;
}
.steps .step.done { background: var(--accent); }
.steps .step.current {
  background: linear-gradient(90deg, var(--accent), var(--panel3));
}

/* Footer */
footer.app-footer {
  text-align: center;
  padding: 40px 20px 0;
  color: var(--text-mute);
  font-size: 12px;
}
footer.app-footer a { color: var(--text-dim); }
footer.app-footer a:hover { color: var(--accent); }

/* ========== 페르소나 v2 — 카드 5장 ========== */

.progress-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px 20px;
  background: var(--surface, #FAF7F2);
  border: 1px solid var(--border, #E8E2D5);
  border-radius: 12px;
  margin: 24px 0;
}

.spinner-lg {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border, #E8E2D5);
  border-top-color: var(--accent, #FF5933);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.progress-text {
  color: var(--text-dim, #6B5A4E);
  font-size: 15px;
}

.result-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.persona-card {
  background: var(--surface, #FAF7F2);
  border: 1px solid var(--border, #E8E2D5);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.persona-card.persona-main {
  border-color: var(--accent, #FF5933);
  background: linear-gradient(135deg, rgba(255, 89, 51, 0.08), #FFFFFF);
}

.cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 720px) {
  .cards-row { grid-template-columns: 1fr; }
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.card-header h3, .card-header h4 {
  margin: 0;
  font-size: 16px;
  color: var(--text, #1A1A1A);
}

.card-header h3 { font-size: 18px; }

.confidence {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.stars {
  color: var(--accent, #FF5933);
  font-size: 16px;
  letter-spacing: 1px;
}

.stars-empty {
  color: var(--text-mute, #766A5C);
  font-size: 13px;
  font-style: italic;
}

.confidence-reason {
  color: var(--text-mute, #766A5C);
  font-size: 12px;
}

.persona-headline {
  font-size: 20px;
  font-weight: 700;
  color: var(--text, #1A1A1A);
  line-height: 1.5;
  padding: 8px 0;
}

.evidence-line {
  color: var(--text-dim, #6B5A4E);
  font-size: 13px;
  line-height: 1.6;
  padding: 4px 0;
}

.card-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-list li {
  padding: 8px 12px;
  background: var(--surface-dark, #F2EDE4);
  border-radius: 6px;
  color: var(--text, #1A1A1A);
  font-size: 14px;
}

.card-list li a {
  color: var(--accent, #FF5933);
  text-decoration: none;
}

.card-list li a:hover {
  text-decoration: underline;
}

.next-step-list li {
  cursor: default;
}

.ratio-pct {
  float: right;
  color: var(--accent, #FF5933);
  font-weight: 600;
}

.evidence-toggle {
  border-top: 1px dashed var(--border, #E8E2D5);
  padding-top: 8px;
  margin-top: 4px;
}

.evidence-toggle summary {
  cursor: pointer;
  color: var(--text-mute, #766A5C);
  font-size: 12px;
  padding: 4px 0;
}

.evidence-toggle summary:hover {
  color: var(--accent, #FF5933);
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.btn-sm {
  padding: 9px 16px;
  font-size: 13px;
  border-radius: 8px;
  min-height: 40px;   /* 모바일 터치 영역 확보(기존 ~30px → 40px) 2026-06-12 */
}

.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 16px 0;
}

.upgrade-banner {
  background: var(--gold-bg, #FBF3DD);
  border: 1px dashed rgba(182, 138, 46, 0.55);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.upgrade-text {
  flex: 1;
  min-width: 240px;
  color: var(--text-dim, #6B5A4E);
  font-size: 13px;
  line-height: 1.6;
}

.upgrade-text b {
  color: var(--gold-text, #8A6519);
}

.upgrade-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface, #FAF7F2);
  border: 1px solid var(--border, #E8E2D5);
  border-radius: 8px;
  color: var(--text-dim, #6B5A4E);
  font-size: 13px;
}

/* 후보 모드 */
.candidate-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.candidate-header {
  color: var(--text-dim, #6B5A4E);
  font-size: 13px;
  padding: 8px 0;
}

.candidate-item {
  background: var(--surface-dark, #F2EDE4);
  border: 1px solid var(--border, #E8E2D5);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.candidate-headline {
  color: var(--text, #1A1A1A);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.candidate-pick {
  align-self: flex-start;
  padding: 6px 12px;
  font-size: 12px;
}

/* ========== 페르소나 v2 — URL 입력 단독 스타일 ========== */
/* (.place-fetch 부모 없는 새 v2 화면용) */

#input-section .url-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}

#input-section .url-row input {
  flex: 1;
  min-width: 320px;
  padding: 14px 16px;
  background: var(--panel2, #FAF7F2);
  border: 1px solid var(--border, #E8E2D5);
  border-radius: 8px;
  color: var(--text, #1A1A1A);
  font-family: inherit;
  font-size: 15px;
}

#input-section .url-row input:focus {
  outline: none;
  border-color: var(--accent, #FF5933);
}

#input-section .url-row button {
  padding: 14px 24px;
  white-space: nowrap;
}

/* ========== 페르소나 v2 — 진행 그래프 (4단 막대) ========== */

.progress-graph {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: var(--surface, #FAF7F2);
  border-radius: 12px;
  margin: 24px 0;
  border: 1px solid var(--border, #E8E2D5);
}

.progress-step {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--surface-dark, #F2EDE4);
  border: 1px solid transparent;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-step.pending {
  opacity: 0.4;
  transform: scale(0.98);
}

.progress-step.active {
  opacity: 1;
  transform: scale(1.02);
  border-color: var(--accent, #FF5933);
  box-shadow: 0 4px 24px rgba(255, 89, 51, 0.15);
}

.progress-step.complete {
  opacity: 0.85;
}

.step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text, #1A1A1A);
  font-weight: 600;
}

.step-icon {
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255, 89, 51, 0.1);
  border-radius: 50%;
}

.progress-step.active .step-icon {
  animation: icon-bounce 0.8s ease-in-out infinite;
}

.progress-step.complete .step-icon {
  background: rgba(30, 142, 74, 0.14);
}

@keyframes icon-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.step-label {
  flex: 1;
}

.step-status {
  font-size: 18px;
  font-weight: 700;
  color: var(--success);
  min-width: 20px;
  text-align: right;
  animation: pop-in 0.3s ease-out;
}

@keyframes pop-in {
  0% { transform: scale(0); }
  60% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.step-stars {
  letter-spacing: 4px;
  color: var(--text-mute, #C9BCA9);
  font-size: 16px;
  min-width: 100px;
  text-align: right;
}

.step-stars .star-lit {
  color: var(--accent, #FF5933);
  text-shadow: 0 0 8px rgba(255, 89, 51, 0.6);
  animation: star-glow 1.5s ease-in-out infinite;
}

@keyframes star-glow {
  0%, 100% { text-shadow: 0 0 8px rgba(255, 89, 51, 0.6); }
  50% { text-shadow: 0 0 16px rgba(255, 89, 51, 1), 0 0 24px rgba(255, 89, 51, 0.5); }
}

.step-bar {
  width: 100%;
  height: 10px;
  background: rgba(26, 26, 26, 0.07);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.step-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #FF5933, #ff9966, #FF5933);
  background-size: 200% 100%;
  border-radius: 6px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.progress-step.active .step-bar-fill {
  animation: shimmer 2s linear infinite, pulse-glow 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 50%; }
  100% { background-position: -200% 50%; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 89, 51, 0.4); }
  50% { box-shadow: 0 0 16px rgba(255, 89, 51, 0.8); }
}

.progress-step.active .step-bar-fill::after {
  content: '';
  position: absolute;
  right: -4px;
  top: -2px;
  bottom: -2px;
  width: 8px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  filter: blur(4px);
  animation: head-pulse 1s ease-in-out infinite;
}

@keyframes head-pulse {
  0%, 100% { opacity: 0.4; transform: scaleY(0.7); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

.progress-step.complete .step-bar-fill {
  background: linear-gradient(90deg, #34A35E, #1E8E4A);
  animation: none;
}
.progress-step.complete .step-bar-fill::after { display: none; }

/* ========== 2026-05-26 페르소나 3명 + 분석 결과 5섹션 (라이트·멤버십 공유) ========== */
.personas-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin-top: 8px;
}
@media (min-width: 720px) {
  .personas-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
.persona-rank-card {
  background: var(--panel3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  position: relative;
  transition: border-color 0.2s;
}
.persona-rank-card.rank-1 {
  background: linear-gradient(180deg, rgba(255, 89, 51, 0.10) 0%, #FFFFFF 100%);
  border: 1px solid var(--accent);
}
.persona-rank-card .rank-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  width: 24px; height: 24px;
  border-radius: 50%;
  text-align: center;
  line-height: 24px;
  font-size: 12px;
  font-weight: 800;
  margin-right: 8px;
  vertical-align: middle;
}
.persona-rank-card.rank-2 .rank-badge,
.persona-rank-card.rank-3 .rank-badge {
  background: var(--gold-text);
}
.persona-rank-card .share-badge {
  display: inline-block;
  background: var(--gold-bg);
  color: var(--gold-text);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
  vertical-align: middle;
}
.persona-rank-card .rank-headline {
  font-size: 15px;
  color: var(--text);
  font-weight: 700;
  line-height: 1.5;
  margin-top: 10px;
}
.persona-rank-card.rank-1 .rank-headline { font-size: 16px; }
.persona-rank-card .rank-evidence {
  color: var(--text-mute);
  font-size: 12px;
  margin-top: 6px;
  line-height: 1.5;
}

.analysis-header {
  text-align: center;
  margin: 32px 0 16px;
  padding: 16px 20px;
  background: var(--accent-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.analysis-header h3 {
  color: var(--accent-deep);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}
.analysis-header p {
  color: var(--text-mute);
  font-size: 13px;
}
.analysis-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .analysis-grid { grid-template-columns: 1fr 1fr; }
  .analysis-grid .persona-card-full { grid-column: 1 / -1; }
}

/* ───── 점진 공개(progressive disclosure) — URL 주인공 + 자동필드 접기 (2026-06-11 UX개선) ───── */
/* place-fetch를 페이지 진입 주인공으로 강조 */
.place-fetch.hero-fetch {
  border-width: 2px;
  border-color: var(--accent);
  background: linear-gradient(180deg, #FFF6F3, var(--panel));
}
.place-fetch.hero-fetch h3 { font-size: 19px; }
/* 자동으로 채워지는 매장 정보 — 접힌 카드 */
details.auto-details {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 20px;
  margin: 16px 0;
}
details.auto-details > summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-mute);
  display: flex;
  align-items: center;
  gap: 8px;
}
details.auto-details > summary::-webkit-details-marker { display: none; }
details.auto-details > summary::before {
  content: '▸';
  color: var(--accent);
  font-size: 13px;
  transition: transform .15s;
}
details.auto-details[open] > summary::before { transform: rotate(90deg); }
details.auto-details > summary::after {
  content: '자동으로 채워져요';
  margin-left: auto;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-deep, #D63B1A);
  background: var(--accent-bg, #FFEDE5);
  border-radius: 6px;
  padding: 2px 8px;
}
details.auto-details > *:last-child { padding-bottom: 18px; }

/* ───── 도구 그룹화(4묶음) — 허브/도구함 공용 (2026-06-12) ───── */
.tool-group { margin-top: 30px; }
.tool-group:first-of-type { margin-top: 8px; }
.tool-group > .tool-grid { margin-top: 0; }
.tool-group .ghead { display: flex; align-items: center; gap: 11px; margin: 0 2px 14px; }
.tool-group .gnum { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 9px; background: var(--accent); color: #fff; font-weight: 900; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.tool-group .gt { font-size: 17px; font-weight: 800; color: var(--text); }
.tool-group .gdesc { font-size: 12.5px; color: var(--text-mute); font-weight: 600; }
