/* ============================================================
   사랑니 회복식 길잡이 — Design System (wisdommeal.rand3.com)
   공용: 메인 html.php + WP 테마(글/페이지) 공통 스타일
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --brand: #2FB8A6;
  --brand-600: #1E9C8B;
  --brand-700: #17877A;
  --teal: #14675E;
  --teal-900: #0F453F;
  --teal-950: #0B332E;
  --accent: #FF9A62;
  --accent-600: #F07E3F;
  --cream: #FFF8F0;
  --bg: #FFFFFF;
  --bg-soft: #F4FAF8;
  --bg-tint: #EAF5F2;
  --ink: #17332F;
  --ink-2: #2E4A44;
  --muted: #5C716B;
  --line: #E2EDEA;
  --line-strong: #C9DDD8;
  --danger: #C2452E;
  --danger-bg: #FBEDEA;
  --warn: #8A5A1F;
  --warn-bg: #FFF6E8;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 999px;

  --shadow-sm: 0 1px 2px rgba(11,51,46,.06), 0 2px 6px rgba(11,51,46,.05);
  --shadow-md: 0 4px 10px rgba(11,51,46,.08), 0 10px 24px rgba(11,51,46,.07);
  --shadow-lg: 0 12px 28px rgba(11,51,46,.12), 0 24px 56px rgba(11,51,46,.10);
  --shadow-brand: 0 8px 20px rgba(47,184,166,.28);

  --font-sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  --font-serif: 'Noto Serif KR', 'Nanum Myeongjo', Georgia, serif;

  --container: 1180px;
  --content-max: 760px;
  --header-h: 72px;
  --section-space: clamp(72px, 9vw, 128px);

  --dur: 220ms;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.72;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-700); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--teal-900); }
h1, h2, h3, h4 { margin: 0 0 .5em; color: var(--ink); line-height: 1.28; letter-spacing: -0.015em; font-weight: 800; }
h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.95rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.35em; }
li { margin-bottom: .45em; }
strong { color: var(--ink); font-weight: 700; }
::selection { background: rgba(47,184,166,.22); }

:focus-visible { outline: 3px solid rgba(47,184,166,.55); outline-offset: 2px; border-radius: 4px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 clamp(18px, 4vw, 32px); }
.section { padding: var(--section-space) 0; }
.section-soft { background: var(--bg-soft); }
.section-tint { background: linear-gradient(180deg, #FFFFFF 0%, var(--bg-soft) 100%); }

.section-head { max-width: 680px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; font-weight: 700; letter-spacing: .06em;
  color: var(--brand-700); background: var(--bg-tint);
  border: 1px solid var(--line); border-radius: var(--r-full);
  padding: 6px 14px; margin-bottom: 16px;
}
.section-head h2 { margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 1.02rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  border-radius: var(--r-full); border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: .98rem;
  cursor: pointer; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease);
  text-align: center; white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { background: var(--brand-600); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(47,184,166,.34); }
.btn-secondary { background: var(--teal-900); color: #fff; }
.btn-secondary:hover { background: var(--teal); color: #fff; transform: translateY(-2px); }
.btn-outline { background: #fff; color: var(--teal-900); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand-700); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--teal-900); border-color: transparent; padding-left: 10px; padding-right: 10px; }
.btn-ghost:hover { background: var(--bg-tint); color: var(--teal-900); }
.btn-sm { min-height: 44px; padding: 8px 16px; font-size: .9rem; }
.btn-lg { min-height: 56px; padding: 15px 28px; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--dur) var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; color: var(--teal-900); letter-spacing: -0.01em; }
.brand:hover { color: var(--teal-900); }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand) 0%, var(--teal) 100%);
  box-shadow: 0 4px 10px rgba(47,184,166,.3);
  color: #fff;
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-sub { display: block; font-size: .68rem; font-weight: 600; letter-spacing: .14em; color: var(--brand-600); margin-top: 1px; }
.main-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.main-nav a {
  padding: 9px 14px; border-radius: var(--r-full); font-weight: 600; font-size: .95rem; color: var(--ink-2);
}
.main-nav a:hover { background: var(--bg-tint); color: var(--teal-900); }
.main-nav a.active { color: var(--brand-700); background: var(--bg-tint); }
.header-cta { margin-left: 8px; }
.nav-toggle { display: none; margin-left: auto; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle svg { width: 22px; height: 22px; stroke: var(--teal-900); }

/* ---------- Hero ---------- */
.hero { position: relative; background: linear-gradient(180deg, var(--bg-soft) 0%, #FFFFFF 100%); overflow: hidden; }
.hero::before {
  content: ''; position: absolute; top: -160px; right: -120px; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(47,184,166,.14) 0%, rgba(47,184,166,0) 68%);
  pointer-events: none;
}
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 8vw, 110px); position: relative; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700; color: var(--brand-700); background: #fff; border: 1px solid var(--line); border-radius: var(--r-full); padding: 8px 16px; margin-bottom: 22px; box-shadow: var(--shadow-sm); }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.22; margin-bottom: 18px; font-weight: 900; letter-spacing: -0.025em; }
.hero h1 .serif { font-family: var(--font-serif); font-weight: 700; color: var(--teal); }
.hero-lead { font-size: clamp(1.02rem, 1.5vw, 1.18rem); color: var(--muted); max-width: 560px; margin-bottom: 28px; line-height: 1.78; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px 26px; padding-top: 24px; border-top: 1px dashed var(--line-strong); }
.stat-item { display: flex; flex-direction: column; }
.stat-item b { font-size: 1.35rem; color: var(--teal-900); font-weight: 800; letter-spacing: -0.02em; }
.stat-item b .unit { font-size: .85rem; color: var(--brand-600); margin-left: 3px; }
.stat-item span { font-size: .82rem; color: var(--muted); }
.hero-visual { position: relative; }
.hero-img-wrap { position: relative; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3.1; }
.hero-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.hero-img-wrap::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,51,46,0) 55%, rgba(11,51,46,.18) 100%); }
.hero-badge {
  position: absolute; left: -14px; bottom: 22px; z-index: 2;
  background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-md);
  padding: 12px 16px; display: flex; align-items: center; gap: 10px;
  border-left: 4px solid var(--brand);
}
.hero-badge .dot { width: 34px; height: 34px; border-radius: 10px; background: var(--bg-tint); display: grid; place-items: center; color: var(--brand-700); flex: none; }
.hero-badge b { display: block; color: var(--teal-900); font-size: .92rem; }
.hero-badge span { font-size: .78rem; color: var(--muted); }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }

