/* style.css — We Are Single Parents
   따뜻한 브런치 감성: 크림 배경 + 테라코타 포인트. 모바일 퍼스트, 여백 중시.
   통통 튀는 애니메이션 금지 — 전환은 opacity/transform 미세 조정 + ease 곡선만 사용. */

:root {
  --cream: #faf3e8;
  --cream-2: #f2e6d5;
  --card: #fffdf9;
  --terracotta: #c1694a;
  --terracotta-dark: #a04f34;
  --terracotta-tint: #f1ded4;
  --ink: #3a2e28;
  --ink-soft: #7a6a5d;
  --ink-faint: #a3948a;
  --sage: #8a9a7e;
  --sage-dark: #6d7d61;
  --sage-tint: #e9eee2;
  --border: #e6d7c4;
  /* v1.6 퀴즈 색 밴드 (QUIZ_SPEC_v2) — 앰버(1부 "상대") / 틸(2부 "나") / 그레이(일정) */
  --amber: var(--terracotta);
  --amber-dark: var(--terracotta-dark);
  --amber-tint: var(--terracotta-tint);
  --teal: #2f8f86;
  --teal-dark: #226e67;
  --teal-tint: #dcefec;
  --gray-accent: #6b6459;
  --gray-accent-dark: #4d473d;
  --gray-accent-tint: #e8e3d9;
  /* 기본은 앰버 (1부 "상대"), .phase-you 에서 틸로, .phase-schedule 에서 그레이로 전환 */
  --accent: var(--amber);
  --accent-dark: var(--amber-dark);
  --accent-tint: var(--amber-tint);
  --error: #b1462f;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 6px 24px rgba(58, 46, 40, 0.08);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 480px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --cream: #221c17;
    --cream-2: #2b241d;
    --card: #2c241d;
    --terracotta: #e08862;
    --terracotta-dark: #f0a684;
    --terracotta-tint: #3c2d26;
    --ink: #f3e9dd;
    --ink-soft: #c9b8a8;
    --ink-faint: #8f7d6e;
    --sage: #a3b596;
    --sage-dark: #b8c9aa;
    --sage-tint: #333b2c;
    --border: #443830;
    --shadow-card: 0 6px 24px rgba(0, 0, 0, 0.35);
    --amber: #e08862;
    --amber-dark: #f0a684;
    --amber-tint: #3c2d26;
    --teal: #5cbab0;
    --teal-dark: #85cec6;
    --teal-tint: #203330;
    --gray-accent: #b6ada0;
    --gray-accent-dark: #d3cabb;
    --gray-accent-tint: #35322b;
  }
}

* {
  box-sizing: border-box;
}

/* 터치 탭 시 검정 기본 outline 이 남는 버그 방지 — 마우스/터치 포커스는 outline 제거,
   키보드 포커스(:focus-visible)만 커스텀 링 표시 (접근성 유지) */
button:focus,
a:focus,
input:focus,
select:focus {
  outline: none;
}
button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1,
h2,
h3 {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.4em;
  color: var(--ink);
}

h1 {
  font-size: 1.9rem;
}
h2 {
  font-size: 1.4rem;
}
h3 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 1em;
  color: var(--ink-soft);
}

a {
  color: var(--terracotta-dark);
}

/* 스크롤바 숨김(모바일 세련되게) — 스크롤 기능은 유지, 바만 감춘다(창업자 지시). */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { width: 0; height: 0; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px 40px;
}

/* ---------- Header / footer ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}

/* ---------- Account menu (header, 로그인 상태 표시 — header.js 가 채운다) ---------- */

.account-slot {
  flex: none;
  display: flex;
  align-items: center;
  /* .site-header 가 justify-content:space-between 이라 이 슬롯이 자동으로 오른쪽 정렬된다. */
}

.account-signin-link {
  color: var(--terracotta-dark);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 4px;
}
.account-signin-link:hover {
  text-decoration: underline;
}

.account-menu-wrap {
  position: relative;
}

.account-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
}
.account-toggle:hover {
  border-color: var(--border);
}

