/* medilife.co.kr 전용 디자인 (11-05) — '언제 읽으면 좋은 글'. 라이프스타일 매거진: 아치 사진, 부드러운 제목(고운돋움),
   흰 바탕·연분홍 띠·자두색 글씨. 분야(읽는 때) 색은 점·사진 없는 카드에만. */
:root {
  --paper: #FFFFFF;
  --blush: #F7EFF0;
  --ink: #2B2226;
  --ink-2: #5E5157;
  --ink-3: #7F7177;
  --line: #EADFE2;
  --plum: #7E4A63;
  --display: 'Gowun Dodum', 'Pretendard Variable', Pretendard, system-ui, sans-serif;
  --body: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --wrap: 1200px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.75; word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; font-weight: 400; letter-spacing: -0.02em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 광고 표시 — 모든 페이지 맨 위 (지우지 말 것) */
.ad-band { background: var(--plum); color: #FBF4F6; font-size: 13px; line-height: 1.55; padding: 9px 20px; text-align: center; }

/* 헤더 */
.top { position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 40px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 23px; letter-spacing: -0.03em; white-space: nowrap; }
.mark { width: 18px; height: 22px; border-radius: 9px 9px 3px 3px; background: linear-gradient(180deg, #E0A8A2 0 50%, #B7A3C9 50%); }
.nav { display: flex; gap: 8px; margin-left: auto; font-size: 15px; color: var(--ink-2); overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 7px 14px; border-radius: 999px; white-space: nowrap; }
.nav a:hover { background: var(--blush); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: #FFFFFF; }
.top .about { font-size: 14px; color: var(--ink-2); white-space: nowrap; }

/* 읽는 때 점·날짜 */
.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.date { font-size: 13.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* 사진 — 사진이 남지 않은 글은 읽는 때 색 카드 */
.ph { position: relative; display: block; overflow: hidden; border-radius: 22px; background: var(--blush); aspect-ratio: 4 / 5; }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.ph.tile { display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; background: color-mix(in srgb, var(--c, #E0A8A2) 32%, #FFFFFF); }
.ph.tile b { font-family: var(--display); font-weight: 400; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.3; color: var(--ink); }

/* 첫 화면 */
.hero { padding: 56px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 72px; align-items: center; }
.hero h1 { font-size: clamp(46px, 6vw, 84px); line-height: 1.12; letter-spacing: -0.045em; }
.hero .lede { margin-top: 22px; font-size: 20px; color: var(--ink-2); }
.hero .tally { margin-top: 20px; font-size: 14.5px; color: var(--ink-3); }
.moments { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.moments a { display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px; border-radius: 999px; background: var(--blush); font-weight: 600; font-size: 15px; }
.moments .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.moments .n { font-weight: 500; font-size: 13px; color: var(--ink-3); }
.moments a:hover { background: color-mix(in srgb, var(--c) 35%, #FFFFFF); }
.moments a[aria-current] { background: var(--ink); color: #FFFFFF; }
.moments a[aria-current] .n { color: #D9CCD1; }
.lead a { display: block; position: relative; }
.lead .ph.arch { aspect-ratio: 3 / 4; border-radius: 999px 999px 26px 26px; }
.lead-text { position: relative; display: block; margin: -72px 24px 0; padding: 22px 24px 20px; background: var(--paper); border-radius: 20px; box-shadow: 0 1px 0 var(--line); }
.lead .kicker { display: block; font-size: 13px; color: var(--plum); font-weight: 600; }
.lead .chip { margin-top: 6px; }
.lead h2 { margin-top: 6px; font-size: clamp(22px, 2.1vw, 28px); line-height: 1.35; }
.lead .date { display: block; margin-top: 6px; }
.lead a:hover h2, .card a:hover h3, .recent a:hover h3, .archive li a:hover .t { color: var(--plum); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.lead a:hover .ph img, .card a:hover .ph img { transform: scale(1.03); }

/* 최근 글 */
.recent { padding: 36px 0; background: var(--blush); }
.recent .wrap { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; align-items: start; }
.recent h2 { font-size: 22px; padding-top: 4px; }
.recent ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.recent li a { display: block; }
.recent h3 { margin-top: 6px; font-size: 18px; line-height: 1.4; }
.recent .date { display: block; margin-top: 6px; }

/* 장 — 읽는 때마다: 큰 글 하나 + 작은 글 둘 */
.chapter { padding: 88px 0 24px; }
.ch-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "dot title all" "dot desc all"; column-gap: 18px; align-items: center; padding-bottom: 28px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.ch-dot { grid-area: dot; width: 26px; height: 32px; border-radius: 13px 13px 4px 4px; background: var(--c); align-self: start; margin-top: 10px; }
.ch-head h2 { grid-area: title; font-size: clamp(34px, 3.8vw, 50px); line-height: 1.15; }
.ch-head p { grid-area: desc; margin-top: 8px; font-size: 16px; color: var(--ink-2); }
.ch-head .all { grid-area: all; align-self: end; font-size: 14.5px; font-weight: 600; color: var(--plum); border-bottom: 1px solid currentColor; white-space: nowrap; }
.ch-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); grid-auto-rows: auto; gap: 28px 48px; }
.ch-grid .card:first-child { grid-row: span 2; }
.ch-grid .card:first-child h3 { font-size: clamp(24px, 2.3vw, 30px); }
.ch-grid .card:first-child .ph { aspect-ratio: 5 / 4; }
.ch-grid .card:not(:first-child) a { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 20px; align-items: center; }
.ch-grid .card:not(:first-child) .ph { aspect-ratio: 1; border-radius: 18px; }
.ch-grid .card:not(:first-child) .ph.tile b { font-size: 20px; }
.chapter:nth-of-type(even) .ch-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.chapter:nth-of-type(even) .ch-grid .card:first-child { grid-column: 2; grid-row: 1 / span 2; }
.card .chip { margin-top: 16px; }
.card h3 { margin-top: 14px; font-size: 21px; line-height: 1.38; }
.card .chip + h3 { margin-top: 6px; }
.ch-grid .card:not(:first-child) h3 { margin-top: 0; font-size: 20px; }
.card p.ex { margin-top: 8px; font-size: 15px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .date { display: block; margin-top: 8px; }

/* 전체 글 */
.archive { padding: 88px 0 96px; }
.archive h2 { font-size: 34px; }
.archive ul { list-style: none; margin: 24px 0 0; padding: 0; columns: 2; column-gap: 56px; }
.archive li { break-inside: avoid; }
.archive li a { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 2px 14px; align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--line); }
.archive li .t { font-weight: 500; font-size: 15.5px; }
.archive li .chip { grid-column: 2; font-size: 12.5px; font-weight: 500; }

/* 읽는 때·태그·목록 페이지 */
.sec-hero { padding: 56px 0 52px; background: var(--blush); }
.crumb { font-size: 13.5px; color: var(--ink-3); }
.crumb a:hover { color: var(--ink); text-decoration: underline; }
.crumb span[aria-hidden] { margin: 0 9px; color: #C9B6BC; }
.sec-hero h1 { margin-top: 16px; font-size: clamp(40px, 5vw, 64px); line-height: 1.12; letter-spacing: -0.04em; }
.sec-hero .sub { margin-top: 14px; font-size: 18px; color: var(--ink-2); max-width: 34em; }
.sec-hero .count { margin-top: 8px; font-size: 14.5px; color: var(--ink-3); }
.sec-hero .moments a { background: var(--paper); }
.sec-hero .moments a[aria-current] { background: var(--ink); color: #FFFFFF; }
.grid-list { padding: 56px 0 96px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 28px; }
.pager { margin-top: 56px; display: flex; justify-content: center; gap: 8px; }
.pager a, .pager span { min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--blush); font-size: 14px; }
.pager [aria-current] { background: var(--ink); color: #FFFFFF; }

/* 글 페이지 */
.post-head { padding: 44px 0 8px; }
.post-head .wrap { max-width: 1120px; }
.step-chip { margin-top: 24px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 15px 6px 11px; border-radius: 999px; background: var(--blush); font-weight: 600; font-size: 14px; }
.step-chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.post-head h1 { margin-top: 16px; max-width: 21em; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.3; letter-spacing: -0.035em; }
.post-meta { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--ink-3); }
.post-layout { max-width: 1120px; margin: 0 auto; padding: 24px 28px 88px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; align-items: start; }
.rail { position: sticky; top: 92px; display: grid; gap: 28px; }
.rail h2 { font-family: var(--body); font-weight: 700; font-size: 15px; color: var(--ink); padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.rail ul { list-style: none; margin: 0; padding: 0; }
.toc ol { list-style: none; margin: 10px 0 0; padding: 0; }
.toc li a { display: block; padding: 6px 0 6px 14px; border-left: 3px solid var(--line); font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.toc li a:hover, .toc li a.on { border-left-color: var(--c, var(--plum)); color: var(--ink); }
.next-step { padding: 18px 20px 16px; background: color-mix(in srgb, var(--c) 22%, #FFFFFF); border-radius: 20px; }
.next-step h2 { border-bottom-color: rgba(43,34,38,.2); }
.next-step li a { display: block; padding: 9px 0; border-bottom: 1px solid rgba(43,34,38,.12); font-size: 14.5px; line-height: 1.45; font-weight: 500; }
.next-step li a:hover, .rail .more li a:hover { color: var(--plum); }
.next-step .all { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--plum); }
.rail .more li a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.45; }

.post-body { font-size: 17.5px; line-height: 1.88; color: #3A2F33; max-width: 40em; }
.post-body > * + * { margin-top: 1.15em; }
.post-body > aside.site-disclosure { margin: 0 0 1.6em !important; }
.post-body > aside.site-disclosure + p, .post-body > p:first-child { font-size: 19px; line-height: 1.8; color: var(--ink); }
.post-body h1, .post-body h2 { margin-top: 2.2em; font-size: 28px; line-height: 1.4; scroll-margin-top: 92px; }
.post-body h2::before, .post-body h1::before { content: ""; display: block; width: 22px; height: 26px; margin-bottom: 12px; border-radius: 11px 11px 3px 3px; background: var(--c, #E0A8A2); }
.post-body h3 { margin-top: 1.9em; font-family: var(--body); font-weight: 700; font-size: 19.5px; line-height: 1.45; }
.post-body h2 + *, .post-body h3 + * { margin-top: .7em; }
.post-body a { color: var(--plum); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(126,74,99,.35); }
.post-body strong { font-weight: 700; color: var(--ink); }
.post-body ul, .post-body ol { padding-left: 1.3em; }
.post-body ul { list-style: disc; } .post-body ol { list-style: decimal; }
.post-body li + li { margin-top: .45em; }
.post-body li::marker { color: var(--plum); }
.post-body figure { margin: 2em 0; }
.post-body figure img, .post-body > img, .post-body p img { width: 100%; border-radius: 22px; }
/* 로고 — 흰 글씨 로고와 검은 글씨 로고가 둘 다 보이게 중간 회색 바탕 (어두운 바탕이면 검은 로고가 사라진다) */
.post-body img[alt*="로고"], .post-body img[alt*="logo" i] { width: auto; max-width: min(100%, 320px); padding: 20px 28px; background: #8A7F84; border-radius: 14px; }
.post-body figcaption { margin-top: 10px; font-size: 13.5px; color: var(--ink-3); }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.post-body blockquote { margin: 1.6em 0; padding: .6em 1.2em; border-radius: 16px; background: var(--blush); color: var(--ink-2); }
.post-body .overflow-x-auto { overflow-x: auto; margin: 1.8em 0; border: 1px solid var(--line); border-radius: 16px; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
.post-body th, .post-body td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); min-width: 5.5em; }
.post-body thead th { background: var(--blush); font-weight: 700; white-space: nowrap; }
.post-body tbody tr:last-child td { border-bottom: 0; }
.post-body details { border-top: 1px solid var(--line); padding: 12px 0; }
.post-body summary { cursor: pointer; font-weight: 700; }
.post-body p[class*="border-t"], .post-body .disclaimer { margin-top: 2.4em; padding-top: 1em; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.7; color: var(--ink-3); }
.post-body small { font-size: 13.5px; color: var(--ink-3); }

.post-foot { margin-top: 48px; max-width: 40em; }
.post-foot .tags { display: flex; flex-wrap: wrap; gap: 8px; }
.post-foot .tags a { font-size: 13.5px; padding: 5px 13px; border-radius: 999px; background: var(--blush); color: var(--ink-2); }
.post-foot .tags a:hover { background: var(--ink); color: #FFFFFF; }
.pn { margin-top: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; border-top: 1px solid var(--line); padding-top: 20px; }
.pn a { display: block; }
.pn small { display: block; font-size: 13px; color: var(--ink-3); }
.pn span { display: block; margin-top: 4px; font-family: var(--display); font-size: 18px; line-height: 1.4; }
.pn a:hover span { color: var(--plum); }
.pn .next { text-align: right; }
.sources { margin-top: 40px; max-width: 40em; padding: 20px 22px; background: var(--blush); border-radius: 16px; font-size: 14px; }
.sources h2 { font-size: 16px; }
.sources ol { margin: 10px 0 0; padding-left: 1.2em; }
.related { padding: 72px 0 96px; background: var(--blush); }
.related h2 { font-size: 32px; margin-bottom: 28px; }

/* 푸터 */
.foot { background: var(--ink); color: #CDBFC5; padding: 56px 0 40px; font-size: 14.5px; }
.foot .cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr); gap: 40px; }
.foot .brand { color: #FFFFFF; }
.foot .about-site { margin-top: 14px; max-width: 28em; }
.foot h2 { font-family: var(--body); font-weight: 700; font-size: 14px; color: #FFFFFF; margin-bottom: 10px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { padding: 3px 0; }
.foot li .n { color: #9C8C93; margin-left: 2px; }
.foot a:hover { color: #FFFFFF; text-decoration: underline; }
.foot .tags { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.foot .disclosure { margin-top: 40px; padding-top: 20px; border-top: 1px solid #4A3D43; color: #E6DADF; font-size: 13px; line-height: 1.6; }
.foot .copy { margin-top: 10px; font-size: 12.5px; color: #9C8C93; }
.foot .copy a { text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 1040px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .lead { max-width: 520px; }
  .recent .wrap { grid-template-columns: minmax(0, 1fr); }
  .recent ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ch-grid, .chapter:nth-of-type(even) .ch-grid { grid-template-columns: minmax(0, 1fr); }
  .ch-grid .card:first-child, .chapter:nth-of-type(even) .ch-grid .card:first-child { grid-column: auto; grid-row: auto; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .rail { position: static; }
  .rail .toc { display: none; }
  .foot .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 20px; }
  .top .wrap { flex-wrap: wrap; height: auto; gap: 0; padding-top: 12px; }
  .brand { font-size: 21px; }
  .nav { order: 3; width: 100%; margin: 8px 0 10px; gap: 6px; font-size: 14px; }
  .hero { padding: 36px 0 52px; }
  .hero .lede { font-size: 17.5px; }
  .recent ol { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .chapter { padding-top: 64px; }
  .ch-head { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "dot title" "dot desc" ". all"; }
  .ch-head .all { margin-top: 12px; justify-self: start; }
  .ch-grid .card:not(:first-child) a { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; }
  .ch-grid .card:not(:first-child) p.ex { display: none; }
  .cards { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .archive ul { columns: 1; }
  .post-layout { padding: 16px 20px 56px; }
  .post-body { font-size: 16.5px; }
  .post-body > aside.site-disclosure + p, .post-body > p:first-child { font-size: 17.5px; }
  .post-body h1, .post-body h2 { font-size: 23px; }
  .foot .cols { grid-template-columns: minmax(0, 1fr); }
  .pn { grid-template-columns: minmax(0, 1fr); }
  .pn .next { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* 11-05 다국어 — 언어 고르기 + 일본어·중국어 줄바꿈·글꼴 */
.langs { position: relative; margin-left: 10px; font-size: 14px; flex: none; }
.langs summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary:hover, .langs[open] summary { border-color: var(--plum); color: var(--ink); }
.langs ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 140px; margin: 0; padding: 6px; list-style: none; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 28px rgba(43, 34, 38, .14); }
.langs a { display: block; padding: 7px 12px; border-radius: 10px; color: var(--ink); }
.langs a:hover { background: var(--blush); }
.langs a[aria-current] { font-weight: 700; color: var(--plum); }
.top .about + .langs { margin-left: 4px; }
@media (max-width: 760px) {
  .top .wrap { column-gap: 10px; }
  .top .brand { margin-right: auto; }
  .langs { margin-left: 0; }
  .langs summary { padding: 6px 10px; }
}
:lang(ja), :lang(zh) { word-break: normal; line-break: strict; }
html:lang(ja) { --display: 'Noto Sans JP', 'Pretendard Variable', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif; --body: 'Noto Sans JP', 'Pretendard Variable', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif; }
html:lang(zh) { --display: 'Noto Sans SC', 'Pretendard Variable', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif; --body: 'Noto Sans SC', 'Pretendard Variable', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif; }

/* 11-05 일본어 — 낱말(구) 단위로 줄바꿈 (지원 브라우저만, 나머지는 보통 줄바꿈) */
:lang(ja) { word-break: auto-phrase; }

/* 11-05 여러 병원 공용 — 병원이 둘 이상일 때 목록 카드마다 '광고 · 병원 이름' (글 첫머리 광고 표시와 같은 호박색) */
.mag-ad{display:block;width:fit-content;margin:.3rem 0 .2rem;padding:1px 7px;border:1px solid #e7c873;border-radius:3px;background:#fffbeb;color:#78350f;font-size:.75rem;font-weight:600;line-height:1.5;letter-spacing:0}