.guide-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.guide-card { padding: 26px 22px; display: flex; flex-direction: column; gap: 10px; min-height: 210px; position: relative; overflow: hidden; }
.guide-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--brand), var(--accent)); opacity: 0; transition: opacity var(--dur) var(--ease); }
.guide-card:hover::before { opacity: 1; }
.guide-icon { width: 46px; height: 46px; border-radius: 13px; background: var(--bg-tint); color: var(--brand-700); display: grid; place-items: center; margin-bottom: 4px; }
.guide-icon svg { width: 24px; height: 24px; }
.guide-card h3 { font-size: 1.08rem; margin-bottom: 0; }
.guide-card p { font-size: .9rem; color: var(--muted); margin: 0; line-height: 1.6; }
.guide-card .more { margin-top: auto; font-size: .88rem; font-weight: 700; color: var(--brand-700); display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Timeline / chart ---------- */
.timeline { position: relative; margin-top: 8px; }
.timeline-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; position: relative; }
.timeline-track::before { content: ''; position: absolute; top: 22px; left: 6%; right: 6%; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--brand), var(--teal)); opacity: .35; }
.tl-node { position: relative; padding-top: 56px; text-align: center; }
.tl-node .tl-dot { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--brand); box-shadow: 0 0 0 5px rgba(47,184,166,.14); }
.tl-node:nth-child(2) .tl-dot { border-color: var(--accent); box-shadow: 0 0 0 5px rgba(255,154,98,.16); }
.tl-node:nth-child(3) .tl-dot { border-color: var(--teal); box-shadow: 0 0 0 5px rgba(20,103,94,.15); }
.tl-node:nth-child(4) .tl-dot { border-color: var(--brand-600); }
.tl-node .tl-time { font-size: .78rem; font-weight: 800; color: var(--brand-700); letter-spacing: .02em; margin-bottom: 6px; }
.tl-node h4 { font-size: .98rem; margin-bottom: 6px; }
.tl-node p { font-size: .85rem; color: var(--muted); margin: 0; line-height: 1.55; }