.account-avatar {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--terracotta-tint);
  color: var(--terracotta-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.account-email {
  font-size: 0.85rem;
  color: var(--ink-soft);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 좁은 화면에선 이메일 텍스트를 숨기고 아바타만 남긴다 (사용자 규칙 — 390px 가로 스크롤 금지). */
@media (max-width: 480px) {
  .account-email {
    display: none;
  }
  /* 아바타만 남을 때 toggle 패딩을 대칭으로 — 안 그러면 탭 시 나타나는 테두리 링이
     아바타 원과 동심이 아니라 오른쪽으로 치우쳐 보이는 버그(비대칭 padding 4/8). */
  .account-toggle {
    padding: 3px;
    gap: 0;
  }
}
/* 포커스/활성 링도 아바타 원에 딱 맞게(동심원) — 브라우저 기본 사각 아웃라인 제거. */
.account-toggle:focus { outline: none; }
.account-toggle:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 40;
}

.account-menu.open {
  display: flex;
}

.account-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
}
.account-menu-item:hover {
  background: var(--cream-2);
}

.account-logout-btn {
  color: var(--error);
}

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px 40px;
  color: var(--ink-faint);
  font-size: 0.78rem;
  display: flex;
  flex-wrap: wrap; /* 홈 footer 는 4칸(카피/링크/Contact 이메일/버전) — 좁은 화면에서 안 접히면
                       각 span 내부 텍스트("Legal & privacy" 등)가 통째로 찌그러져 줄바꿈됨 */
  justify-content: space-between;
  gap: 8px 12px;
  border-top: 1px solid var(--border);
}

.site-footer a {
  color: var(--ink-faint);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 20px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background-color 0.15s var(--ease), opacity 0.15s var(--ease);
  text-decoration: none;
  font-family: inherit;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--terracotta);
  color: #fffaf4;
}
.btn-primary:hover {
  background: var(--terracotta-dark);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--terracotta);
  color: var(--terracotta-dark);
}

.btn-text {
  width: auto;
  padding: 8px 4px;
  background: transparent;
  border: none; /* button 기본 테두리 리셋 — 검정 박스 버그 원인 */
  cursor: pointer;
  font-family: inherit;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: underline;
}

/* ---------- Cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--terracotta-tint);
  color: var(--terracotta-dark);
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-sage {
  background: color-mix(in srgb, var(--sage) 22%, transparent);
  color: var(--sage);
}

.badge-teal {
  background: color-mix(in srgb, var(--teal) 22%, transparent);
  color: var(--teal-dark);
}

/* ---------- 결과 듀오 카드 (상대 스케치 + 나 요약) ---------- */
.result-duo {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  text-align: left;
}

.result-duo-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: var(--card);
}

.result-duo-card p {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  color: var(--ink);
  margin: 10px 0 0;
  font-size: 0.95rem;
}

/* ---------- Landing ---------- */

.hero {
  text-align: center;
  padding: 12px 0 8px;
}
/* 그룹핑: 배지=헤드라인의 라벨(가깝게), 헤드라인=메시지(타이트한 leading), CTA는 헤드라인에서 살짝 띄움. */
.hero .badge {
  margin-bottom: 16px;
}
.hero h1 {
  margin: 0 0 24px;
  line-height: 1.18;
}

.hero p.sub {
  font-size: 1.02rem;
}

.hero-sub {
  margin: 10px auto 0;
  max-width: 30ch;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.45;
}

/* 히어로 아래 창업자 스토리 서브 링크 (신뢰 장치) */
.hero-about {
  margin: 24px 0 0;
  font-size: 0.92rem;
}
.hero-about a {
  color: var(--terracotta-dark);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--terracotta-dark) 35%, transparent);
  padding-bottom: 1px;
}
.hero-about a:hover {
  border-bottom-color: var(--terracotta-dark);
}

/* About 페이지 서명 */
.about-signoff {
  margin-top: 18px;
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  color: var(--ink);
}

.steps {
  display: grid;
  gap: 14px;
  margin: 28px 0;
}

.step-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.step-num {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--terracotta-tint);
  color: var(--terracotta-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.step-item {
  align-items: center;
}
.step-item h3 {
  margin: 0;
  font-size: 1rem;
}
.step-item p {
  margin: 0;
  font-size: 0.92rem;
}

.price-teaser {
  text-align: center;
  margin: 30px 0 6px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* ---------- Progress bar ---------- */

.progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--cream-2);
  overflow: hidden;
  margin-bottom: 26px;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.35s var(--ease), background-color 0.3s var(--ease);
}

/* ---------- v1.6 phase frame (앰버 상대 → 틸 나 → 그레이 일정) ---------- */

/* 2부 진입 시 액센트만 틸로 전환 — 전면 리스킨 금지, 컬러/라벨 수준 */
#question-view.phase-you {
  --accent: var(--teal);
  --accent-dark: var(--teal-dark);
  --accent-tint: var(--teal-tint);
}
#question-view.phase-you .btn-primary {
  background: var(--teal);
}
#question-view.phase-you .btn-primary:hover:not(:disabled) {
  background: var(--teal-dark);
}

