/* ============================================================
   가치관 톡 · mandalart 공용 base (리셋 · 폰트 · 타이포 · 컴포넌트 키트)
   로드 순서: variables.css → base.css → layout.css → (앱별 css)
   컴포넌트 규약: 수석의방 진단앱 계열(pill 버튼 · 16px 카드 · 10px 입력)
   ============================================================ */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

/* ── 앱 전용 토큰 (정본 variables.css는 건드리지 않고 여기서 확장) ── */
:root {
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
          system-ui, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;

  /* 챗 버블 */
  --chat-ai-bg: #ffffff;
  --chat-ai-ink: var(--ink);
  --chat-user-bg: var(--brand);
  --chat-user-ink: #ffffff;

  /* 앱 셸 규격 */
  --app-max-w: 1080px;
  --app-h: min(88vh, 880px);
  --panel-w: clamp(248px, 26vw, 328px);   /* 데스크톱 기록 패널 폭 (메인:패널 ≈ 3~4 : 1) */

  /* 간격 스케일 */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;

  /* 그림자 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .10);
  --shadow-lg: 0 16px 48px rgba(20, 20, 20, .12);
}

/* ── 리셋 ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ── 타이포 ── */
h1, h2, h3 { line-height: 1.35; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
.text-mute { color: var(--mute); }
.text-soft { color: var(--soft); }

/* ── 버튼 (pill) ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border: 1.5px solid transparent; border-radius: 50px;
  font-size: .95rem; font-weight: 700; line-height: 1;
  transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-d); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: transparent; border-color: var(--brand); color: var(--brand); }
.btn-secondary:hover { background: #e8f1ff; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── 카드 ── */
.card {
  background: var(--bg-surface-white); border: 1px solid var(--border-neutral);
  border-radius: 16px; box-shadow: var(--shadow-sm); padding: var(--sp-5);
}

/* ── 입력 ── */
.input, .textarea {
  width: 100%; background: #fff; color: var(--ink);
  border: 1.5px solid var(--border-neutral); border-radius: 10px;
  padding: 12px 14px; font-size: .95rem; line-height: 1.6;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 82, 204, .12); }
.textarea { resize: vertical; min-height: 96px; }

/* ── 선택 칩 ── */
.chip {
  display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 15px;
  background: #fff; border: 1.5px solid var(--border-neutral); color: var(--mute);
  font-size: .9rem; font-weight: 600; transition: all .15s;
}
.chip[aria-pressed="true"], .chip.is-active {
  background: var(--brand); border-color: var(--brand); color: #fff; transform: scale(1.04);
}
