@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:        #faf7f2;
  --surface:   #f2ede4;
  --card:      #ffffff;
  --border:    #e0d5c5;
  --text:      #1c1208;
  --text-muted:#8a7860;
  --brown:     #c4884a;
  --brown-dark:#8b5e2c;
  --brown-light:#f0e2cc;
  --pink:      #e8759a;
  --pink-light:#fde8f0;
  --radius:    12px;
  --max-w:     480px;
  --shadow:    0 1px 4px rgba(0,0,0,0.08);
}

html { font-size: 16px; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Nav ── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 14px 20px;
  max-width: var(--max-w);
  margin: 0 auto;
  gap: 0;
}

.nav-logo {
  font-size: 15px;
  font-weight: 900;
  color: var(--brown);
  text-decoration: none;
  letter-spacing: -0.3px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 2px 4px;
  line-height: 1;
}

.nav-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
  white-space: nowrap;
}

.nav-links a:hover  { color: var(--text); }
.nav-links a.active { color: var(--brown); font-weight: 700; }

.nav-divider {
  border: none;
  border-top: 1px solid var(--border);
}

@media (max-width: 560px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0;
    padding: 6px 0 12px;
    border-top: 1px solid var(--border);
    margin-top: 10px;
  }
  .nav-links.open { display: flex; }

  .nav-links a {
    width: 100%;
    padding: 10px 0;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links a:last-child { border-bottom: none; }
}

/* ── Buttons ── */
.btn {
  display: block;
  width: 100%;
  padding: 16px 24px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: none;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.15s, transform 0.1s;
  letter-spacing: -0.2px;
}

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

.btn-primary {
  background: var(--brown);
  color: #fff;
}

.btn-primary:hover { opacity: 0.88; }

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* ── Card ── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 20px;
}

/* ── Page header ── */
.page-header {
  padding: 36px 0 24px;
  text-align: center;
}

.page-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

/* ── Hero ── */
.hero {
  padding: 52px 0 48px;
  text-align: center;
}

.hero-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--brown);
  text-transform: uppercase;
  margin-bottom: 24px;
  border: 1.5px solid var(--brown);
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--brown-light);
}

.hero-title {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.hero-title .accent { color: var(--brown); }

.hero-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* ── Character image ── */
.char-placeholder {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 2px solid var(--border);
  overflow: hidden;
}

/* ── Checklist ── */
.counter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.counter-label { font-size: 12px; color: var(--text-muted); }

.counter-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--brown);
}

.check-list { list-style: none; padding: 0; }

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s;
}

.check-item:last-child { border-bottom: none; }
.check-item:active { opacity: 0.6; }

.check-box {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  flex-shrink: 0;
  margin-top: 1px;
  transition: background 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: transparent;
  background: var(--surface);
}

.check-item.checked .check-box {
  background: var(--brown);
  border-color: var(--brown);
  color: white;
}

.check-item.checked .check-text {
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: var(--border);
}

.check-text {
  font-size: 15px;
  line-height: 1.55;
  transition: color 0.15s;
}

.check-num {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 4px;
  min-width: 16px;
}

/* ── Prescription result ── */
.rx-card {
  background: var(--card);
  border: 2px solid var(--brown);
  border-radius: var(--radius);
  padding: 28px 24px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.rx-card::before {
  content: 'Rx';
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 64px;
  font-weight: 900;
  color: var(--brown);
  opacity: 0.06;
  line-height: 1;
  font-style: italic;
}

.rx-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--brown);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.rx-count-wrap { margin-bottom: 4px; }

.rx-count {
  font-size: 64px;
  font-weight: 900;
  color: var(--brown);
  line-height: 1;
  letter-spacing: -2px;
}

.rx-denom {
  font-size: 20px;
  color: var(--text-muted);
  font-weight: 300;
}

.rx-total-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.rx-level-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  background: var(--brown-light);
  color: var(--brown-dark);
  margin-bottom: 20px;
}

.rx-divider {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 0 0 20px;
}

.rx-text {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.75;
  color: var(--text);
}