/* 일정 화면(그레이) — 지역/주말주기/시간대 */
#question-view.phase-schedule {
  --accent: var(--gray-accent);
  --accent-dark: var(--gray-accent-dark);
  --accent-tint: var(--gray-accent-tint);
}
#question-view.phase-schedule .btn-primary {
  background: var(--gray-accent);
  color: #fffaf4;
}
#question-view.phase-schedule .btn-primary:hover:not(:disabled) {
  background: var(--gray-accent-dark);
}

.phase-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* 누적 스케치 라인 — 1부 답이 쌓일 때마다 상대 묘사가 자란다 */
.sketch-line {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--accent-dark);
  margin: 0 0 14px;
  line-height: 1.5;
}

.step-count {
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ---------- Quiz choices ---------- */

.choice-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 10px;
}

.choice-btn {
  text-align: left;
  width: 100%;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.choice-btn:hover {
  border-color: var(--accent);
}

.choice-btn.selected {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--accent-dark);
  font-weight: 600;
}

/* 자유 입력 (wish line) */
.free-text-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
}
.free-text-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* 복합 스텝 (About you basics) — 필드별 칩 그룹 */
.compound-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 6px 0 -2px;
}
.compound-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.compound-chip {
  width: auto;
  padding: 10px 14px;
  font-size: 0.88rem;
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
}

/* ---------- Calculating / result ---------- */

.calc-wrap {
  text-align: center;
  padding: 60px 0;
}

.calc-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 22px;
  border-radius: 50%;
  border: 3px solid var(--cream-2);
  border-top-color: var(--terracotta);
  animation: spin 1s linear infinite;
}

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

.calc-line {
  color: var(--ink-soft);
  font-size: 0.95rem;
  min-height: 1.4em;
}

.result-card {
  text-align: center;
}

.result-type {
  font-size: 1.6rem;
  margin: 6px 0 10px;
}

.result-desc {
  font-size: 0.95rem;
}

.email-gate {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

/* ---------- Forms ---------- */

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
}

.field input:focus {
  outline: none;
  border-color: var(--terracotta);
}

.otp-input {
  letter-spacing: 0.4em;
  text-align: center;
  font-size: 1.3rem !important;
  font-weight: 700;
}

.hint {
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-top: 6px;
}

.error-msg {
  color: var(--error);
  font-size: 0.85rem;
  margin: 10px 0 0;
  display: none;
}

.error-msg.show {
  display: block;
}

/* ---------- Dashboard ---------- */

.dash-section {
  margin-bottom: 22px;
}

.dash-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.dash-row:last-child {
  border-bottom: none;
}

.slot-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.slot-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--ink);
  font-size: 0.95rem;
  cursor: pointer;
}

.slot-btn.selected {
  border-color: var(--terracotta);
  background: var(--terracotta-tint);
}

/* 다가오는 모임 행 — 정보 + RSVP 버튼 */
.meetup-row {
  /* 세로 스택: 날짜·좌석 정보 위, 버튼은 그 아래 full-width — 가로배치 시 긴 날짜가 4줄로 접히고
     버튼이 찌그러지던 문제 해결. */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
}

.meetup-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.meetup-seats {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 2px;
}

.meetup-rsvp-btn {
  width: 100%;
  padding: 13px 16px;
  font-size: 0.95rem;
  flex: none;
}

.selfie-box {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin: 14px 0;
}

/* 어드민 수동 배정 도구 */
.alloc-picker { margin-bottom: 16px; }
.alloc-picker select, .alloc-pool select, .alloc-table select { max-width: 100%; }
.alloc-summary { margin: 10px 0; }
.alloc-cols { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 14px; }
@media (min-width: 720px) { .alloc-cols { grid-template-columns: 260px 1fr; align-items: start; } }
.alloc-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.alloc-table { padding: 12px; }
.alloc-table-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.alloc-table select { width: 100%; margin-bottom: 8px; }
.alloc-member { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 0; font-size: 0.88rem; border-bottom: 1px solid var(--border); }
.alloc-member:last-child { border-bottom: none; }
.alloc-member select { flex: none; max-width: 130px; }
.alloc-pool .alloc-member { flex-wrap: wrap; }

