/* 관계 예보 — 시안 팔레트(맑은 하늘 + 흰 카드) 기준.
   상태는 색만으로 구분하지 않는다(기획서 FR-015). 색 옆에는 항상 아이콘과 라벨이 함께 온다. */

:root {
  --sky-0: #f2f8ff;
  --sky-1: #e4effc;
  --brand: #1f6feb;
  --brand-strong: #0f52c9;
  --brand-soft: #dceafe;
  --ink: #16233a;
  --ink-2: #465879;
  --ink-3: #7b8bab;
  --card: #ffffff;
  --line: #e3ebf6;
  --shadow: 0 6px 20px rgba(31, 79, 158, .08);
  --shadow-lg: 0 12px 34px rgba(31, 79, 158, .14);
  --r-lg: 22px;
  --r-md: 16px;

  /* 시안의 파스텔 하늘 팔레트. 기존 blue 계열은 그대로 두고 보라 축만 더한다. */
  --violet: #8b5cf6;
  --violet-soft: #ede9fe;
  --pink: #f472b6;
  --pink-soft: #fce7f3;
  --cta-from: #a855f7;
  --cta-to: #3b82f6;

  --w-clear: #ffb020;
  --w-fair: #57a9f5;
  --w-cloudy: #8fa3c0;
  --w-shower: #f08a3c;
  --w-storm: #ef5a5a;
  --w-rainbow: #21b892;
  --w-fog: #a0a8bb;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  /* 은은한 하늘 그라데이션. 이미지가 아니라 CSS 라서 0바이트다. */
  background:
    radial-gradient(1100px 520px at 12% -8%, #ffffff 0%, rgba(255,255,255,0) 62%),
    radial-gradient(880px 460px at 92% 4%, #f3e8ff 0%, rgba(243,232,255,0) 60%),
    linear-gradient(180deg, #eaf4ff 0%, #e4effc 42%, #eef4fd 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo',
    'Malgun Gothic', system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

/* 한글은 단어 중간에서 끊지 않는다. */
body, h1, h2, h3, p, li, button, label, td, th { word-break: keep-all; line-height: 1.55; }

.phone {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  background: transparent;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 60px rgba(20, 60, 130, .10);
}

/* ── 앱바 ───────────────────────────────── */
.appbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px 10px;
  background: linear-gradient(180deg, rgba(238,244,253,.94) 66%, rgba(238,244,253,0));
  backdrop-filter: blur(6px);
  min-height: 56px;
}
.appbar .logo { height: 34px; width: auto; }
.appbar h1 { font-size: 17px; margin: 0; font-weight: 800; letter-spacing: -.3px; }
.appbar .spacer { flex: 1; }
.appbar button.icon {
  border: 0; background: transparent; font-size: 19px; cursor: pointer;
  padding: 6px; border-radius: 10px; color: var(--ink-2);
}
.appbar button.icon:hover { background: var(--brand-soft); }

/* ── 본문 ───────────────────────────────── */
.view { flex: 1; padding: 4px 16px 96px; }
.view.no-tabs { padding-bottom: 32px; }

section { margin-bottom: 18px; }
.section-title {
  font-size: 14px; font-weight: 800; color: var(--ink-2);
  margin: 0 2px 10px; letter-spacing: -.2px;
}

.card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}

/* ── 히어로(오늘의 관계 예보) ─────────────── */
.hero {
  border-radius: var(--r-lg);
  padding: 18px 20px 20px;
  color: #fff;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, #4aa3ff 0%, #2f7fe8 55%, #1f63cf 100%);
}
.hero::after {
  content: ''; position: absolute; right: -30px; top: -40px;
  width: 170px; height: 170px; border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.hero.tone-clear   { background: linear-gradient(150deg, #ffd166 0%, #ffa62b 55%, #f28c1c 100%); }
.hero.tone-fair    { background: linear-gradient(150deg, #6fb8ff 0%, #3d8bfd 55%, #2a6fe0 100%); }
.hero.tone-cloudy  { background: linear-gradient(150deg, #9fb4cd 0%, #7b93b3 55%, #63799b 100%); }
.hero.tone-shower  { background: linear-gradient(150deg, #ffa76b 0%, #f2803c 55%, #dd6524 100%); }
.hero.tone-storm   { background: linear-gradient(150deg, #ff8080 0%, #ef5350 55%, #d63b3b 100%); }
.hero.tone-rainbow { background: linear-gradient(150deg, #5fd6b2 0%, #24b98f 55%, #109a76 100%); }
.hero.tone-fog     { background: linear-gradient(150deg, #b6bece 0%, #8f99ad 55%, #737f95 100%); }

.hero .date { font-size: 12.5px; opacity: .92; font-weight: 600; }
.hero .title { font-size: 20px; font-weight: 900; margin: 2px 0 12px; letter-spacing: -.4px; }
.hero .row { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.hero .big-icon { font-size: 58px; line-height: 1; filter: drop-shadow(0 4px 10px rgba(0,0,0,.18)); }
.hero .stat { flex: 1; text-align: right; }
.hero .weather-name { font-size: 21px; font-weight: 900; letter-spacing: -.4px; }
.hero .temp { font-size: 17px; font-weight: 700; opacity: .96; margin-top: 2px; }
.hero .desc { margin: 12px 0 0; font-size: 13.5px; opacity: .95; position: relative; z-index: 1; }

/* ── 우산 배너 ─────────────────────────── */
.umbrella-banner {
  display: flex; align-items: center; gap: 13px;
  background: var(--card); border-radius: var(--r-lg);
  padding: 14px 16px; box-shadow: var(--shadow);
  width: 100%; border: 0; text-align: left; cursor: pointer; font: inherit; color: inherit;
}
.umbrella-banner .bubble {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  background: var(--brand-soft); color: var(--brand-strong);
  display: grid; place-items: center; font-size: 20px;
}
.umbrella-banner .txt { flex: 1; min-width: 0; }
.umbrella-banner .lb { font-size: 12px; color: var(--ink-3); font-weight: 700; }
.umbrella-banner .vl { font-size: 14.5px; font-weight: 700; margin-top: 2px; }
.umbrella-banner .chev { color: var(--ink-3); font-size: 18px; }

/* ── 오늘의 햇살 (나를 향한 회복 행동) ────── */
/* 우산은 파랑 계열, 햇살은 따뜻한 계열로 갈라 둔다.
   같은 색이면 "상대에게 / 나에게" 구분이 눈으로 안 잡힌다. */
.umbrella-banner.sun .bubble { background: #fef3c7; color: #b45309; }

.sun-card {
  background: linear-gradient(165deg, #fffbeb 0%, #ffffff 58%);
  border: 1.5px solid #fde68a;
}
.sun-state { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sun-state .si { font-size: 22px; }
.sun-state .sl {
  font-size: 12px; font-weight: 800; color: #b45309;
  background: #fef3c7; padding: 4px 10px; border-radius: 999px;
}
.sun-action { margin: 0; font-size: 15.5px; font-weight: 800; color: var(--ink); letter-spacing: -.2px; }
.sun-note { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.65; }
.sun-mood {
  margin: 12px 0 0; padding: 10px 12px; border-radius: 12px;
  background: #fffbeb; font-size: 12.5px; color: #92400e; font-weight: 700;
}

/* 재미 축. 아무것도 약속하지 않는다는 문구(fn)를 반드시 함께 보여준다. */
.flavor {
  margin-top: 14px; padding-top: 13px; border-top: 1px dashed #fde68a;
  display: flex; flex-direction: column; gap: 4px;
}
.flavor .fh { font-size: 11.5px; font-weight: 800; color: #b45309; }
.flavor .fv { font-size: 14px; font-weight: 800; color: var(--ink); }
.flavor .fn { font-size: 11px; color: var(--ink-3); line-height: 1.6; }

/* ── 사람별 예보 카드 ───────────────────── */
.person-list { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.person-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; width: 100%; border: 0; background: transparent;
  border-bottom: 1px solid var(--line); cursor: pointer; font: inherit; color: inherit; text-align: left;
}
.person-row:last-child { border-bottom: 0; }
.person-row:hover { background: #f7fbff; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: var(--sky-1); display: grid; place-items: center; font-size: 20px;
}
.person-row .who { flex: 1; min-width: 0; }
.person-row .nm { font-weight: 800; font-size: 14.5px; display: flex; align-items: center; gap: 5px; }
.person-row .rel { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
.person-row .wx { display: flex; align-items: center; gap: 7px; }
.person-row .wx .ic { font-size: 22px; }
.person-row .wx .st { font-size: 12.5px; font-weight: 700; text-align: right; }
.person-row .chev { color: #c3cede; font-size: 17px; margin-left: 2px; }

.st.tone-clear { color: #d98200; }
.st.tone-fair { color: #2a6fe0; }
.st.tone-cloudy { color: #63799b; }
.st.tone-shower { color: #d1671e; }
.st.tone-storm { color: #d63b3b; }
.st.tone-rainbow { color: #0e8f6e; }
.st.tone-fog { color: #6e7789; }

/* ── 기분 체크 ─────────────────────────── */
.mood-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.mood-row::-webkit-scrollbar { display: none; }
.mood {
  flex: none; border: 1.5px solid var(--line); background: var(--card);
  border-radius: 14px; padding: 9px 12px; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 62px;
}
.mood .em { font-size: 20px; }
.mood .lb { font-size: 11.5px; color: var(--ink-2); font-weight: 700; }
.mood[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.mood[aria-pressed="true"] .lb { color: var(--brand-strong); }

/* ── 적중 기록 ─────────────────────────── */
.tally { margin-top: 14px; }
.tally-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--sky-1); }
.tally-bar > i { display: block; }
.tally-bar > i.hit { background: var(--w-rainbow); }
.tally-bar > i.mix { background: var(--w-cloudy); }
.tally-bar > i.mis { background: var(--w-shower); }
.tally-legend { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.tally-legend span { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-2); font-weight: 700; }
.tally-legend i { width: 8px; height: 8px; border-radius: 50%; }
.tally-legend i.hit { background: var(--w-rainbow); }
.tally-legend i.mix { background: var(--w-cloudy); }
.tally-legend i.mis { background: var(--w-shower); }

/* 결제 유도는 겁을 주지 않는다. 다음에 볼 것을 권하는 톤으로만. */
.cta-soft {
  margin-top: 16px; padding: 15px; border-radius: var(--r-md);
  background: linear-gradient(140deg, #eef5ff, #e2edfd);
}
.cta-soft p { margin: 0 0 12px; font-size: 13px; color: var(--ink-2); line-height: 1.65; }

.streak-strip, .review-strip {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: var(--card); border: 0; border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 13px 16px;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.review-strip { cursor: default; font-size: 13px; color: var(--ink-2); }
.review-strip b { color: var(--brand-strong); }
.streak-strip .tx { flex: 1; font-size: 13.5px; font-weight: 700; }
.streak-strip .dim { color: var(--ink-3); font-weight: 600; font-size: 12px; }
.streak-strip .chev { color: var(--ink-3); font-size: 17px; }

.add-more {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 10px; padding: 14px;
  border: 1.5px dashed #b9cdea; border-radius: var(--r-md);
  background: #f6faff; color: var(--brand-strong);
  font: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer;
}
.add-more:hover { background: var(--brand-soft); }

/* ── 오늘의 우선순위(비교) ──────────────── */
.rank-row { display: flex; align-items: center; gap: 11px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.rank-row:last-child { border-bottom: 0; }
.rank-row .no {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: var(--sky-1); color: var(--ink-2);
  display: grid; place-items: center; font-size: 11px; font-weight: 900;
}
.rank-row.top .no { background: var(--w-storm); color: #fff; }
.rank-row .who { flex: 1; min-width: 0; }
.rank-row .nm { font-size: 14px; font-weight: 800; }
.rank-row .um { font-size: 11.5px; color: var(--ink-3); font-weight: 600; margin-top: 2px; }
.rank-row .num { font-size: 15px; font-weight: 900; flex: none; }

/* ── 요금제 카드 ───────────────────────── */
.tier-card {
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 16px 18px; margin-bottom: 12px; border: 1.5px solid transparent;
}
.tier-card.current { border-color: var(--brand); background: #f7fbff; }
.tier-top { display: flex; align-items: flex-start; gap: 12px; }
.tier-top > div:first-child { flex: 1; min-width: 0; }
.tier-name { font-size: 16px; font-weight: 900; letter-spacing: -.3px; }
.tier-who { font-size: 11.5px; color: var(--ink-3); font-weight: 600; margin-top: 3px; }
.tier-price { font-size: 20px; font-weight: 900; color: var(--brand-strong); flex: none; white-space: nowrap; }
.tier-price i { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--ink-3); margin-left: 1px; }
.tier-people {
  margin-top: 12px; padding: 8px 12px; border-radius: 10px;
  background: var(--sky-0); font-size: 13px; font-weight: 700; color: var(--ink-2);
}
.tier-people b { color: var(--brand-strong); }
.tier-adds { list-style: none; margin: 12px 0 14px; padding: 0; }
.tier-adds li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; color: var(--ink-2); margin-bottom: 7px;
}
.tier-adds li span { flex: none; }
.tier-badge {
  text-align: center; padding: 12px; border-radius: 14px;
  background: var(--brand-soft); color: var(--brand-strong); font-size: 13.5px; font-weight: 800;
}

/* 볼 관계 고르기 */
.pick-mark {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--line); display: grid; place-items: center;
  font-size: 13px; font-weight: 900; color: transparent;
}
.pick-mark.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ── 사람별 주간 격자 ───────────────────── */
.grid-head, .grid-row {
  display: grid;
  grid-template-columns: 68px repeat(7, 1fr);
  align-items: center;
  gap: 2px;
}
.grid-row {
  width: 100%; border: 0; background: transparent; cursor: pointer;
  font: inherit; color: inherit; text-align: left;
  padding: 6px 0; border-top: 1px solid var(--line);
}
.grid-row:hover { background: #f7fbff; }
.gh-day {
  text-align: center; font-size: 10px; color: var(--ink-3); line-height: 1.25; padding-bottom: 6px;
}
.gh-day b { display: block; font-size: 11.5px; color: var(--ink-2); }
.gh-day i { font-style: normal; font-size: 9.5px; }
.gh-day.today b { color: var(--brand-strong); }
.gh-day.today i { color: var(--brand); }
.gr-name {
  font-size: 12px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding-right: 4px;
}
.gr-name .gr-note {
  display: block; font-style: normal; font-size: 9.5px; color: var(--ink-3); font-weight: 600;
}
.gr-cell {
  text-align: center; font-size: 16px; line-height: 1; padding: 6px 0; border-radius: 8px;
}
/* 좋은 날·주의할 날은 색만으로 구분하지 않고 삼각 표식을 함께 붙인다(FR-015). */
.gr-cell.best { background: #e2f6ef; position: relative; }
.gr-cell.worst { background: #ffe9e9; position: relative; }
.gr-cell.best::after, .gr-cell.worst::after {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: -1px; font-size: 7px; font-weight: 900;
}
.gr-cell.best::after { content: '▲'; color: #0e8f6e; }
.gr-cell.worst::after { content: '▼'; color: #d63b3b; }
.grid-legend {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 11px; color: var(--ink-2); font-weight: 600;
}

/* ── 어조 선택 ─────────────────────────── */
.tone-list { display: flex; flex-direction: column; gap: 8px; }
.tone {
  border: 1.5px solid var(--line); background: #fff; border-radius: 15px;
  padding: 13px 15px; cursor: pointer; font: inherit; text-align: left;
  display: flex; flex-direction: column; gap: 5px; color: inherit;
}
.tone .hd { display: flex; align-items: baseline; gap: 8px; }
.tone .nm { font-size: 14.5px; font-weight: 800; }
.tone .ht { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.tone .sm { font-size: 12.5px; color: var(--ink-2); }
.tone[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.tone[aria-pressed="true"] .nm, .tone[aria-pressed="true"] .sm { color: var(--brand-strong); }

/* ── 주간 예보 ─────────────────────────── */
.week-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 6px; border-bottom: 1px solid var(--line);
}
.week-row:last-child { border-bottom: 0; }
.week-row.is-best { background: #f0fbf7; border-radius: 12px; }
.week-row.is-worst { background: #fff6f6; border-radius: 12px; }
.week-row .wd { width: 38px; flex: none; text-align: center; }
.week-row .wd .d { display: block; font-size: 14px; font-weight: 900; }
.week-row .wd .d.we { color: var(--w-storm); }
.week-row .wd .md { display: block; font-size: 10.5px; color: var(--ink-3); font-weight: 700; }
.week-row .ic { font-size: 22px; flex: none; }
.week-row .meter { flex: 1; min-width: 0; }
.week-row .meter .sub { font-size: 10.5px; color: var(--ink-3); font-weight: 600; margin-top: 4px; }
.week-row .tags { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; flex: none; }
.week-row .tag {
  font-size: 9.5px; font-weight: 800; padding: 2px 6px; border-radius: 999px;
  background: #eef2f8; color: var(--ink-2); white-space: nowrap;
}
.week-row .tag.today { background: var(--brand); color: #fff; }
.week-row .tag.best { background: #d7f3e9; color: #0e8f6e; }
.week-row .tag.worst { background: #ffe0e0; color: #d63b3b; }
.week-row .tag.mood { background: #e6ecff; color: #3552b5; }
.week-row .tag.ev { background: #fff0dd; color: #a96a12; }

/* ── 다가오는 날 (기념일·생일) ────────────── */
.umbrella-banner.occ-banner .bubble { background: var(--pink-soft); color: #be185d; }

.since {
  margin: 0 0 12px; padding: 9px 12px; border-radius: 12px;
  background: var(--pink-soft); color: #be185d;
  font-size: 12.5px; font-weight: 700;
}
.since b { font-size: 14px; }

.occ-list { display: flex; flex-direction: column; gap: 8px; }
.occ {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px; border-radius: 13px; background: var(--sky-0);
}
/* 이틀 안이면 눈에 걸리게. 그보다 먼 날은 차분하게 둔다. */
.occ.soon { background: linear-gradient(100deg, var(--pink-soft), #fff1f2); }
.occ .oi { font-size: 20px; flex: none; }
.occ .ow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.occ .ol { font-size: 14px; font-weight: 800; }
.occ .od { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.occ .ou { font-size: 11.5px; color: var(--brand-strong); font-weight: 700; margin-top: 3px; }
.occ .of { flex: none; text-align: right; }
.occ .of b { display: block; font-size: 15px; font-weight: 900; color: var(--brand-strong); }
.occ .of i { font-style: normal; font-size: 15px; }

/* ── 중요 일정 ─────────────────────────── */
.ev-list { display: flex; flex-direction: column; gap: 8px; }
.ev-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; background: var(--sky-0); border-radius: 12px;
}
.ev-item .d { font-size: 12px; font-weight: 800; color: var(--brand-strong); flex: none; }
.ev-item .d b { color: var(--brand); }
.ev-item .t { flex: 1; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-item .x {
  border: 0; background: transparent; cursor: pointer; font: inherit;
  color: var(--ink-3); font-size: 13px; padding: 2px 4px; flex: none;
}
.ev-item .x:hover { color: var(--w-storm); }

/* ── 관찰 기록 ─────────────────────────── */
.obs-row { display: flex; gap: 6px; }
.obs {
  flex: 1; border: 1.5px solid var(--line); background: #fff;
  border-radius: 13px; padding: 10px 2px; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0;
}
.obs .em { font-size: 19px; }
.obs .lb { font-size: 10px; color: var(--ink-2); font-weight: 700; text-align: center; line-height: 1.3; }
.obs[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.obs[aria-pressed="true"] .lb { color: var(--brand-strong); }

/* 잠긴 기능은 흐리게 감추지 않고, 무엇이 열리는지 그대로 보여준다. */
.card.locked { border: 1.5px dashed var(--line); }

/* ── 충돌 게이지 ───────────────────────── */
.gauge-card { display: flex; align-items: center; gap: 18px; }
.gauge-card .meta { flex: 1; }
.gauge-card .lb { font-size: 13px; color: var(--ink-2); font-weight: 700; }
.gauge-card .num { font-size: 40px; font-weight: 900; letter-spacing: -1.5px; margin: 2px 0 6px; }
.gauge-card .num span { font-size: 22px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px;
}
.pill.low { background: #e2f6ef; color: #0e8f6e; }
.pill.mid { background: #fff1e2; color: #c2701c; }
.pill.high { background: #ffe6e6; color: #d63b3b; }
.ring { width: 104px; height: 104px; flex: none; }

/* ── 정보 블록 ─────────────────────────── */
.block { display: flex; gap: 12px; align-items: flex-start; }
.block + .block { margin-top: 12px; }
.block .ic {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 17px; background: var(--brand-soft); color: var(--brand-strong);
}
.block .ic.warn { background: #ffe6e6; color: #d63b3b; }
.block .ic.good { background: #e2f6ef; color: #0e8f6e; }
.block h3 { margin: 0 0 3px; font-size: 13.5px; font-weight: 800; }
.block p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.block .quote { font-size: 15px; font-weight: 800; color: var(--brand-strong); }
.block .quote.avoid { color: #d63b3b; }

/* ── 체크리스트(우산) ───────────────────── */
.check-item { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.check-item:last-child { border-bottom: 0; }
.check-item .mark {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 14px;
}
.check-item .tx { flex: 1; font-size: 14px; font-weight: 700; }
.check-item .em { font-size: 20px; }

.time-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--brand-soft); border-radius: var(--r-md); padding: 13px 15px;
}
.time-card .lb { font-size: 12px; color: var(--brand-strong); font-weight: 800; }
.time-card .vl { font-size: 16px; font-weight: 900; color: var(--ink); margin-top: 1px; }

/* ── 폼 ─────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 800; color: var(--ink-2); margin-bottom: 6px; }
.field .hint { font-size: 11.5px; color: var(--ink-3); font-weight: 500; margin-top: 5px; }
input[type="text"], input[type="number"], input[type="date"], input[type="time"], select, textarea {
  width: 100%; padding: 12px 13px; border: 1.5px solid var(--line); border-radius: 13px;
  font: inherit; font-size: 15px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1; padding: 10px; border-radius: 12px; border: 1.5px solid var(--line);
  background: #fff; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--ink-2); cursor: pointer;
}
.seg button[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-strong); }

/* ── 양식 소유자 머리 ───────────────────────
   같은 카드 안에서 "누구의 정보인가"를 먼저 말한다. 온보딩과 사람 양식이
   `달력·생년월일·태어난 시간` 세 라벨을 글자까지 똑같이 쓰고 있었고,
   온보딩에는 소유자를 밝히는 라벨이 하나도 없었다. 라벨만 고치면 스크롤한
   사용자가 다시 헷갈리므로 카드 머리에 색과 아이콘으로 못을 박는다. */
.who-head {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 13px; border-radius: 13px; margin-bottom: 16px;
  border: 1.5px solid var(--line);
}
.who-head .wi { font-size: 22px; line-height: 1; flex: none; }
.who-head b { display: block; font-size: 14px; font-weight: 800; color: var(--ink); }
.who-head i {
  display: block; font-style: normal; margin-top: 3px;
  font-size: 11.5px; font-weight: 600; line-height: 1.5; color: var(--ink-2);
}
.who-head i em { font-style: normal; font-weight: 800; color: var(--brand-strong); }
/* 나 = 브랜드색, 상대 = 중립. 두 화면을 나란히 떠올렸을 때 색으로 먼저 갈린다. */
.who-head.me { background: var(--brand-soft); border-color: var(--brand); }
.who-head.other { background: var(--sky-0); }

/* ── 볼 사람 고르기 칩 ─────────────────────
   세그먼트(.seg)와 달리 폭을 나눠 갖지 않는다. 두 칩의 글자 수가 다르고
   숫자가 붙어서, 균등 분할하면 짧은 쪽에 빈 공간이 남는다. */
.stance-chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 2px 10px; }
.stance-chips .chip {
  padding: 7px 13px; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; font: inherit; font-size: 12.5px; font-weight: 700;
  color: var(--ink-2); cursor: pointer;
}
.stance-chips .chip[aria-pressed="true"] {
  border-color: var(--brand); background: var(--brand-soft); color: var(--brand-strong);
}

.checkline { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.checkline input { width: 18px; height: 18px; accent-color: var(--brand); }

.btn {
  width: 100%; padding: 15px; border-radius: 15px; border: 0;
  background: var(--brand); color: #fff; font: inherit; font-size: 15.5px; font-weight: 800;
  cursor: pointer; box-shadow: 0 6px 16px rgba(31,111,235,.28);
}
.btn:hover { background: var(--brand-strong); }
.btn.ghost { background: #fff; color: var(--brand-strong); box-shadow: var(--shadow); }
.btn.danger { background: #fff; color: #d63b3b; box-shadow: var(--shadow); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn + .btn { margin-top: 10px; }

/* ── 근거 ───────────────────────────────── */
details.why { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 4px 2px; }
details.why > summary {
  list-style: none; cursor: pointer; padding: 13px 16px;
  font-size: 13.5px; font-weight: 800; display: flex; align-items: center; gap: 8px;
}
details.why > summary::-webkit-details-marker { display: none; }
details.why > summary::after { content: '＋'; margin-left: auto; color: var(--ink-3); }
details.why[open] > summary::after { content: '－'; }
details.why ul { margin: 0; padding: 0 18px 14px 34px; }
details.why li { font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }

/* ── 신뢰도 배지 ───────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 800; padding: 4px 9px; border-radius: 999px;
  background: #eef2f8; color: var(--ink-2);
}
.badge.warn { background: #fff4e2; color: #a96a12; }

/* ── 성향 바 ───────────────────────────── */
.trait { margin-bottom: 12px; }
.trait .top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.trait .top .v { color: var(--brand-strong); }
.bar { height: 8px; border-radius: 99px; background: var(--sky-1); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #6fb8ff, var(--brand)); }

.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.pillars .p { background: var(--sky-0); border-radius: 14px; padding: 10px 4px; }
.pillars .p .cap { font-size: 11px; color: var(--ink-3); font-weight: 700; }
.pillars .p .gz { font-size: 20px; font-weight: 900; margin: 4px 0 1px; }
.pillars .p .hg { font-size: 11.5px; color: var(--ink-2); font-weight: 700; }

.el-row { display: flex; gap: 6px; }
.el { flex: 1; text-align: center; background: var(--sky-0); border-radius: 12px; padding: 9px 2px; }
.el .n { font-size: 12px; font-weight: 800; }
.el .v { font-size: 15px; font-weight: 900; color: var(--brand-strong); margin-top: 2px; }

/* ── 빈 상태 ───────────────────────────── */
.empty { text-align: center; padding: 34px 18px; color: var(--ink-3); }
.empty .em { font-size: 42px; }
.empty h3 { margin: 12px 0 6px; font-size: 15.5px; color: var(--ink); }
.empty p { margin: 0 0 18px; font-size: 13.5px; }

/* ── 온보딩 ───────────────────────────── */
.onboard-hero {
  position: relative; text-align: center;
  padding: 18px 8px 6px; min-height: 168px;
}
.onboard-hero img {
  width: 206px; max-width: 64%; height: auto;
  filter: drop-shadow(0 8px 18px rgba(80, 110, 190, .18));
}

/* 로고 양옆 말풍선. 시안의 첫인상을 만드는 요소라 문구를 짧게 유지한다. */
.onboard-hero .bubble-l,
.onboard-hero .bubble-r {
  position: absolute; top: 26px;
  font-size: 12.5px; font-weight: 800; line-height: 1.35;
  padding: 9px 13px; border-radius: 16px;
  box-shadow: 0 4px 14px rgba(80, 110, 190, .14);
  white-space: nowrap;
}
.onboard-hero .bubble-l {
  left: 2px; background: #dbeafe; color: #1e40af;
  border-bottom-left-radius: 5px; transform: rotate(-4deg);
}
.onboard-hero .bubble-r {
  right: 2px; background: var(--pink-soft); color: #be185d;
  border-bottom-right-radius: 5px; transform: rotate(4deg);
}

/* 한 방 문구 카드. 시안의 큰 인용 헤드라인 자리. */
.pitch {
  position: relative;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(8px);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 22px 20px 18px;
  text-align: center;
  margin-bottom: 14px;
}
.pitch .q-mark {
  position: absolute; left: 16px; top: 8px;
  font-size: 34px; color: #c7d7f5; line-height: 1;
}
.pitch-head {
  margin: 0; font-size: 25px; font-weight: 900; line-height: 1.28;
  letter-spacing: -.8px; color: var(--brand-strong);
}
.pitch-head em {
  font-style: normal;
  background: linear-gradient(100deg, var(--pink) 0%, #ef4444 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pitch-sub { margin: 12px 0 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.65; }
.pitch-tag {
  display: inline-block; margin: 13px 0 0;
  padding: 7px 14px; border-radius: 999px;
  background: linear-gradient(100deg, var(--violet-soft), var(--pink-soft));
  font-size: 12px; font-weight: 800; color: #7c3aed;
}

/* 폼 카드 + 포스트잇 메모 */
.form-card { position: relative; overflow: visible; }
.memo {
  position: absolute; right: -6px; top: 40%;
  width: 116px; padding: 12px 11px;
  background: linear-gradient(170deg, #fef9c3, #fef08a);
  color: #854d0e; font-size: 11px; font-weight: 700; line-height: 1.55;
  border-radius: 3px; transform: rotate(3deg);
  box-shadow: 0 6px 16px rgba(150, 130, 40, .22);
  pointer-events: none;
}
.memo::before {
  content: ''; position: absolute; left: 50%; top: -7px; transform: translateX(-50%);
  width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 34% 32%, #93c5fd, #2563eb);
  box-shadow: 0 2px 4px rgba(0,0,0,.25);
}
/* 좁은 화면에서는 메모가 입력을 덮는다. 장식보다 입력이 먼저다. */
@media (max-width: 420px) { .memo { display: none; } }

/* 필드 아이콘 배지 */
.field.ico { display: flex; gap: 12px; align-items: flex-start; }
.field.ico .fi {
  width: 40px; height: 40px; flex: none; margin-top: 18px;
  border-radius: 13px; display: grid; place-items: center; font-size: 19px;
  background: linear-gradient(150deg, var(--violet-soft), #dbeafe);
}
.field.ico .fw { flex: 1; min-width: 0; }
.field .opt { font-weight: 600; color: var(--ink-3); font-size: 12px; }

/* 선택 입력은 접어둔다. 첫 화면에 필드가 많으면 이탈한다. */
.more-fields {
  border: 1.5px dashed var(--line); border-radius: 15px;
  padding: 2px 14px; margin-bottom: 16px; background: #fbfdff;
}
.more-fields > summary {
  list-style: none; cursor: pointer; padding: 12px 0;
  font-size: 13.5px; font-weight: 800; color: var(--brand-strong);
  display: flex; align-items: center; gap: 6px;
}
.more-fields > summary::-webkit-details-marker { display: none; }
.more-fields > summary::after { content: '＋'; margin-left: auto; color: var(--ink-3); }
.more-fields[open] > summary::after { content: '－'; }

/* 그라데이션 CTA */
.btn.cta {
  background: linear-gradient(100deg, var(--cta-from), var(--cta-to));
  font-size: 16.5px; padding: 17px; border-radius: 999px;
  box-shadow: 0 10px 24px rgba(124, 58, 237, .30);
  letter-spacing: -.3px;
}
.btn.cta:hover { filter: brightness(1.06); background: linear-gradient(100deg, var(--cta-from), var(--cta-to)); }
.cta-note {
  margin: 11px 0 0; text-align: center;
  font-size: 12px; font-weight: 700; color: var(--ink-3);
}

/* 하단 신뢰 배지 — 시안의 4칸 구조.
   시안에는 "하루 1번 무료 확인"과 "재미 100% 공감 200%"가 있었는데
   앞쪽은 사실이 아니고(무료에 횟수 제한이 없다) 뒤쪽은 근거 없는 수치라 바꿨다. */
.trust {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  background: rgba(255,255,255,.78); backdrop-filter: blur(6px);
  border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 14px 12px;
}
.t-item { display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto; gap: 0 8px; align-items: center; }
.t-item .ti { grid-row: 1 / 3; font-size: 19px; text-align: center; }
.t-item b { font-size: 12px; font-weight: 800; color: var(--ink); }
.t-item i { font-style: normal; font-size: 10.5px; color: var(--ink-3); font-weight: 600; }

/* ── 하단 탭 ───────────────────────────── */
/* 🔴 HTML `hidden` 속성은 UA 스타일시트의 `[hidden]{display:none}` 로만 걸린다.
   작성자 규칙에 display 가 있으면 그쪽이 이긴다 — `.tabbar{display:grid}` 때문에
   `tabbar.hidden = true` 를 세워도 온보딩(첫 화면)에 하단 5탭이 그대로 보였다.
   처음 온 사용자가 아무것도 입력하기 전에 전체 내비게이션을 보고, 눌러도
   온보딩으로 되돌아온다(라우터가 프로필 없으면 전부 가로챈다).
   개별 규칙마다 고치면 다음에 또 재발하므로 한 줄로 막는다. */
[hidden] { display: none !important; }

.tabbar {
  position: sticky; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 10px 4px calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 22px rgba(60, 90, 160, .07);
}
/* SYL-01 스프링 근접 확대 독. --s / --lift 는 spring-dock.js 가 매 프레임 쓴다.
   transition 을 걸지 않는다 — 스프링이 이미 보간하므로 겹치면 뭉개진다. */
.tab {
  border: 0; background: transparent; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10.5px; font-weight: 700; color: var(--ink-3); padding: 4px 0;
  transform: translateY(var(--lift, 0px)) scale(var(--s, 1));
  transform-origin: center bottom;
  will-change: transform;
}
.tab .ti { font-size: 19px; filter: grayscale(1); opacity: .55; }
.tab[aria-current="page"] { color: var(--brand-strong); }
.tab[aria-current="page"] .ti { filter: none; opacity: 1; }

/* ── 토스트 ───────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%);
  background: rgba(22,35,58,.94); color: #fff; padding: 11px 18px; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; z-index: 60; box-shadow: var(--shadow-lg);
}

.note {
  font-size: 12px; color: var(--ink-3); text-align: center;
  padding: 8px 16px 0; line-height: 1.6;
}

@media (prefers-reduced-motion: no-preference) {
  /* 섹션이 아래에서 차례로 올라온다. 지연을 짧게 두어 기다린다는 느낌이 없게 한다. */
  .view > * { animation: rise .34s cubic-bezier(.22,.9,.25,1) both; }
  .view > *:nth-child(2) { animation-delay: .05s; }
  .view > *:nth-child(3) { animation-delay: .10s; }
  .view > *:nth-child(4) { animation-delay: .14s; }
  .view > *:nth-child(n+5) { animation-delay: .17s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

  /* 말풍선이 아주 느리게 떠 있는다. 시선을 로고로 끌되 산만하지 않은 폭으로. */
  .onboard-hero .bubble-l { animation: floatL 4.2s ease-in-out infinite; }
  .onboard-hero .bubble-r { animation: floatR 4.6s ease-in-out infinite; }
  @keyframes floatL {
    0%, 100% { transform: rotate(-4deg) translateY(0); }
    50%      { transform: rotate(-4deg) translateY(-5px); }
  }
  @keyframes floatR {
    0%, 100% { transform: rotate(4deg) translateY(0); }
    50%      { transform: rotate(4deg) translateY(-6px); }
  }

  /* CTA 가 한 번씩 숨을 쉰다. 누를 곳이라는 신호. */
  .btn.cta { animation: breathe 3.4s ease-in-out infinite; }
  @keyframes breathe {
    0%, 100% { box-shadow: 0 10px 24px rgba(124, 58, 237, .30); }
    50%      { box-shadow: 0 12px 32px rgba(124, 58, 237, .44); }
  }
}