/* ── Ad slot ── */
.ad-slot {
  background: var(--surface);
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Ritual ── */
.ritual-q-card {
  background: var(--card);
  border-left: 3px solid var(--brown);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 20px 22px;
  box-shadow: var(--shadow);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ritual-q-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--brown);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.ritual-q-text {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.3px;
}

.ritual-textarea {
  width: 100%;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.65;
  resize: none;
  min-height: 140px;
  outline: none;
  transition: border-color 0.2s;
  display: block;
  box-shadow: var(--shadow);
}

.ritual-textarea:focus { border-color: var(--brown); }
.ritual-textarea::placeholder { color: var(--text-muted); }

/* ── Response ── */
.response-wrap { display: none; }

.response-char {
  text-align: center;
  margin-bottom: 16px;
}

.response-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--brown);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.response-from {
  font-size: 11px;
  font-weight: 700;
  color: var(--brown);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.response-text {
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: -0.2px;
}

.share-hint {
  text-align: center;
  padding: 16px 0 4px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.8;
}

.share-tag {
  color: var(--brown);
  font-weight: 700;
}

/* ── Spacing utils ── */
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

/* ── Footer ── */
footer {
  padding: 28px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
}

footer a:hover { color: var(--text); }

/* ── Responsive ── */
@media (max-width: 520px) {
  .hero-title { font-size: 24px; }
  .rx-count   { font-size: 56px; }
  .rx-text    { font-size: 17px; }
}

/* ════════════════════════════════
   아티클 페이지
════════════════════════════════ */

.article-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 28px 72px;
}

/* 카테고리 태그 */
.article-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--brown-dark);
  background: var(--brown-light);
  border: 1.5px solid var(--brown);
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 14px;
}

/* 제목 */
.article h1 {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.6px;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 10px;
}

.article-meta {
  font-size: 12px;
  color: var(--text-muted);
  padding-bottom: 20px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border);
}

/* 소제목 */
.article h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin: 52px 0 18px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  letter-spacing: -0.3px;
  position: relative;
}

.article h2::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  width: 36px;
  height: 3px;
  background: var(--brown);
  border-radius: 2px;
}

.article h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--brown);
  margin: 28px 0 10px;
}

/* 본문 */
.article p {
  font-size: 17px;
  line-height: 1.95;
  color: #333;
  margin-bottom: 20px;
}

.article ul,
.article ol {
  padding-left: 22px;
  margin-bottom: 22px;
}

.article li {
  font-size: 17px;
  line-height: 1.85;
  color: #333;
  margin-bottom: 8px;
}

.article strong {
  font-weight: 700;
  color: var(--brown-dark);
}

/* 처방 박스 */
.article .prescription,
.article blockquote {
  background: var(--brown-light);
  border-left: 4px solid var(--brown);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  margin: 28px 0;
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
}

.article .prescription strong,
.article blockquote strong {
  color: var(--brown-dark);
}

/* 뒤로 가기 */
.back-link {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.back-link a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.back-link a:hover { color: var(--brown); }

/* ── 콘텐츠 인덱스 ── */
.content-index {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 28px 72px;
}

.content-index h1 {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.content-index .subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.article-list {
  list-style: none;
  padding: 0;
}

.article-list li {
  border-bottom: 1px solid var(--border);
}

.article-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 4px;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s, padding-left 0.15s;
}

.article-list a::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background 0.15s;
}

.article-list a:hover {
  color: var(--brown);
  padding-left: 8px;
}

.article-list a:hover::before { background: var(--brown); }

/* ── 카드 다운로드 그리드 ── */
.card-download-section {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 2px solid var(--border);
}

.card-download-section .section-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}

.card-download-section .section-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 560px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 860px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

.card-item {
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
}

.card-item img {
  width: 100%;
  height: auto;
  display: block;
}

.card-dl-btn {
  display: block;
  text-align: center;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--brown-dark);
  background: var(--brown-light);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
  letter-spacing: -0.2px;
}

.card-dl-btn:hover {
  background: var(--brown);
  color: #ffffff;
}

/* ── 아티클 모바일 ── */
@media (max-width: 520px) {
  .article-wrap,
  .content-index   { padding: 28px 20px 56px; }
  .article h1      { font-size: 22px; }
  .article h2      { font-size: 17px; margin-top: 40px; }
  .article p,
  .article li      { font-size: 16px; }
  .article .prescription,
  .article blockquote { font-size: 15px; }
}