/* 결제 후 프로필 확인·수정 (칩) */
.pc-field { margin: 12px 0; }
.pc-field .compound-label { margin-bottom: 6px; }
.pc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-chip {
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.pc-chip.selected {
  background: var(--terracotta, #c1694a);
  border-color: var(--terracotta, #c1694a);
  color: #fff;
  font-weight: 600;
}

/* 결제 후 셀피 스텝 카드 */
.selfie-card .selfie-why {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 6px 0 14px;
}
.selfie-preview {
  margin: 0 0 14px;
  text-align: center;
}
.selfie-preview img {
  max-width: 200px;
  width: 60%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.selfie-card .hint {
  margin-top: 12px;
}

.progress-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ---------- Profile display (v1.32, /me 마이페이지) ----------
   진입 즉시 프로필 전체가 보이고, 빈칸은 그 자리 칩 탭으로 채운다(별도 설문 화면 없음). */

.profile-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.profile-head h2 {
  margin: 0;
}
.profile-completeness {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--terracotta-dark);
  white-space: nowrap;
  margin: 0;
}

.profile-group {
  border-top: 1px solid var(--border);
  padding: 14px 0;
}
.profile-group:first-child {
  border-top: none;
  padding-top: 8px;
}

.profile-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.profile-group-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.profile-group-frac {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-faint);
}

.profile-row {
  border-top: 1px solid var(--cream-2);
}
.profile-row:first-child {
  border-top: none;
}

.profile-row-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 0;
  background: transparent;
  border: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.profile-row-label {
  flex: none;
  font-size: 0.86rem;
  color: var(--ink-soft);
  max-width: 42%;
}
.profile-row-empty .profile-row-label {
  color: var(--terracotta-dark);
}

.profile-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  flex: 1;
}

.profile-chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--cream-2);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink);
}

.profile-chip-add {
  background: transparent;
  border: 1.5px dashed var(--terracotta);
  color: var(--terracotta-dark);
  font-weight: 600;
}

.profile-edit-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 14px;
}

.profile-edit-chip {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.profile-edit-chip:hover {
  border-color: var(--terracotta);
}
.profile-edit-chip.selected {
  border-color: var(--terracotta);
  background: var(--terracotta-tint);
  color: var(--terracotta-dark);
  font-weight: 600;
}
.profile-edit-chip:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ---------- Legal ---------- */

.legal-section {
  margin-bottom: 26px;
}

.legal-section h2 {
  font-size: 1.05rem;
}

.legal-notice-bold {
  font-size: 10pt;
  font-weight: 700;
  color: var(--ink);
  border: 1.5px solid var(--terracotta);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  background: var(--terracotta-tint);
}

/* ---------- Chat (당일 그룹 채팅 / 1:1) ---------- */

.chat-box {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden; /* 좌우 스크롤 원천 차단 */
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: transparent;
}

/* 표준 메신저 말풍선 — 상대(왼쪽, 아바타 O) / 나(오른쪽, 아바타 X). You/Them 라벨 없음. */
.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  max-width: 85%;
}
.chat-row.group-start { margin-top: 12px; }
.chat-row.group-start:first-child { margin-top: 0; }
.chat-row.in { align-self: flex-start; }
.chat-row.out { align-self: flex-end; flex-direction: row-reverse; }

.bubble-avatar {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--cream-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  user-select: none;
  overflow: hidden;
}
.bubble-avatar-hidden { visibility: hidden; }

.bubble {
  padding: 8px 12px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--ink);
  word-break: break-word;
}
.chat-row.in .bubble {
  background: var(--cream-2);
}
.chat-row.in .bubble.bubble-first {
  border-bottom-left-radius: 5px;
}
.chat-row.out .bubble {
  background: var(--terracotta-tint);
  color: var(--terracotta-dark);
}
.chat-row.out .bubble.bubble-first {
  border-bottom-right-radius: 5px;
}
.bubble-text { white-space: pre-wrap; }
.bubble-time {
  display: block;
  font-size: 0.66rem;
  opacity: 0.5;
  margin-top: 3px;
  text-align: right;
}
.bubble-warn {
  font-size: 0.68rem;
  color: #b23b3b;
  margin-top: 4px;
}

/* 안전 안내 — 흰 카드 대신 은은한 베이지 인라인 바(예전 인라인 스타일을 클래스로 이동). */
.chat-safety {
  background: #f6edd8;
  color: #b07d1e;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 0.82rem;
  line-height: 1.45;
  margin: 0 0 10px;
}