.bar-chart { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 132px 1fr 44px; align-items: center; gap: 12px; }
.bar-row .bar-label { font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.bar-track { height: 12px; border-radius: 8px; background: var(--bg-tint); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--brand), var(--teal)); width: 0; transition: width 900ms var(--ease); }
.bar-row:nth-child(2n) .bar-fill { background: linear-gradient(90deg, var(--accent), var(--accent-600)); }
.bar-val { font-size: .85rem; font-weight: 700; color: var(--teal-900); text-align: right; }

/* ---------- Meal stages ---------- */
.stage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stage-card { padding: 30px 26px; position: relative; overflow: hidden; }
.stage-card .stage-no { font-family: var(--font-serif); font-size: 2.6rem; font-weight: 700; color: var(--bg-tint); line-height: 1; position: absolute; top: 18px; right: 20px; }
.stage-card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.stage-card .stage-tag { display: inline-block; font-size: .76rem; font-weight: 700; padding: 5px 12px; border-radius: var(--r-full); background: var(--bg-tint); color: var(--brand-700); margin-bottom: 14px; }
.stage-card p { font-size: .93rem; color: var(--muted); margin-bottom: 14px; }
.stage-card ul { font-size: .88rem; color: var(--ink-2); padding-left: 1.1em; margin: 0; }
.stage-card.primary { background: linear-gradient(160deg, var(--teal-900) 0%, var(--teal) 100%); border-color: transparent; }
.stage-card.primary h3, .stage-card.primary .stage-tag, .stage-card.primary ul, .stage-card.primary p { color: #fff; }
.stage-card.primary .stage-tag { background: rgba(255,255,255,.16); color: #fff; }
.stage-card.primary .stage-no { color: rgba(255,255,255,.14); }

/* ---------- Split feature ---------- */
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: center; }
.split-media { border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg); }
.split-media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.split-list { display: flex; flex-direction: column; gap: 16px; }
.split-item { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.split-item .ic { flex: none; width: 40px; height: 40px; border-radius: 11px; background: var(--bg-tint); color: var(--brand-700); display: grid; place-items: center; }
.split-item .ic svg { width: 21px; height: 21px; }
.split-item h3 { font-size: 1.02rem; margin-bottom: 4px; }
.split-item p { font-size: .9rem; color: var(--muted); margin: 0; line-height: 1.6; }

/* ---------- Post cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card { display: flex; flex-direction: column; overflow: hidden; }
.post-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.post-card:hover .post-thumb img { transform: scale(1.05); }
.post-thumb .chip { position: absolute; top: 12px; left: 12px; z-index: 2; font-size: .74rem; font-weight: 700; background: rgba(255,255,255,.94); color: var(--teal-900); padding: 5px 11px; border-radius: var(--r-full); box-shadow: var(--shadow-sm); }
.post-body { padding: 20px 20px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-body h3 { font-size: 1.08rem; line-height: 1.42; margin: 0; }
.post-body h3 a { color: var(--ink); }
.post-body h3 a:hover { color: var(--brand-700); }
.post-body p { font-size: .9rem; color: var(--muted); margin: 0; line-height: 1.62; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted); margin-top: auto; }
.post-meta .tag { color: var(--brand-700); font-weight: 700; }
.post-meta time::before { content: ''; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); margin: 0 7px 3px; }

/* ---------- Dental search ---------- */
.dental-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 52px); align-items: start; }
.dental-info .data-card { border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg); margin-bottom: 20px; }
.data-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.search-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-md); padding: clamp(22px, 3vw, 32px); }
.search-title { font-size: 1.18rem; color: var(--teal-900); margin-bottom: 4px; font-weight: 800; }
.search-sub { font-size: .88rem; color: var(--muted); margin-bottom: 20px; }
.search-field { margin-bottom: 14px; }
.search-field label { display: block; font-size: .82rem; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.search-field select, .search-field input[type="text"] {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-md);
  font: inherit; font-size: .95rem; color: var(--ink); background: #fff; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2314675E' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
.search-field select:focus, .search-field input[type="text"]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,184,166,.16); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 7px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r-full); background: #fff;
  font-size: .86rem; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: all var(--dur) var(--ease);
}
.filter-chip:hover { border-color: var(--brand); }
.filter-chip.on { background: var(--teal-900); border-color: var(--teal-900); color: #fff; }
.geo-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 14px; border: 1px dashed var(--line-strong); border-radius: var(--r-full); background: var(--bg-soft); font: inherit; font-size: .86rem; font-weight: 600; color: var(--teal-900); cursor: pointer; }
.geo-btn:hover { border-color: var(--brand); background: var(--bg-tint); }
.geo-note { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.search-actions { display: flex; gap: 10px; margin-top: 6px; }

/* results */
.search-results { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; }
.results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.results-head b { color: var(--teal-900); font-size: .98rem; }
.results-head .note { font-size: .8rem; color: var(--muted); }
.result-list { display: flex; flex-direction: column; gap: 12px; }
.result-item { border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; background: #fff; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.result-item:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.result-item .r-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.result-item h4 { font-size: 1rem; margin: 0 0 4px; color: var(--teal-900); }
.result-item .r-cl { font-size: .74rem; font-weight: 700; color: var(--brand-700); background: var(--bg-tint); padding: 3px 9px; border-radius: var(--r-full); white-space: nowrap; }
.result-item .r-addr { font-size: .86rem; color: var(--muted); margin: 2px 0 6px; line-height: 1.5; }
.result-item .r-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--ink-2); }
.result-item .r-meta .dim { color: var(--muted); }
.result-item .r-btns { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.load-more { width: 100%; margin-top: 14px; }
.result-empty { text-align: center; padding: 32px 16px; color: var(--muted); font-size: .92rem; }
.result-empty svg { width: 40px; height: 40px; margin: 0 auto 10px; color: var(--line-strong); }
.spinner { display: none; width: 26px; height: 26px; margin: 18px auto; border: 3px solid var(--bg-tint); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
.spinner.show { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* detail modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(11,51,46,.5); backdrop-filter: blur(3px); display: none; align-items: flex-end; justify-content: center; padding: 20px; }
.modal-backdrop.open { display: flex; }
.modal { background: #fff; border-radius: var(--r-xl); width: 100%; max-width: 560px; max-height: 86vh; overflow: auto; padding: 26px; position: relative; animation: modalIn 260ms var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.modal .m-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1.1rem; color: var(--ink-2); display: grid; place-items: center; }
.modal h3 { font-size: 1.25rem; margin-bottom: 4px; }
.modal .m-cl { font-size: .78rem; color: var(--brand-700); font-weight: 700; margin-bottom: 14px; }
.hours-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin: 14px 0; }
.hours-day { text-align: center; border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 4px; }
.hours-day b { display: block; font-size: .78rem; color: var(--teal-900); margin-bottom: 4px; }
.hours-day span { font-size: .72rem; color: var(--muted); line-height: 1.4; display: block; }
.hours-day.holiday { background: var(--danger-bg); border-color: #F3D4CC; }
.hours-day.holiday span { color: var(--danger); }
.m-detail-row { display: flex; gap: 10px; font-size: .88rem; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.m-detail-row b { width: 96px; flex: none; color: var(--teal-900); font-size: .84rem; }
.m-detail-row span { color: var(--ink-2); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; overflow: hidden; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.faq-item.open { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; background: none; border: 0; font: inherit; font-weight: 700; font-size: 1rem; color: var(--ink); cursor: pointer; text-align: left; }
.faq-q .q-mark { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--bg-tint); color: var(--brand-700); display: grid; place-items: center; font-size: .85rem; transition: transform 240ms var(--ease); }
.faq-item.open .q-mark { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 300ms var(--ease); }
.faq-a-inner { padding: 0 22px 20px; color: var(--muted); font-size: .94rem; line-height: 1.75; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; border-radius: var(--r-xl); overflow: hidden; background: linear-gradient(130deg, var(--teal-950) 0%, var(--teal) 70%, var(--brand-600) 100%); color: #fff; padding: clamp(36px, 6vw, 64px); text-align: center; }
.cta-band::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 85% 15%, rgba(255,154,98,.28), transparent 45%); }
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 12px; }
.cta-band p { color: rgba(255,255,255,.82); max-width: 560px; margin: 0 auto 24px; }
.cta-band .btn { position: relative; }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-950); color: #B7CFC9; padding: clamp(48px, 6vw, 72px) 0 32px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand p { font-size: .88rem; line-height: 1.7; margin: 0; max-width: 320px; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer-col a { display: block; color: #B7CFC9; font-size: .9rem; padding: 4px 0; }
.footer-col a:hover { color: #fff; }
.legal-notice-footer {
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05);
  border-radius: var(--r-md); padding: 16px 18px; margin-bottom: 26px;
  font-size: .78rem; line-height: 1.7; color: #9FB9B2;
}
.legal-notice-footer b { color: #CBE4DE; display: block; margin-bottom: 4px; font-size: .8rem; }
.legal-notice-footer p { margin: 5px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 22px; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; font-size: .8rem; color: #8AA49D; }
.footer-bottom .links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-bottom a { color: #B7CFC9; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Article / single ---------- */
.article-hero { background: linear-gradient(180deg, var(--bg-soft), #fff); padding: clamp(36px, 5vw, 64px) 0 0; }
.article-head { max-width: var(--content-max); margin: 0 auto; }
.article-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.3; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--muted); font-size: .88rem; margin: 14px 0 0; }
.article-meta a.tag { color: var(--brand-700); font-weight: 700; }
.article-feature { margin-top: clamp(24px, 4vw, 40px); }
.article-feature img { width: 100%; max-width: 1080px; margin: 0 auto; border-radius: var(--r-xl); box-shadow: var(--shadow-md); aspect-ratio: 16/9; object-fit: cover; }
.article-body { max-width: var(--content-max); margin: 0 auto; padding: clamp(32px, 5vw, 56px) 0 clamp(40px, 6vw, 72px); }
.article-body .entry-content { font-size: 1.02rem; line-height: 1.8; }
.entry-content h2 { margin: 2.1em 0 .75em; padding-top: .4em; scroll-margin-top: calc(var(--header-h) + 16px); }
.entry-content h3 { margin: 1.8em 0 .6em; color: var(--teal-900); scroll-margin-top: calc(var(--header-h) + 16px); }
.entry-content h2 { border-bottom: 2px solid var(--bg-tint); padding-bottom: .35em; }
.entry-content p { margin-bottom: 1.25em; }
.entry-content img { border-radius: var(--r-lg); margin: 1.6em auto; box-shadow: var(--shadow-sm); }
.entry-content figure { margin: 1.8em 0; }
.entry-content figcaption { text-align: center; font-size: .8rem; color: var(--muted); margin-top: 10px; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(47,184,166,.5); }
.entry-content a:hover { text-decoration-color: var(--brand); }
.entry-content ul, .entry-content ol { margin-bottom: 1.4em; }
.entry-content li { margin-bottom: .55em; }

/* tables */
.entry-content table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.6em 0; font-size: .92rem; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.entry-content th { background: var(--teal-900); color: #fff; text-align: left; padding: 12px 14px; font-weight: 700; }
.entry-content td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.6; }
.entry-content tbody tr:nth-child(even) { background: var(--bg-soft); }
.entry-content tbody tr:hover { background: var(--bg-tint); }

/* callouts */
.entry-content .callout, .entry-content blockquote {
  margin: 1.8em 0; padding: 18px 20px 18px 46px; position: relative;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-soft);
  color: var(--ink-2); line-height: 1.7;
}
.entry-content .callout::before {
  content: ''; position: absolute; left: 16px; top: 20px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat;
}
.entry-content .callout.warn { background: var(--warn-bg); border-color: #F0DFC0; }
.entry-content .callout.warn::before { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 9v4m0 4h.01M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z'/%3E%3C/svg%3E") center/16px no-repeat; }
.entry-content .callout.danger { background: var(--danger-bg); border-color: #F1CFC6; }
.entry-content .callout.danger::before { background: var(--danger) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center/12px no-repeat; }
.entry-content blockquote { border-left: 4px solid var(--brand); background: var(--bg-soft); padding-left: 22px; }
.entry-content blockquote p { margin: 0; }

/* summary box */
.entry-content .summary-box {
  background: linear-gradient(160deg, var(--teal-900), var(--teal)); color: #fff;
  border-radius: var(--r-lg); padding: 22px 24px; margin: 0 0 2em;
}
.entry-content .summary-box b { display: block; color: #FFD9C2; font-size: .85rem; letter-spacing: .04em; margin-bottom: 8px; }
.entry-content .summary-box ul { margin: 0; padding-left: 1.15em; color: rgba(255,255,255,.94); font-size: .96rem; }
.entry-content .summary-box li { margin-bottom: .4em; }

/* inline chart (timeline blocks in posts) */
.chart-block { margin: 1.8em 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.chart-block .chart-title { font-size: .88rem; font-weight: 800; color: var(--teal-900); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.chart-block .chart-title::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

/* TOC */
.toc-box { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; margin: 0 0 2.2em; box-shadow: var(--shadow-sm); }
.toc-box b { display: block; font-size: .9rem; color: var(--teal-900); margin-bottom: 12px; }
.toc-box ol { margin: 0; padding-left: 1.25em; display: flex; flex-direction: column; gap: 7px; }
.toc-box a { font-size: .92rem; color: var(--ink-2); text-decoration: none; }
.toc-box a:hover { color: var(--brand-700); }

/* legal / ai notices */
.entry-content .legal-notice, .entry-content .ai-notice, .entry-content .affiliate-notice { font-size: .85em; }
.entry-content .legal-notice { color: #777; background: #f8f9fa; border-left: 3px solid #cbd5e1; padding: 10px 14px; margin-top: 2em; border-radius: 0 6px 6px 0; }
.entry-content .legal-notice p { margin: 4px 0; }
.entry-content .ai-notice { color: #888; margin-top: 2em; }

/* related posts */
.related-posts { max-width: var(--content-max); margin: 0 auto; padding: 0 0 clamp(48px, 6vw, 80px); }
.related-posts h2 { font-size: 1.35rem; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post-nav { max-width: var(--content-max); margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; padding-bottom: clamp(40px, 5vw, 64px); }
.post-nav a { font-size: .9rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: var(--r-full); padding: 10px 18px; }
.post-nav a:hover { color: var(--brand-700); border-color: var(--brand); }

/* ---------- Page (terms/privacy) ---------- */
.page-hero { background: linear-gradient(180deg, var(--bg-soft), #fff); padding: clamp(40px, 6vw, 72px) 0 0; }
.page-head { max-width: 820px; margin: 0 auto; }
.page-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.page-body { max-width: 820px; margin: 0 auto; padding: clamp(28px, 4vw, 48px) 0 clamp(48px, 6vw, 80px); }
.page-body h2 { font-size: 1.3rem; margin-top: 2em; }
.page-body h3 { font-size: 1.08rem; color: var(--teal-900); }
.page-body p { line-height: 1.8; }

/* ---------- Archive / list ---------- */
.archive-head { padding: clamp(40px, 6vw, 72px) 0 0; background: linear-gradient(180deg, var(--bg-soft), #fff); }
.archive-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
.archive-layout { padding: clamp(28px, 4vw, 48px) 0 clamp(56px, 7vw, 96px); }

/* ---------- Misc ---------- */
.breadcrumb { font-size: .82rem; color: var(--muted); margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand-700); }
.breadcrumb .sep { color: var(--line-strong); }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--teal-900); color: #fff; padding: 10px 18px; border-radius: 0 0 12px 0; z-index: 200; }
.skip-link:focus { left: 0; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 50; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-md); color: var(--teal-900); cursor: pointer; display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .guide-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 620px; }
  .stage-grid { grid-template-columns: 1fr; }
  .split-grid, .dental-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 55;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
    flex-direction: column; align-items: stretch; gap: 2px; padding: 14px 18px 20px;
    transform: translateY(-110%); transition: transform 260ms var(--ease);
  }
  .main-nav.open { transform: none; }
  .main-nav a { padding: 13px 12px; font-size: 1rem; border-radius: var(--r-md); }
  .header-cta { margin-left: 0; }
  .nav-toggle { display: inline-flex; }
  .guide-grid, .post-grid, .related-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .timeline-track { grid-template-columns: 1fr 1fr; gap: 24px 12px; }
  .timeline-track::before { display: none; }
  .tl-node { padding-top: 46px; }
  .row-2 { grid-template-columns: 1fr; }
  .hero-stats { gap: 14px 20px; }
  .hours-grid { grid-template-columns: repeat(4, 1fr); }
  .bar-row { grid-template-columns: 104px 1fr 40px; gap: 8px; }
  .btn { width: 100%; }
  .hero-actions .btn { width: auto; flex: 1 1 45%; }
  .cta-band .btn { width: auto; }
  .article-body .entry-content { font-size: 1rem; }
  .entry-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .modal-backdrop { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