/* ============================================================
   채팅 페이지 — 표준 메신저 레이아웃(베스트 프랙티스)
   · 화면을 꽉 채워 고정, 메시지 영역만 스크롤(전체 페이지 스크롤 금지)
   · 단일 상단 바(뒤로 + 이름 + ⋯), 브랜드/푸터 헤더는 숨김
   · 데스크톱은 가운데 정렬된 넉넉한 패널(480px 너무 좁음 → 720px), 모바일은 꽉 채움
   · 좌우 스크롤 원천 차단(overflow-x hidden)
   ============================================================ */
.chat-page {
  /* 화면(레이아웃 뷰포트)에 fixed 로 고정하고, JS(visualViewport)가 '실제 보이는 영역'에 정확히 맞춰
     높이/오프셋을 실측 세팅한다(match-chat.js fitAppHeight). 그래야 브라우저 하단 바·키보드·시스템
     네비바가 올라와도 입력창이 항상 그 위로 보인다. JS 없거나 미지원이면 dvh 폴백. */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  /* ★ 전역 body{min-height:100vh} 를 반드시 무효화한다. 안 하면 min-height(=큰 뷰포트 100vh)가
     height/dvh(작은 실제 보이는 영역)를 덮어써서 body 가 보이는 영역보다 커지고, 하단 입력창이 그
     차이(브라우저 하단 툴바/시스템 네비바 높이)만큼 화면 밖(아래)으로 밀려 가려진다. 실기기 진단으로
     확인된 이 버그의 진짜 원인. min-height:0 으로 height 가 실제 보이는 영역을 그대로 따르게 한다. */
  min-height: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--cream);
}
.chat-page .site-header,
.chat-page .site-footer { display: none; } /* 채팅 화면엔 브랜드 헤더·카피라이트 푸터 숨김(이중 헤더 제거) */

.chat-shell {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
@media (max-width: 720px) {
  .chat-shell { border-left: none; border-right: none; }
}
#chat-view {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* 상단 바 */
.chat-topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.chat-back {
  flex: 0 0 auto;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  padding: 0 6px 2px 2px;
}
.chat-back:hover { color: var(--terracotta); }
.chat-title-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}
.chat-title-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  line-height: 1.15;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-title-sub {
  font-size: 0.7rem;
  color: var(--ink-faint);
  line-height: 1;
}

/* 입력창은 화면 하단 sticky — 390px 뷰포트에서 fold 아래로 밀리는 문제 방지.
   모바일 키보드가 올라오면 브라우저가 visual viewport 를 줄이므로 sticky bottom 이
   키보드 바로 위에 붙는다 (iOS Safari 15+/Android Chrome 기본 동작 — 실 디바이스 QA 필요). */
/* "기다리는 사람" 배너 — /me 상단, 미수락 받은요청 있을 때. 탭 시 받은요청 섹션으로 스크롤. */
.waiting-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  margin: 0 0 14px;
  padding: 13px 16px;
  border: 1.5px solid var(--terracotta);
  background: var(--terracotta-tint);
  color: var(--terracotta-dark);
  border-radius: var(--radius-md, 12px);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.waiting-banner:hover,
.waiting-banner:focus-visible {
  background: #ecccbe;
  outline: none;
}
.waiting-banner > span:last-child {
  font-size: 1.15rem;
  flex: 0 0 auto;
}

/* 아이스브레이커 — 빈 채팅에서 입력창 바로 위에 뜨는 추천 질문 칩. 입력창(.chat-input-row) 위 sibling. */
.icebreakers {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px 12px 2px;
  background: var(--card);
}
.icebreakers-label {
  flex-basis: 100%;
  font-size: 0.78rem;
  color: var(--muted, #8a7a6c);
  margin-bottom: 2px;
}
.icebreaker-chip {
  width: auto;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 0.85rem;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.icebreaker-chip:hover,
.icebreaker-chip:focus-visible {
  border-color: var(--terracotta);
  background: rgba(193, 105, 74, 0.07);
  outline: none;
}

.chat-input-row {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  /* 오버레이형 시스템 바/홈 인디케이터/키보드(env) 대비 하단 여유 — 리사이즈형은 JS 가 이미 처리하므로
     이 패딩은 오버레이형에만 실효. 셋 중 최대값을 쓴다. */
  padding: 10px 12px max(10px, env(safe-area-inset-bottom), env(keyboard-inset-height, 0px));
  border-top: 1px solid var(--border);
  background: var(--card);
}

.chat-input-row input {
  flex: 1;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
}

.chat-input-row input:focus {
  outline: none;
  border-color: var(--terracotta);
}

.chat-send-btn {
  width: auto;
  padding: 13px 20px;
}

.chat-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-menu {
  position: relative;
}

.chat-menu-btn {
  font-size: 1.5rem;
  line-height: 1;
  background: none;
  border: none;
  color: var(--ink-faint);
  cursor: pointer;
  padding: 4px 6px;
  flex: 0 0 auto;
}
.chat-menu-btn:hover { color: var(--ink); }

.chat-menu-list {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 5;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  min-width: 150px;
  overflow: hidden;
}

.chat-menu-item {
  display: block;
  width: 100%;
  padding: 11px 14px;
  background: transparent;
  border: none;
  text-align: left;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
}

.chat-menu-item:hover {
  background: var(--cream-2);
}

.chat-menu-item-danger {
  color: var(--error);
}

.chat-frozen-banner {
  background: #f6edd8;
  color: #b07d1e;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 0.82rem;
  line-height: 1.45;
  margin: 0 0 10px;
}

/* ---------- Feedback (After Coffee) ---------- */

.feedback-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.feedback-row:last-child {
  border-bottom: none;
}

.feedback-name {
  font-weight: 600;
}

.feedback-choice {
  width: auto;
  padding: 8px 12px;
  font-size: 0.82rem;
}

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

/* ---------- Admin ---------- */

.admin-tabs {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
}

.admin-tab.selected {
  color: var(--terracotta-dark);
  font-weight: 700;
}

.admin-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-row input,
.admin-row select {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.admin-log {
  background: var(--cream-2);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.75rem;
  overflow-x: auto;
  max-height: 300px;
  overflow-y: auto;
}

.mono {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.8rem;
}

/* ---------- Utility ---------- */

.center {
  text-align: center;
}
.mt-0 {
  margin-top: 0;
}
.hidden {
  display: none !important;
}
.stack {
  display: grid;
  gap: 14px;
}
.fade-in {
  animation: fadeIn 0.3s var(--ease);
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Reserve page (/reserve) ---------- */

.compo-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0 14px;
}
.compo-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--cream-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.compo-chip .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--terracotta);
  flex-shrink: 0;
}
.compo-chip .dot.dot-f {
  background: var(--sage);
}
.reserve-rows {
  margin-top: 6px;
}
.reserve-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--border);
}
.reserve-row:first-child {
  border-top: 0;
}
.reserve-row .ic {
  width: 22px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.reserve-row .rl {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}
.reserve-row .rs {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 2px;
  line-height: 1.45;
}
.price-box {
  margin: 20px 0 0;
  background: var(--cream-2);
  border: 1px dashed var(--terracotta);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.price-box .big {
  font-family: Georgia, serif;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--ink);
}
.price-box .note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-top: 5px;
}
/* v1.65: 예약 마감 카운트다운 (reserve.js 가 meetup.reserveDeadline 로 실시간 갱신). */
.reserve-countdown {
  margin: 14px 0 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-align: center;
}
.reserve-countdown .cd-time {
  font-family: Georgia, serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--terracotta);
  font-variant-numeric: tabular-nums;
}
/* 1시간 미만 = 붉게 강조해 진짜 임박임을 알린다. */
.reserve-countdown.urgent .cd-time { color: #c0392b; }
/* 마감됨 — 시간 숨기고 안내 문구만, 차분한 잉크색. */
.reserve-countdown.closed {
  color: var(--ink);
  font-weight: 600;
}
.reserve-countdown.closed .cd-time { display: none; }
/* 마감된 테이블 → 같은 연령대 다른 날로 빠져나가는 탈출 링크 (막다른 길 방지). */
.closed-escape {
  display: block;
  margin: 12px auto 0;
  text-align: center;
  font-weight: 600;
  font-size: .95rem;
  color: var(--terracotta);
  text-decoration: none;
  border: 1.5px solid var(--terracotta);
  border-radius: 10px;
  padding: 11px 20px;
  max-width: 320px;
}
.closed-escape:hover { background: var(--terracotta); color: #fff; }

/* 로그인 필요 시 인라인 삽입되는 카드 — 바로 위 price-box 는 자체 bottom margin 이 없어서
   top margin 을 안 주면 두 박스가 그대로 붙어버린다 (창업자 리포트: "박스끼리 붙어 있고"). */
#otp-step {
  margin-top: 20px;
}
.reassure {
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin: 14px 8px 0;
  line-height: 1.5;
}

/* 예약 완료 상태 (reserve.html #reserved-view) — 크고 명확한 확인 화면 */
.reserved-hero { text-align: center; padding: 24px 0 8px; }
.reserved-check {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%;
  background: #e7f0e4; color: #3f7d47; font-size: 34px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.reserved-hero h1 { margin: 0 0 8px; }

/* v1.33 — /me 프로필: 정보 부족시 '누구 찾니?' 욕구 유도 CTA (프로필 완성 프레임 금지) */
.find-cta { text-align: center; padding: 8px 4px 4px; }
.find-cta h2 { margin: 0 0 8px; }
.find-cta p { color: var(--ink-soft); margin: 0 auto 16px; max-width: 30ch; }
.find-cta .btn { width: 100%; }
.profile-edit-link { display: block; text-align: center; margin-top: 10px; font-size: 0.85rem; color: var(--ink-soft); text-decoration: none; }
.profile-row-label { color: var(--ink-soft); font-size: 0.9rem; }

/* v1.34 — 프로필 리스트 정렬/여백 정리: 라벨 위(작게·회색)·값 아래(왼쪽 정렬), 일관 여백.
   기존 .profile-row 가 flex 아님이라 라벨·칩이 붙던 문제 해결. #profile-groups 로 특이도 우선. */
#profile-groups .profile-group { border-top: 1px solid var(--border); padding: 16px 0; }
#profile-groups .profile-group:first-child { border-top: 0; padding-top: 2px; }
#profile-groups .profile-group-head { margin-bottom: 10px; }
#profile-groups .profile-row { display: block; border-top: 0; padding: 7px 0; }
#profile-groups .profile-row:first-child { padding-top: 0; }
#profile-groups .profile-row-label { display: block; max-width: none; font-size: 0.78rem; color: var(--ink-faint); margin: 0 0 6px; }
#profile-groups .profile-chips { justify-content: flex-start; flex: none; gap: 6px; }
#profile-groups .profile-chip { font-size: 0.85rem; padding: 6px 12px; }
.find-cta { text-align: left; padding: 4px 0; }
.find-cta.find-cta-inline { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 20px; }
.find-cta h2 { margin: 0 0 6px; font-size: 1.3rem; }
.find-cta p { margin: 0 0 14px; max-width: none; }

/* '어떻게 되는지' 링크 (reserve 화면, 결제 전 망설임 지점) — reassure 와 같은 톤의 subtle 링크 */
.hiw-link {
  text-align: center;
  font-size: 0.82rem;
  margin: 10px 8px 0;
}
.hiw-link a {
  color: var(--ink-soft);
}

/* ---------- How it works (/how-it-works, 상설 1인칭 스토리) ---------- */
.hiw-eyebrow {
  font-size: 0.85rem;
  color: var(--ink-faint);
  line-height: 1.55;
  margin: 6px 0 26px;
}
#story h1 {
  margin-top: 2px;
}
#story p {
  font-size: 0.98rem;
  line-height: 1.68;
}
.hiw-facts {
  text-align: center;
  font-size: 0.86rem;
  color: var(--ink-soft);
  line-height: 1.7;
  margin: 24px 0 26px;
  padding: 16px 18px;
}
.hiw-cta-buttons {
  display: grid;
  gap: 10px;
}
.hiw-unavailable-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0 0 12px;
}
.hiw-decade-hint {
  text-align: center;
  margin: 14px 0 0;
}
.hiw-decade-hint a {
  color: var(--ink-faint);
  font-size: 0.8rem;
}

/* About 팝업 (reserve 화면) — 여느 홈페이지 About 느낌의 subtle 링크 + 제레미 스토리 모달 */
.about-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(58, 46, 40, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
}
.about-overlay[hidden] { display: none; }
.about-modal {
  position: relative; background: #fdfbf7; border-radius: 18px;
  max-width: 460px; width: 100%; padding: 30px 26px 26px;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.22);
  max-height: 88vh; overflow-y: auto;
}
.about-modal h2 { margin: 0 0 14px; font-size: 21px; color: #2f2620; }
.about-modal p { margin: 0 0 12px; font-size: 15.5px; line-height: 1.6; color: #4a3f37; }
.about-modal .about-signoff { margin-top: 16px; color: #c1694a; font-weight: 600; }
.about-close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; font-size: 26px; line-height: 1;
  color: #a99e93; cursor: pointer; padding: 4px 8px;
}
.about-close:hover { color: #3a2e28; }

/* ---------- 1:1 채팅 페어링 — 추천 섹션 / 하드게이트 / 아바타 피커 (was-chat-pivot) ---------- */

.rec-section-wrap { position: relative; margin-bottom: 4px; }

.rec-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 16px 0 6px;
}
.rec-section-head .match-section-label {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 700;
}
.rec-countdown {
  font-size: 0.8rem;
  color: var(--terracotta-dark);
  font-weight: 700;
  white-space: nowrap;
}

/* 추천 카드 — 박스 안 박스 지양: 평평한 행 + 얇은 구분선. 컴팩트 단일행 버튼(뚱뚱한 2줄 버튼 방지). */
.rec-card {
  padding: 12px 2px;
  border-bottom: 1px solid var(--border);
}
.rec-card:last-child { border-bottom: none; }
.rec-head { display: flex; gap: 10px; align-items: center; }
.rec-meta { flex: 1; min-width: 0; }
.rec-name { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.rec-badge {
  background: #e6f0e9; color: #3f7d5c; font-size: 0.6rem; font-weight: 700;
  border-radius: 999px; padding: 1px 6px; white-space: nowrap;
}
.rec-actions { display: flex; gap: 8px; margin-top: 8px; }
.rec-card .btn.rec-btn, .req-card .btn.rec-btn { width: auto; padding: 8px 14px; font-size: 0.9rem; white-space: nowrap; }
.rec-view { flex: 0 0 auto; }
.rec-chat { flex: 1; }

/* 받은/보낸 요청 카드 — 컬러로 구분(받은=초록 '행동 필요', 보낸=앰버 '대기'). 포맷은 추천과 동일. */
.req-card { border-radius: 12px; padding: 11px 13px; margin-bottom: 9px; border: 1px solid var(--border); }
.req-card.req-received { background: #f1f8f3; border-color: #cfe6d7; border-left: 4px solid #3f7d5c; }
.req-card.req-sent { background: #faf5ea; border-color: #ece0c4; border-left: 4px solid #c99a3a; }

/* 미완성 프로필 유저에게 추천 내용을 살짝만 비치게 — 하드게이트 아래 배경. */
.rec-gated-content {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

.rec-skeleton-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.rec-skeleton-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--cream-2);
  flex: 0 0 auto;
}
.rec-skeleton-lines { flex: 1; }
.rec-skeleton-line {
  height: 10px;
  border-radius: 6px;
  background: var(--cream-2);
  margin-bottom: 7px;
}
.rec-skeleton-line:last-child { width: 55%; margin-bottom: 0; }

/* 하드게이트/프로필 편집기 헤드라인 (buildProfileEditor 공용) */
.gate-headline {
  font-family: Georgia, serif;
  font-size: 1.15rem;
  color: var(--terracotta-dark);
  text-align: center;
  margin: 0 0 4px;
  line-height: 1.3;
}
.gate-subhead { text-align: center; margin: 0 0 8px; }
.gate-hint {
  text-align: center;
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin: 10px 0 0;
}

/* 아바타 이모지 피커 (프로필 편집기 공용) */
.mp-avatar-block { margin-bottom: 16px; }
.mp-avatar-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.avatar-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.avatar-pick-btn {
  font-size: 1.4rem;
  line-height: 1;
  padding: 9px 0;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--cream-2);
  cursor: pointer;
}
.avatar-pick-btn.selected {
  border-color: var(--terracotta);
  background: var(--terracotta-tint);
}

/* 열린 채팅 목록 행 — 아바타 + 라벨을 왼쪽 정렬(기본 .btn 은 center) */
.match-chat-row {
  justify-content: flex-start;
  text-align: left;
  gap: 10px;
}
/* 안 읽은 새 메시지 뱃지 — 우측 끝 빨간 점 + 라벨 살짝 강조(일반 메신저 UX) */
.match-chat-row .chat-unread-dot {
  margin-left: auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e0503a;
  flex: 0 0 auto;
}
.match-chat-row.has-unread span:not(.chat-unread-dot) {
  font-weight: 600;
}

/* 1:1 채팅 헤더 — 탭하면 상대 프로필 상세가 열리는 버튼 */
/* 헤더 이름 영역 — 탭하면 상대 프로필 상세. 가운데를 차지(flex:1)해 ⋯ 버튼을 우측 끝으로 민다. */
.chat-title-group {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  background: none;
  border: none;
  padding: 2px 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}
.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f0e8db;
  color: #9f4f30;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1;
  flex: 0 0 auto;
}
