/* ==========================================================================
   EVARCell Pain Care — Patient-facing site (B2C)
   Warm, calming coral→plum theme. 통증케어 전용.
   원칙: '진단'·'치료 적합'·'완치'·'재발 없음'을 시스템 결과로 표시하지 않는다.
   ========================================================================== */

:root {
  --plum: #2c1b3d;
  --ink: #241633;
  --slate: #5c5069;
  --muted: #857a90;
  --line: #efe9f2;
  --line-2: #f6f2f8;
  --bg: #ffffff;
  --bg-soft: #faf7fb;
  --bg-warm: #fdf6f2;

  --coral: #e8663f;
  --coral-2: #d4552f;
  --peach: #f39a6b;
  --plum-accent: #7c4dc4;
  --violet: #9a6ad6;
  --teal: #17a2a2;

  /* Safety triage tokens */
  --red: #d63a3a;
  --red-bg: #fdeaea;
  --amber: #d98a15;
  --amber-bg: #fdf3e0;
  --green: #1c9d6e;
  --green-bg: #e7f6ee;
  --gray: #6b7280;
  --gray-bg: #f1f2f4;

  --grad-hero: linear-gradient(135deg, #2c1b3d 0%, #6a3b8f 52%, #d4552f 100%);
  --grad-accent: linear-gradient(135deg, #e8663f 0%, #7c4dc4 100%);
  --grad-warm: linear-gradient(135deg, #f39a6b 0%, #9a6ad6 100%);

  --shadow-sm: 0 1px 2px rgba(44, 27, 61, .06), 0 2px 6px rgba(44, 27, 61, .05);
  --shadow-md: 0 12px 34px rgba(44, 27, 61, .1);
  --shadow-lg: 0 26px 64px rgba(44, 27, 61, .18);

  --radius: 18px;
  --radius-sm: 13px;
  --radius-lg: 26px;
  --maxw: 1160px;
  --nav-h: 74px;

  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, .58);
  --ring: 0 0 0 3px rgba(232, 102, 63, .2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.7; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  background:
    radial-gradient(760px 500px at 90% -8%, rgba(232,102,63,.06), transparent 60%),
    radial-gradient(700px 480px at -6% 4%, rgba(124,77,196,.05), transparent 60%),
    var(--bg);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -0.02em; margin: 0; color: var(--ink); }
p { margin: 0; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.grad-text {
  background: linear-gradient(100deg, #e8663f 0%, #9a6ad6 60%, #2c1b3d 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  /* 브랜드 톤(coral→plum) 옅은 틴트 + 불투명 흰색 베이스.
     반투명 흰색만 쓰면 스크롤 시 뒤 콘텐츠가 비쳐 글자가 읽히지 않는다. */
  background:
    linear-gradient(90deg, rgba(232,102,63,.07) 0%, rgba(124,77,196,.05) 52%, rgba(232,102,63,.07) 100%),
    linear-gradient(180deg, #ffffff 0%, #fdf9fb 100%);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid #f0e6f0;
  box-shadow: 0 1px 3px rgba(44,27,61,.05);
}
/* 아래로 스크롤하면 살짝 진해지며 경계가 또렷해진다 (components.js 가 클래스 토글) */
.nav.is-stuck {
  background:
    linear-gradient(90deg, rgba(232,102,63,.1) 0%, rgba(124,77,196,.07) 52%, rgba(232,102,63,.1) 100%),
    linear-gradient(180deg, #ffffff 0%, #faf4f8 100%);
  border-bottom-color: #e6d8e6;
  box-shadow: 0 6px 20px rgba(44,27,61,.09);
}
/* 자식이 4개(브랜드·메뉴·언어·햄버거)라 space-between 으로는 균등 분산돼 버린다.
   브랜드에 margin-right:auto 를 주어 나머지를 오른쪽으로 묶는다. */
.nav__inner { max-width: var(--maxw); margin: 0 auto; height: 100%; display: flex; align-items: center; gap: 4px; padding: 0 24px; }
.nav__inner > .brand { margin-right: auto; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; transition: transform .25s var(--ease); }
.brand:hover { transform: translateY(-1px); }
.brand:hover .brand__mark { box-shadow: 0 8px 22px rgba(232,102,63,.55); transform: rotate(-4deg) scale(1.05); }
.brand__mark { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; filter: drop-shadow(0 6px 16px rgba(232,102,63,.35)); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.brand__name { font-size: 18px; color: var(--plum); font-weight: 600; letter-spacing: -0.01em; }
.brand__name b { font-weight: 800; color: var(--coral-2); }
.brand__name small { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; color: var(--coral-2); text-transform: uppercase; }
.nav__menu { display: flex; align-items: center; gap: 4px; }
.nav__menu a { padding: 9px 13px; border-radius: 10px; font-size: 14.5px; font-weight: 600; color: var(--slate); transition: all .16s ease; position: relative; }
.nav__menu a:not(.nav__cta):hover { color: var(--plum); background: var(--bg-soft); }
.nav__menu a.active:not(.nav__cta) { color: var(--coral-2); background: rgba(232,102,63,.1); }
.nav__menu a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 4px; height: 2px; border-radius: 2px;
  background: var(--grad-accent); transform: scaleX(0); transform-origin: left; transition: transform .28s var(--ease);
}
.nav__menu a:not(.nav__cta):hover::after, .nav__menu a.active:not(.nav__cta)::after { transform: scaleX(1); }
.nav__cta { padding: 10px 20px !important; border-radius: 999px; color: #fff !important; background: var(--grad-accent); font-weight: 700 !important; box-shadow: 0 8px 20px rgba(232,102,63,.32); overflow: hidden; }
.nav__cta::after { content: ""; position: absolute; top: 0; left: -80%; width: 60%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent); transform: skewX(-20deg); transition: left .55s var(--ease); }
.nav__cta:hover::after { left: 130%; }
.nav__cta:hover { transform: translateY(-1px); filter: brightness(1.05); }
.nav__burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__burger span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

/* ---------- 언어 스위처 (KO / EN / ZH) ---------- */
.langsw {
  display: inline-flex; align-items: center; gap: 2px; margin-left: 10px; padding: 3px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg-soft);
}
.langsw__btn {
  appearance: none; border: 0; cursor: pointer; padding: 6px 11px; border-radius: 999px;
  font-family: var(--font); font-size: 12.5px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--muted); background: transparent; transition: color .16s ease, background .16s ease;
  white-space: nowrap; line-height: 1.2;
}
.langsw__btn:hover { color: var(--plum); background: #fff; }
.langsw__btn.active { color: #fff; background: var(--grad-accent); box-shadow: 0 4px 12px rgba(232,102,63,.28); }
.langsw__btn:focus-visible { outline: none; box-shadow: var(--ring); }
/* 모바일에서도 언어 스위처는 드롭다운 안이 아니라 햄버거 버튼 왼쪽에 그대로 노출한다.
   대신 라벨을 짧게(KO / EN / 中) 바꿔 로고·버튼과 한 줄에 들어가게 한다.
   짧은 라벨은 components.js 가 넣어 주는 data-short 속성에서 가져온다. */
@media (max-width: 720px) {
  .langsw { margin-left: 0; padding: 2px; gap: 0; flex-shrink: 0; }
  .langsw__btn { font-size: 0; padding: 7px 9px; }
  .langsw__btn::before { content: attr(data-short); font-size: 12.5px; font-weight: 700; }
}
@media (max-width: 560px) {
  .nav__inner { padding: 0 14px; }
  .brand__name { font-size: 16px; }
  .brand__name small { display: none; }
  .brand__mark { width: 32px; height: 32px; flex: 0 0 32px; }
}

/* 중국어·영어는 자간 규칙이 달라 제목 줄바꿈을 언어별로 조정한다 */
html[data-lang="en"] .hero h1 { max-width: 24ch; }
html[data-lang="zh"] .hero h1 { max-width: 17ch; letter-spacing: 0; }
html[data-lang="zh"] h1, html[data-lang="zh"] h2, html[data-lang="zh"] h3, html[data-lang="zh"] h4 { letter-spacing: 0; }
html[data-lang="zh"] body { word-break: normal; line-break: strict; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--grad-hero); color: #fff; padding: 104px 0 116px; }
.hero::before {
  content: ""; position: absolute; inset: -12px;
  background-image: url("https://images.unsplash.com/photo-1600334129128-685c5582fd35?auto=format&fit=crop&w=1600&q=80");
  background-size: cover; background-position: center; filter: blur(2px) saturate(1.05); opacity: .3; transform: scale(1.03); z-index: 0;
  transition: transform 1.2s var(--ease), opacity .6s ease;
}
.hero:hover::before { transform: scale(1.07); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(100deg, rgba(44,27,61,.88) 0%, rgba(106,59,143,.6) 52%, rgba(212,85,47,.36) 100%); }
.hero .container { position: relative; z-index: 1; }
.hero__badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 700; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.24); color: #ffe6d6; margin-bottom: 22px; }
.hero h1 { font-size: clamp(32px, 5.2vw, 56px); font-weight: 800; color: #fff; max-width: 19ch; }
.hero__lead { margin-top: 22px; font-size: clamp(16px, 2vw, 20px); color: #f0e2f2; max-width: 54ch; }
.hero__actions { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero__trust { margin-top: 30px; display: flex; gap: 22px; flex-wrap: wrap; color: #e8d8ec; font-size: 14px; }
.hero__trust span { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 15px 28px; border-radius: 999px; font-weight: 700; font-size: 15.5px; cursor: pointer; border: 1px solid transparent; transition: all .18s ease; position: relative; overflow: hidden; will-change: transform; font-family: inherit; }
.btn::before { content: ""; position: absolute; top: 0; left: -85%; width: 55%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-20deg); transition: left .6s var(--ease); pointer-events: none; }
.btn:hover::before { left: 135%; }
.btn:active { transform: translateY(0) scale(.985); }
.btn--primary { background: var(--grad-accent); color: #fff; box-shadow: 0 12px 30px rgba(232,102,63,.42); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(232,102,63,.52); }
.btn--ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.3); }
.btn--ghost:hover { background: rgba(255,255,255,.18); }
.btn--outline { background: #fff; color: var(--coral-2); border-color: var(--line); }
.btn--outline:hover { border-color: var(--coral); box-shadow: 0 10px 26px rgba(232,102,63,.2); transform: translateY(-2px); }
.btn--white { background: #fff; color: var(--coral-2); }
.btn--white:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--lg { padding: 17px 34px; font-size: 16.5px; }
.btn--block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn[disabled]:hover { transform: none; box-shadow: none; }

/* ---------- Sections ---------- */
.section { padding: 90px 0; }
.section--soft { background: var(--bg-soft); }
.section--warm { background: var(--bg-warm); }
.section--plum { background: var(--grad-hero); color: #fff; position: relative; }
.section--plum h2, .section--plum h3 { color: #fff; }
.section__head { max-width: 760px; margin: 0 auto 54px; text-align: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--coral-2); margin-bottom: 14px; }
.section h2 { font-size: clamp(27px, 3.5vw, 40px); font-weight: 800; }
.section__sub { margin-top: 16px; font-size: 17.5px; color: var(--slate); }
.section--plum .section__sub { color: #f0e2f2; }

/* ---------- Grid / Cards ---------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; transition: transform .32s var(--ease), box-shadow .32s var(--ease), border-color .32s var(--ease); }
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad-accent); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card__icon { width: 56px; height: 56px; border-radius: 15px; display: grid; place-items: center; font-size: 25px; margin-bottom: 18px; background: rgba(232,102,63,.1); color: var(--coral-2); transition: transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease); }
.card:hover .card__icon { transform: translateY(-2px) scale(1.08); background: var(--grad-accent); color: #fff; box-shadow: 0 10px 24px rgba(232,102,63,.42); }
.card h3 { font-size: 19px; font-weight: 800; margin-bottom: 10px; }
.card p { color: var(--slate); font-size: 15px; }

/* Info card w/ image */
.tcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); position: relative; transition: all .2s ease; }
.tcard:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.tcard__img { height: 190px; background-size: cover; background-position: center; transition: transform .55s var(--ease); }
.tcard:hover .tcard__img { transform: scale(1.07); }
.tcard::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad-accent); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); z-index: 2; }
.tcard:hover::after { transform: scaleX(1); }
.tcard__body { padding: 26px 28px 30px; }
.tcard__body h3 { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.tcard__body p { color: var(--slate); font-size: 15px; }
.tcard__tag { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .06em; padding: 5px 12px; border-radius: 999px; background: rgba(232,102,63,.1); color: var(--coral-2); margin-bottom: 12px; transition: all .25s var(--ease); }
.tcard:hover .tcard__tag { background: var(--grad-accent); color: #fff; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step { text-align: center; position: relative; transition: transform .3s var(--ease); }
.step:hover { transform: translateY(-4px); }
.step__no { width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; font-size: 22px; font-weight: 800; color: #fff; background: var(--grad-accent); box-shadow: 0 10px 24px rgba(232,102,63,.35); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.step:hover .step__no { transform: rotate(-5deg) scale(1.1); box-shadow: 0 14px 30px rgba(232,102,63,.5); }
.step h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.step p { color: var(--slate); font-size: 14px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; transition: transform .3s var(--ease); }
.stat:hover { transform: translateY(-4px); }
.stat__num { font-size: clamp(30px, 4vw, 44px); font-weight: 800; color: var(--coral-2); letter-spacing: -0.03em; }
.section--plum .stat__num { color: #ffb894; }
.stat__label { margin-top: 6px; font-size: 14.5px; color: var(--slate); font-weight: 600; }
.section--plum .stat__label { color: #f0e2f2; }

/* ---------- Testimonials ---------- */
.quote { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; transition: transform .32s var(--ease), box-shadow .32s var(--ease), border-color .32s var(--ease); }
.quote::before { content: "\201C"; position: absolute; top: -18px; right: 14px; font-size: 90px; color: rgba(232,102,63,.08); font-family: Georgia, serif; line-height: 1; transition: color .3s ease; }
.quote:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }
.quote:hover::before { color: rgba(232,102,63,.16); }
.quote__stars { color: #f5b301; font-size: 16px; margin-bottom: 12px; letter-spacing: 2px; }
.quote p { color: var(--ink); font-size: 15.5px; font-style: italic; }
.quote__who { margin-top: 18px; font-size: 14px; color: var(--muted); font-weight: 600; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq__item { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 14px; overflow: hidden; background: #fff; transition: box-shadow .25s ease, border-color .25s ease; }
.faq__item:hover { box-shadow: var(--shadow-sm); border-color: #f0d9cf; }
.faq__q { width: 100%; text-align: left; background: none; border: 0; padding: 20px 24px; font-size: 16.5px; font-weight: 700; color: var(--ink); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-family: inherit; }
.faq__q:hover { color: var(--coral-2); }
.faq__q::after { content: "+"; font-size: 22px; color: var(--coral); font-weight: 400; transition: transform .2s; }
.faq__item.open .faq__q::after { transform: rotate(45deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.faq__a p { padding: 0 24px 22px; color: var(--slate); font-size: 15px; }
.faq__item.open .faq__a { max-height: 420px; }

/* ---------- Callout / CTA ---------- */
.cta-band { background: var(--grad-hero); color: #fff; border-radius: var(--radius-lg); padding: 60px; text-align: center; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; inset: 0; background: radial-gradient(500px 260px at 85% 15%, rgba(232,102,63,.4), transparent 60%); }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; font-size: clamp(25px, 3.4vw, 36px); }
.cta-band p { color: #f0e2f2; margin-top: 14px; font-size: 17.5px; }
.cta-band .btn { margin-top: 30px; }
.cta-band .btn:hover { transform: translateY(-3px); }

/* ---------- Page hero (interior) ---------- */
.page-hero { position: relative; overflow: hidden; background: var(--grad-hero); color: #fff; padding: 82px 0 72px; }
.page-hero::before { content: ""; position: absolute; inset: -12px; background-image: url("https://images.unsplash.com/photo-1600334129128-685c5582fd35?auto=format&fit=crop&w=1600&q=80"); background-size: cover; background-position: center; filter: blur(2px) saturate(1.05); opacity: .28; transform: scale(1.03); z-index: 0; transition: transform 1.2s var(--ease); }
.page-hero:hover::before { transform: scale(1.07); }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(100deg, rgba(44,27,61,.9) 0%, rgba(106,59,143,.62) 52%, rgba(212,85,47,.36) 100%); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(29px, 4.5vw, 46px); font-weight: 800; color: #fff; }
.page-hero p { margin-top: 16px; color: #f0e2f2; font-size: 18px; max-width: 60ch; }
.breadcrumb { font-size: 13.5px; color: #d8bfe0; margin-bottom: 16px; font-weight: 600; }
.breadcrumb a:hover { color: #fff; }
.page-hero--pain::before { background-image: url("https://images.unsplash.com/photo-1571019614242-c5c5dee9f50b?auto=format&fit=crop&w=1600&q=80"); }
.page-hero--program::before { background-image: url("https://images.unsplash.com/photo-1587351021759-3e566b6af7cc?auto=format&fit=crop&w=1600&q=80"); }
.page-hero--process::before { background-image: url("https://images.unsplash.com/photo-1516841273335-e39b37888115?auto=format&fit=crop&w=1600&q=80"); }
.page-hero--about::before { background-image: url("https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?auto=format&fit=crop&w=1600&q=80"); }
.page-hero--faq::before { background-image: url("https://images.unsplash.com/photo-1519494026892-80bbd2d6fd0d?auto=format&fit=crop&w=1600&q=80"); }

/* ---------- Callout ---------- */
.callout { border-left: 4px solid var(--coral); background: var(--bg-warm); border-radius: 0 14px 14px 0; padding: 24px 28px; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.callout:hover { transform: translateX(3px); box-shadow: var(--shadow-sm); }
.callout strong { color: var(--plum); }
.callout--info { border-left-color: var(--plum-accent); }
.callout p + p { margin-top: 8px; }

/* Safety / disclaimer notice — 의료 경계 고지 */
.notice { display: flex; gap: 14px; align-items: flex-start; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 22px; font-size: 14.5px; color: var(--slate); }
.notice__ico { flex: 0 0 auto; font-size: 20px; line-height: 1.4; }
.notice strong { color: var(--plum); }
.notice--warn { background: var(--amber-bg); border-color: #f0d9a8; color: #8a5b0a; }
.notice--warn strong { color: #8a5b0a; }
.notice--danger { background: var(--red-bg); border-color: #f3c2c2; color: #a02525; }
.notice--danger strong { color: #a02525; }

/* ---------- Form ---------- */
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-md); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 700; color: var(--plum); margin-bottom: 7px; }
.field label .req { color: var(--coral-2); }
.field input, .field select, .field textarea { width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; font-family: inherit; font-size: 15px; color: var(--ink); background: #fff; transition: border-color .18s ease, box-shadow .18s ease; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #f0d9cf; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 3px rgba(232,102,63,.12); }
.field textarea { min-height: 120px; resize: vertical; }
.dur-row { display: flex; gap: 12px; }
.dur-cell { position: relative; flex: 1; display: flex; align-items: center; }
.dur-cell input { padding-right: 46px; -moz-appearance: textfield; }
.dur-cell input::-webkit-outer-spin-button, .dur-cell input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dur-unit { position: absolute; right: 15px; color: var(--muted); font-size: 14px; pointer-events: none; }
.field--check { display: flex; align-items: flex-start; gap: 10px; }
.field--check input { width: auto; margin-top: 4px; }
.field--check label { font-weight: 500; color: var(--slate); font-size: 13.5px; margin-bottom: 0; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.field .err { font-size: 12.5px; color: var(--red); margin-top: 6px; display: none; }
.field.has-error input, .field.has-error select { border-color: var(--red); }
.field.has-error .err { display: block; }

/* ==========================================================================
   PAIN ASSESSMENT — 무료 통증상태 분석 문진 위저드
   ========================================================================== */
.wizard { max-width: 860px; margin: 0 auto; }
.wiz-progress { margin-bottom: 34px; }
.wiz-progress__bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.wiz-progress__fill { height: 100%; background: var(--grad-accent); border-radius: 999px; width: 0; transition: width .4s var(--ease); }
.wiz-progress__meta { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--slate); }
.wiz-progress__save { color: var(--green); font-weight: 600; }
.wiz-steps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.wiz-steps span { font-size: 11.5px; padding: 4px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--muted); font-weight: 600; border: 1px solid var(--line); }
.wiz-steps span.done { background: rgba(28,157,110,.12); color: var(--green); border-color: transparent; }
.wiz-steps span.current { background: var(--grad-accent); color: #fff; border-color: transparent; }

.wiz-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-md); }
.wiz-card__eyebrow { font-size: 12.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--coral-2); }
.wiz-card h2 { font-size: 25px; font-weight: 800; margin: 8px 0 6px; }
.wiz-card__desc { color: var(--slate); font-size: 15px; margin-bottom: 26px; }
.wiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; }
.wiz-nav .btn { min-width: 120px; justify-content: center; }

/* Body map */
.bodymap { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.bodymap__side { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; background: var(--bg-soft); }
.bodymap__side h4 { font-size: 14px; color: var(--slate); margin-bottom: 10px; font-weight: 700; }
.bodymap svg { width: 100%; height: auto; max-height: 360px; }
.bm-region { fill: #e9dfef; stroke: #cbb9d8; stroke-width: 1; cursor: pointer; transition: fill .15s ease; }
.bm-region:hover { fill: #f3a983; }
.bm-region.sel { fill: var(--coral); stroke: var(--coral-2); }
.bm-legend { display: flex; gap: 16px; justify-content: center; margin-top: 14px; font-size: 13px; color: var(--slate); flex-wrap: wrap; }
.bm-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; }
.selected-regions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(232,102,63,.1); color: var(--coral-2); font-size: 13.5px; font-weight: 700; border: 1px solid rgba(232,102,63,.2); }
.chip button { border: 0; background: none; color: var(--coral-2); cursor: pointer; font-size: 15px; line-height: 1; padding: 0; }
.chip.primary { background: var(--grad-accent); color: #fff; border-color: transparent; }
.chip.primary button { color: #fff; }

/* Option pills / choices */
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.opt { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; transition: all .16s ease; font-size: 14.5px; font-weight: 600; color: var(--ink); background: #fff; }
.opt:hover { border-color: var(--coral); background: var(--bg-warm); }
.opt input { accent-color: var(--coral); width: 18px; height: 18px; }
.opt.sel { border-color: var(--coral); background: rgba(232,102,63,.08); color: var(--coral-2); }

/* NRS scale */
.nrs { margin: 10px 0 4px; }
.nrs__label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.nrs__row { display: flex; gap: 6px; flex-wrap: wrap; }
.nrs__btn { flex: 1; min-width: 34px; padding: 12px 0; text-align: center; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 700; font-size: 15px; background: #fff; transition: all .14s ease; }
.nrs__btn:hover { border-color: var(--coral); }
.nrs__btn.sel { background: var(--grad-accent); color: #fff; border-color: transparent; }
.nrs-title { font-size: 15px; font-weight: 700; color: var(--plum); margin: 22px 0 4px; }

/* Safety questions */
.safety-q { border: 1px solid var(--line); border-radius: 13px; padding: 16px 18px; margin-bottom: 12px; }
.safety-q__text { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.safety-q__opts { display: flex; gap: 10px; }
.safety-q__opts label { flex: 1; text-align: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 700; transition: all .14s ease; }
.safety-q__opts input { display: none; }
.safety-q__opts input:checked + span { color: #fff; }
.safety-q__opts label:has(input[value="yes"]:checked) { background: var(--red); border-color: var(--red); color: #fff; }
.safety-q__opts label:has(input[value="no"]:checked) { background: var(--green); border-color: var(--green); color: #fff; }
.safety-q__opts label:has(input[value="unsure"]:checked) { background: var(--gray); border-color: var(--gray); color: #fff; }

/* Triage result badges */
.triage { border-radius: var(--radius); padding: 26px 28px; margin-bottom: 24px; border: 1px solid; }
.triage__badge { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; margin-bottom: 14px; }
.triage h3 { font-size: 21px; margin-bottom: 8px; }
.triage p { font-size: 15px; }
.triage--red { background: var(--red-bg); border-color: #f3c2c2; }
.triage--red .triage__badge { background: var(--red); color: #fff; }
.triage--red h3 { color: #a02525; }
.triage--amber { background: var(--amber-bg); border-color: #f0d9a8; }
.triage--amber .triage__badge { background: var(--amber); color: #fff; }
.triage--amber h3 { color: #8a5b0a; }
.triage--green { background: var(--green-bg); border-color: #b7e4cd; }
.triage--green .triage__badge { background: var(--green); color: #fff; }
.triage--green h3 { color: #147a54; }
.triage--gray { background: var(--gray-bg); border-color: #dfe2e7; }
.triage--gray .triage__badge { background: var(--gray); color: #fff; }
.triage--gray h3 { color: #4b5563; }

/* Summary review list */
.summary-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.summary-row { display: flex; padding: 14px 20px; border-bottom: 1px solid var(--line-2); font-size: 14.5px; }
.summary-row:last-child { border-bottom: 0; }
.summary-row__k { flex: 0 0 190px; color: var(--muted); font-weight: 600; }
.summary-row__v { color: var(--ink); font-weight: 600; }

/* ==========================================================================
   MY CARE — 나의 케어 대시보드
   ========================================================================== */
.care-grid { display: grid; grid-template-columns: 260px 1fr; gap: 26px; align-items: start; }
.care-side { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow-sm); position: sticky; top: 90px; }
.care-side a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 11px; color: var(--slate); font-weight: 600; font-size: 14.5px; transition: all .15s ease; }
.care-side a:hover { background: var(--bg-soft); color: var(--plum); }
.care-side a.active { background: rgba(232,102,63,.1); color: var(--coral-2); }
.care-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.care-panel h2 { font-size: 22px; margin-bottom: 18px; }
.progress-track { display: flex; flex-wrap: wrap; gap: 0; margin: 6px 0 30px; }
.pt-node { flex: 1; min-width: 90px; text-align: center; position: relative; padding-top: 40px; }
.pt-node::before { content: ""; position: absolute; top: 14px; left: 0; right: 0; height: 3px; background: var(--line); z-index: 0; }
.pt-node:first-child::before { left: 50%; }
.pt-node:last-child::before { right: 50%; }
.pt-node__dot { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--line); z-index: 1; }
.pt-node.done .pt-node__dot { background: var(--green); border-color: var(--green); }
.pt-node.current .pt-node__dot { background: var(--coral); border-color: var(--coral); box-shadow: 0 0 0 5px rgba(232,102,63,.18); }
.pt-node.done::before, .pt-node.current::before { background: var(--green); }
.pt-node span { font-size: 12.5px; font-weight: 700; color: var(--slate); }
.pt-node.current span { color: var(--coral-2); }

.todo { list-style: none; padding: 0; margin: 0; }
.todo li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; font-size: 14.5px; }
.todo li .ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: rgba(232,102,63,.1); color: var(--coral-2); flex: 0 0 auto; }
.todo li.done { opacity: .6; }
.todo li.done .ico { background: var(--green-bg); color: var(--green); }
.todo li .meta { margin-left: auto; font-size: 12.5px; color: var(--muted); font-weight: 600; }

.doc-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; font-size: 14.5px; }
.doc-item .tag { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; font-weight: 700; margin-left: auto; }
.tag--ok { background: var(--green-bg); color: var(--green); }
.tag--wait { background: var(--amber-bg); color: var(--amber); }

/* Trend chart (SVG) */
.trend { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.trend svg { width: 100%; height: auto; }

/* ---------- AI Talk widget ---------- */
.aitalk { position: fixed; right: 22px; bottom: 22px; z-index: 900; }
.aitalk__btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; border: 0; cursor: pointer; background: var(--grad-accent); color: #fff; font-weight: 700; font-size: 15px; font-family: inherit; box-shadow: 0 14px 34px rgba(232,102,63,.45); transition: transform .18s; position: relative; overflow: hidden; }
.aitalk__btn::before { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(232,102,63,.5); animation: aiPulse 2.6s var(--ease) infinite; }
@keyframes aiPulse { 0% { box-shadow: 0 0 0 0 rgba(232,102,63,.45); } 70% { box-shadow: 0 0 0 14px rgba(232,102,63,0); } 100% { box-shadow: 0 0 0 0 rgba(232,102,63,0); } }
.aitalk__btn:hover { transform: translateY(-2px) scale(1.03); }
.aitalk__panel { position: fixed; right: 22px; bottom: 86px; width: min(92vw, 370px); background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; display: none; z-index: 901; }
.aitalk__panel.open { display: block; }
.aitalk__head { background: var(--grad-hero); color: #fff; padding: 18px 20px; }
.aitalk__head h4 { color: #fff; font-size: 16px; margin: 0; }
.aitalk__head p { color: #f0e2f2; font-size: 12.5px; margin-top: 3px; }
.aitalk__body { padding: 18px 18px 8px; max-height: 340px; overflow-y: auto; background: var(--bg-soft); }
.aitalk__msg { margin-bottom: 12px; display: flex; }
.aitalk__msg .b { max-width: 84%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.55; }
.aitalk__msg.bot .b { background: #fff; border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 4px; }
.aitalk__msg.me { justify-content: flex-end; }
.aitalk__msg.me .b { background: var(--coral); color: #fff; border-bottom-right-radius: 4px; }
.aitalk__msg.alert .b { background: var(--red-bg); border: 1px solid #f3c2c2; color: #a02525; font-weight: 600; }
.aitalk__quick { padding: 6px 14px 14px; display: flex; flex-wrap: wrap; gap: 7px; background: var(--bg-soft); }
.aitalk__quick button { font-size: 12.5px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--coral-2); cursor: pointer; font-family: inherit; font-weight: 600; transition: all .22s var(--ease); }
.aitalk__quick button:hover { background: var(--grad-accent); color: #fff; border-color: transparent; transform: translateY(-1px); }
.aitalk__input { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); background: #fff; box-sizing: border-box; }
/* min-width:0 필수 — input의 기본 내재폭(약 170px) 때문에 flex가 줄지 않아 모바일에서 전송 버튼이 패널 밖으로 밀려 잘렸음 */
.aitalk__input input { flex: 1 1 auto; min-width: 0; width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-family: inherit; box-sizing: border-box; }
.aitalk__input input:focus { outline: none; border-color: var(--coral); }
.aitalk__input button { flex: 0 0 auto; white-space: nowrap; border: 0; border-radius: 999px; padding: 11px 18px; background: var(--grad-accent); color: #fff; font-weight: 700; font-size: 14px; font-family: inherit; cursor: pointer; }
.aitalk__disc { font-size: 11px; color: var(--muted); text-align: center; padding: 0 14px 12px; background: #fff; }

/* ---------- Footer ---------- */
.footer { background: var(--plum); color: #cbb9d8; padding: 66px 0 32px; }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.2fr; gap: 36px; padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer__brand .brand__name { color: #fff; }
.footer__brand .brand__name b { color: #ffb894; }
.footer__brand .brand__name small { color: #e3b7f0; }
.footer__brand p { margin-top: 16px; color: #d7c8e0; font-size: 14px; max-width: 36ch; }
.footer__col h4 { color: #fff; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 18px; }
.footer__col a { display: block; color: #d7c8e0; font-size: 14.5px; padding: 6px 0; transition: color .2s ease, padding-left .25s var(--ease); position: relative; }
.footer__col a:hover { color: #ffb894; padding-left: 8px; }
.footer__col a::before { content: ""; position: absolute; left: 0; top: 50%; width: 0; height: 1.5px; background: var(--peach); transform: translateY(-50%); transition: width .25s var(--ease); }
.footer__col a:hover::before { width: 5px; }
/* 함께 운영하는 사이트 링크 줄 */
/* 오른쪽 정렬 — 본문 링크 목록과 구분되는 부가 정보 줄이므로 끝으로 몰아 둔다.
   좁은 화면에서 줄바꿈되면 각 줄도 오른쪽에 맞춰진다. */
.footer__sites { margin-top: 26px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 9px 16px; }
.footer__sites-tag { color: var(--peach); font-weight: 700; font-size: 11.5px;
  border: 1px solid rgba(243,154,107,.42); border-radius: 999px; padding: 3px 11px; }
.footer__sites a { display: inline-block; font-size: 13.5px; font-weight: 600; color: #e5d9ec;
  border-bottom: 1px solid rgba(229,217,236,.34); padding-bottom: 1px; transition: color .16s ease, border-color .16s ease; }
.footer__sites a:hover { color: #fff; border-bottom-color: var(--peach); }
.footer__sites a::after { content: " ↗"; font-size: 11px; color: var(--peach); }
.footer__bottom { padding-top: 28px; font-size: 12.5px; color: #b09cbe; line-height: 1.8; }
.footer__disc { color: #a690b5; font-size: 12px; margin-top: 10px; max-width: 96ch; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.lead { font-size: 18px; color: var(--slate); }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.prose h3 { font-size: 20px; margin: 28px 0 10px; }
.prose p { color: var(--slate); font-size: 15.5px; margin-bottom: 12px; }
.prose ul { color: var(--slate); font-size: 15.5px; padding-left: 20px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.source-note { font-size: 12.5px; color: var(--muted); margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.pill { font-size: 13px; padding: 7px 14px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--slate); font-weight: 600; }

/* comparison table */
.ctable { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ctable th, .ctable td { padding: 15px 18px; text-align: left; font-size: 14.5px; border-bottom: 1px solid var(--line-2); }
.ctable th { background: var(--bg-soft); font-weight: 700; color: var(--plum); }
.ctable td { color: var(--slate); }
.ctable tr:last-child td { border-bottom: 0; }

/* ---------- 상담 관리 대시보드 ---------- */
.page-hero--dashboard::before { background-image: url("https://images.unsplash.com/photo-1551288049-bebda4e38f71?auto=format&fit=crop&w=1600&q=80"); }

.dash-conn { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 600; padding: 7px 14px; border-radius: 999px; margin-bottom: 16px; }
.dash-conn--on { background: var(--green-bg); color: #147a54; border: 1px solid #b7e4cd; }
.dash-conn--off { background: var(--amber-bg); color: #8a5b0a; border: 1px solid #f0d9a8; }

.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.dash-stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.dash-stat__num { font-size: 34px; font-weight: 800; color: var(--plum); letter-spacing: -.03em; line-height: 1; }
.dash-stat__label { margin-top: 8px; font-size: 13.5px; color: var(--slate); font-weight: 600; }
.dash-stat--warn { border-color: #f0d9a8; background: var(--amber-bg); }
.dash-stat--warn .dash-stat__num { color: #8a5b0a; }
.dash-stat--danger { border-color: #f3c2c2; background: var(--red-bg); }
.dash-stat--danger .dash-stat__num { color: #a02525; }

.dash-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; align-items: center; }
.dash-search { flex: 1; min-width: 220px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; font-family: inherit; font-size: 15px; color: var(--ink); }
.dash-search:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 3px rgba(232,102,63,.12); }
.dash-tools select { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-family: inherit; font-size: 14px; color: var(--ink); background: #fff; }
.dash-tools select:focus { outline: none; border-color: var(--coral); }
.dash-btn { padding: 12px 18px; font-size: 14px; }
.dash-btn--danger { color: var(--red); border-color: #f3c2c2; }
.dash-btn--danger:hover { border-color: var(--red); box-shadow: 0 10px 26px rgba(214,58,58,.18); }

.dash-tablewrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.dash-table th, .dash-table td { padding: 14px 16px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.dash-table th { background: var(--bg-soft); font-weight: 700; color: var(--plum); font-size: 12.5px; letter-spacing: .02em; white-space: nowrap; }
.dash-table tbody tr { cursor: pointer; transition: background .15s ease; }
.dash-table tbody tr:hover { background: var(--bg-soft); }
.dash-table tbody tr:last-child td { border-bottom: 0; }
.dash-sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.dash-seq { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--coral); letter-spacing: .04em; white-space: nowrap; }
.dm-seq { display: inline-block; margin-left: 8px; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; color: var(--muted); }
.dash-link { background: none; border: 1px solid var(--line); color: var(--coral-2); font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 999px; cursor: pointer; font-family: inherit; transition: all .15s ease; white-space: nowrap; }
.dash-link:hover { border-color: var(--coral); background: var(--bg-warm); }
.dash-actions { text-align: right; }

.pill { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.pill--red { background: var(--red); color: #fff; }
.pill--amber { background: var(--amber); color: #fff; }
.pill--green { background: var(--green); color: #fff; }
.pill--gray { background: var(--gray-bg); color: #4b5563; border: 1px solid #dfe2e7; }
/* 상태 컬럼 pill — 상태별 고유 배경색 */
.pill--st-new       { background: #64748b; color: #fff; }
.pill--st-contacted { background: #2563eb; color: #fff; }
.pill--st-reviewing { background: #ea9010; color: #fff; }
.pill--st-scheduled { background: #7c3aed; color: #fff; }
.pill--st-done      { background: #10a760; color: #fff; }
.pill--st-closed    { background: #6b6b6b; color: #fff; }

.dash-empty { background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: 56px 28px; text-align: center; }
.dash-empty__ico { font-size: 40px; }
.dash-empty h3 { margin: 14px 0 8px; font-size: 20px; color: var(--plum); }
.dash-empty p { color: var(--slate); font-size: 15px; max-width: 46ch; margin: 0 auto 20px; }

/* detail modal */
.dm-backdrop { position: fixed; inset: 0; background: rgba(36,22,51,.55); backdrop-filter: blur(3px); z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 40px 18px; overflow-y: auto; animation: dmFade .18s ease; }
@keyframes dmFade { from { opacity: 0; } to { opacity: 1; } }
.dm-modal { background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 760px; box-shadow: var(--shadow-lg); overflow: hidden; animation: dmUp .22s var(--ease); }
@keyframes dmUp { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.dm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 24px 28px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.dm-head h2 { font-size: 23px; margin: 10px 0 4px; color: var(--plum); }
.dm-x { background: none; border: none; font-size: 30px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.dm-x:hover { color: var(--ink); }
.dm-body { padding: 24px 28px; max-height: 62vh; overflow-y: auto; }
.dm-section-t { font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--coral-2); margin: 22px 0 12px; }
.dm-section-t:first-child { margin-top: 0; }
.dm-statuses { display: flex; flex-wrap: wrap; gap: 8px; }
.dm-status { padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--slate); cursor: pointer; transition: all .15s ease; }
.dm-status:hover { filter: brightness(.97); transform: translateY(-1px); }
/* 상태별 배경색 (기본: 연한 톤) */
.dm-status--new       { background: #eef1f5; border-color: #dfe4ea; color: #4a5568; }
.dm-status--contacted { background: #e7f0ff; border-color: #cfe0ff; color: #1d4ed8; }
.dm-status--reviewing { background: #fff3e0; border-color: #ffe0b3; color: #b45309; }
.dm-status--scheduled { background: #ede7fb; border-color: #ddd0f5; color: #6d28d9; }
.dm-status--done      { background: #e4f7ec; border-color: #c8ecd5; color: #067647; }
.dm-status--closed    { background: #f1f0ee; border-color: #e2e0dc; color: #6b6b6b; }
/* 선택된 상태: 진한 배경 + 흰 글씨 */
.dm-status.active { color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(0,0,0,.16); }
.dm-status--new.active       { background: #64748b; }
.dm-status--contacted.active { background: #2563eb; }
.dm-status--reviewing.active { background: #ea9010; }
.dm-status--scheduled.active { background: #7c3aed; }
.dm-status--done.active      { background: #10a760; }
.dm-status--closed.active    { background: #6b6b6b; }
.dm-memo { width: 100%; min-height: 90px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; font-family: inherit; font-size: 14.5px; color: var(--ink); resize: vertical; }
.dm-memo:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 3px rgba(232,102,63,.12); }
.dm-memo-save { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.dm-grid { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.dm-row { display: flex; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.dm-row:nth-child(odd) { background: var(--bg-soft); }
.dm-row:last-child { border-bottom: 0; }
.dm-k { flex: 0 0 130px; color: var(--muted); font-weight: 600; }
.dm-v { color: var(--ink); word-break: break-word; flex: 1; }
/* 위험신호 응답 표시 */
.rf-head { font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.rf-head--warn { color: #b42318; }
.rf-head--ok { color: #067647; }
.rf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rf-item { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; border-radius: 8px; background: var(--bg-soft); font-size: 13px; }
.rf-item .rf-a { flex: 0 0 auto; color: var(--muted); font-weight: 600; }
.rf-item--yes { background: #fff4f2; }
.rf-item--yes .rf-a { color: #b42318; }
.rf-item--yes.rf-item--amber { background: #fff8eb; }
.rf-item--yes.rf-item--amber .rf-a { color: #b54708; }
.dm-foot { display: flex; justify-content: space-between; gap: 12px; padding: 18px 28px; border-top: 1px solid var(--line); background: var(--bg-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid--4, .steps, .stats { grid-template-columns: repeat(2, 1fr); }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .care-grid { grid-template-columns: 1fr; }
  .care-side { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .care-side a { flex: 1; justify-content: center; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  /* 드롭다운 패널 배경도 내비와 같은 톤으로 통일한다 */
  .nav__menu { position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: linear-gradient(180deg, #fdf9fb 0%, #ffffff 100%); border-bottom: 1px solid #f0e6f0; padding: 10px 16px 18px; box-shadow: var(--shadow-md); transform: translateY(-140%); transition: transform .25s ease; max-height: calc(100vh - var(--nav-h)); overflow-y: auto; }
  .nav__menu.open { transform: translateY(0); }
  .nav__burger { display: block; }
  .grid--2, .grid--3, .grid--4, .steps, .stats { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero { padding: 76px 0 84px; }
  .cta-band { padding: 40px 24px; }
  .form, .wiz-card { padding: 26px 22px; }
  .bodymap { grid-template-columns: 1fr; }
  .summary-row { flex-direction: column; gap: 3px; }
  .summary-row__k { flex: none; }
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .dash-tools { flex-direction: column; align-items: stretch; }
  .dash-tools select, .dash-btn { width: 100%; }
  .dm-backdrop { padding: 0; }
  .dm-modal { border-radius: 0; min-height: 100vh; max-width: 100%; }
  .dm-row { flex-direction: column; gap: 3px; }
  .dm-k { flex: none; }
  .dm-foot { flex-direction: column; }
}

/* Our Story — 여정 타임라인 */
.story-journey { margin-top: 44px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.story-step { position: relative; padding: 24px 20px 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: 0 6px 18px rgba(44,27,61,.05); }
.story-step::after { content: ""; position: absolute; top: 50%; right: -13px; width: 18px; height: 2px; background: linear-gradient(90deg, var(--coral), var(--plum-accent)); opacity: .5; }
.story-step:last-child::after { display: none; }
.story-step__no { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; font-weight: 800; font-size: 15px; color: #fff; background: var(--grad-accent); letter-spacing: .02em; }
.story-step h3 { margin: 14px 0 8px; font-size: 17px; color: var(--plum); }
.story-step p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--slate); }
.story-illust { line-height: 0; }
.story-illust svg { display: block; width: 100%; height: auto; }
.story-highlight { margin-top: 16px; padding: 16px 18px; font-size: 16px; line-height: 1.72; color: var(--plum); background: linear-gradient(135deg, rgba(232,102,63,.08), rgba(124,77,196,.08)); border-left: 3px solid var(--coral); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.story-highlight strong { color: var(--coral-2); }
.story-quote { position: relative; margin: 44px auto 0; max-width: 820px; padding: 32px 34px; text-align: center; font-size: 20px; line-height: 1.7; color: var(--plum); background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); }
.story-quote strong { background: linear-gradient(transparent 62%, rgba(232,102,63,.22) 0); }
.story-quote cite { display: block; margin-top: 16px; font-size: 15px; font-style: normal; font-weight: 700; color: var(--coral); }
@media (max-width: 860px) {
  .story-journey { grid-template-columns: repeat(2, 1fr); }
  .story-step::after { display: none; }
  .story-quote { font-size: 17px; padding: 26px 22px; }
}
@media (max-width: 460px) {
  .story-journey { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .aitalk__btn::before { animation: none; }
}

/* AI 안내 — 타이핑 인디케이터 & 입력 비활성 상태 */
.aitalk__typing .b { padding: 12px 16px; }
.aitalk__typing .dots { display: inline-flex; gap: 5px; align-items: center; }
.aitalk__typing .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); opacity: .35; animation: aiDot 1.2s infinite; }
.aitalk__typing .dots i:nth-child(2) { animation-delay: .18s; }
.aitalk__typing .dots i:nth-child(3) { animation-delay: .36s; }
@keyframes aiDot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.aitalk__input input:disabled { background: #f7f4f8; color: var(--muted); }
.aitalk__input button:disabled { cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .aitalk__typing .dots i { animation: none; opacity: .6; } }

/* 모바일: 패널을 화면 폭에 맞추고 입력줄이 잘리지 않게 한다 */
@media (max-width: 560px) {
  .aitalk { right: 14px; bottom: 14px; }
  .aitalk__btn { padding: 13px 18px; font-size: 14px; }
  .aitalk__panel { right: 12px; left: 12px; width: auto; max-width: none; bottom: 78px; }
  .aitalk__body { max-height: min(46vh, 340px); }
  .aitalk__input { padding: 10px 12px; gap: 6px; }
  .aitalk__input input { padding: 10px 12px; }
  .aitalk__input button { padding: 10px 14px; }
}

/* ==========================================================================
   대시보드 접근 게이트 (js/dash-auth.js)
   비밀번호 확인 전에는 상담 접수 내역이 한 프레임도 노출되지 않도록
   <html data-locked> 상태에서 본문 전체를 감춘다.
   ========================================================================== */
html[data-locked] body > *:not(.epc-gate) { display: none !important; }
html[data-locked] body { overflow: hidden; background: var(--bg-soft); }

.epc-gate {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(232,102,63,.13), transparent 60%),
    radial-gradient(760px 480px at 92% 8%, rgba(124,77,196,.13), transparent 62%),
    var(--bg-soft);
}
.epc-gate__card {
  width: 100%; max-width: 420px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 38px 32px 30px; box-shadow: var(--shadow-md); text-align: center;
}
.epc-gate__ico {
  width: 58px; height: 58px; margin: 0 auto 18px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  background: var(--bg-warm); border: 1px solid var(--line);
}
.epc-gate__title { font-size: 23px; font-weight: 800; margin-bottom: 10px; }
.epc-gate__lead { font-size: 14.5px; color: var(--slate); line-height: 1.65; margin-bottom: 24px; }
.epc-gate__label {
  display: block; text-align: left; font-size: 13px; font-weight: 700;
  color: var(--slate); margin-bottom: 8px;
}
.epc-gate__input {
  width: 100%; padding: 14px 16px; font-size: 16px; font-family: inherit;
  color: var(--ink); background: #fff; border: 1px solid var(--line);
  border-radius: 14px; text-align: center; letter-spacing: .28em;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.epc-gate__input::placeholder { letter-spacing: 0; color: var(--muted); }
.epc-gate__input:focus { outline: none; border-color: var(--coral); box-shadow: var(--ring); }
.epc-gate__err {
  margin: 12px 0 0; padding: 11px 14px; border-radius: 12px; text-align: left;
  font-size: 13.5px; font-weight: 600; color: var(--red);
  background: var(--red-bg); border: 1px solid rgba(214,58,58,.2);
}
.epc-gate__submit { margin-top: 20px; }
.epc-gate__back {
  display: inline-block; margin-top: 18px; font-size: 13.5px;
  font-weight: 600; color: var(--muted);
}
.epc-gate__back:hover { color: var(--coral-2); }

@media (max-width: 480px) {
  .epc-gate { padding: 16px; }
  .epc-gate__card { padding: 30px 22px 24px; }
  .epc-gate__title { font-size: 20.5px; }
}

/* ==========================================================================
   HLA-G Science Brief — 가로 이동(스와이프) 슬라이드
   ========================================================================== */
.hslide { position: relative; }
.hslide__viewport {
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none;
  border-radius: var(--radius);
}
.hslide__viewport::-webkit-scrollbar { display: none; }
.hslide__track { display: flex; gap: 0; margin: 0; padding: 0; list-style: none; }
.hslide__item {
  flex: 0 0 100%; min-width: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.hslide__frame {
  position: relative; line-height: 0;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-md);
}
.hslide__frame img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 1754 / 1241; object-fit: cover;
  background: var(--bg-soft);
}
.hslide__cap {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; line-height: 1.55;
  font-size: 14.5px; font-weight: 600; color: var(--slate);
  border-top: 1px solid var(--line); background: var(--bg-soft);
}
.hslide__cap b {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 26px; padding: 0 7px; border-radius: 8px;
  font-size: 12.5px; font-weight: 800; color: #fff; background: var(--grad-accent);
}
.hslide__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 3; width: 46px; height: 46px; border: none; cursor: pointer;
  border-radius: 50%; background: rgba(255,255,255,.94);
  color: var(--plum); font-size: 20px; line-height: 1;
  box-shadow: 0 6px 20px rgba(44,27,61,.18);
  transition: all .2s var(--ease);
}
.hslide__nav:hover { background: var(--grad-accent); color: #fff; transform: translateY(-50%) scale(1.08); }
.hslide__nav:focus-visible { outline: none; box-shadow: var(--ring), 0 6px 20px rgba(44,27,61,.18); }
.hslide__nav[disabled] { opacity: .3; cursor: default; pointer-events: none; }
.hslide__nav--prev { left: 12px; }
.hslide__nav--next { right: 12px; }
.hslide__foot {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-top: 18px; flex-wrap: wrap;
}
.hslide__dots { display: flex; align-items: center; gap: 9px; }
.hslide__dot {
  width: 9px; height: 9px; padding: 0; border: none; cursor: pointer;
  border-radius: 999px; background: rgba(124,77,196,.24);
  transition: all .25s var(--ease);
}
.hslide__dot:hover { background: rgba(124,77,196,.5); }
.hslide__dot[aria-current="true"] { width: 30px; background: var(--grad-accent); }
.hslide__dot:focus-visible { outline: none; box-shadow: var(--ring); }
.hslide__count { font-size: 13.5px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.hslide__hint {
  margin-top: 12px; text-align: center;
  font-size: 13px; color: var(--muted);
}
.hslide__actions { display: flex; justify-content: center; margin-top: 20px; }

@media (max-width: 860px) {
  .hslide__nav { width: 38px; height: 38px; font-size: 17px; }
  .hslide__nav--prev { left: 6px; }
  .hslide__nav--next { right: 6px; }
  .hslide__cap { font-size: 13.5px; padding: 12px 14px; }
}
@media (max-width: 480px) {
  .hslide__nav { display: none; }
  .hslide__cap { font-size: 13px; align-items: flex-start; }
}

/* hslide — 확대 보기(라이트박스) */
.hslide__zoomable { cursor: zoom-in; }
.hslide__zoomable:focus-visible { outline: 3px solid var(--coral); outline-offset: -3px; }
.hslide-zoom {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(20,12,28,.92);
  opacity: 0; transition: opacity .22s ease;
}
.hslide-zoom.open { opacity: 1; }
.hslide-zoom__stage {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
}
.hslide-zoom__stage img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  border-radius: 10px; background: #fff;
  box-shadow: 0 24px 70px rgba(0,0,0,.5);
}
.hslide-zoom__x {
  position: absolute; top: 16px; right: 18px; z-index: 2;
  width: 42px; height: 42px; border: none; cursor: pointer;
  border-radius: 50%; font-size: 17px; line-height: 1;
  color: #fff; background: rgba(255,255,255,.16);
  transition: background .2s ease;
}
.hslide-zoom__x:hover { background: var(--coral); }
.hslide-zoom__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 48px; height: 48px; border: none; cursor: pointer;
  border-radius: 50%; font-size: 24px; line-height: 1;
  color: #fff; background: rgba(255,255,255,.16);
  transition: background .2s ease;
}
.hslide-zoom__nav:hover { background: var(--coral); }
.hslide-zoom__nav[disabled] { opacity: .22; pointer-events: none; }
.hslide-zoom__nav--prev { left: 14px; }
.hslide-zoom__nav--next { right: 14px; }
.hslide-zoom__count {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  font-size: 13px; font-weight: 700; letter-spacing: .06em;
  color: rgba(255,255,255,.8);
}
@media (max-width: 640px) {
  .hslide-zoom { padding: 8px; }
  .hslide-zoom__stage {
    overflow: auto; -webkit-overflow-scrolling: touch;
    align-items: center; justify-content: flex-start;
  }
  .hslide-zoom__stage img { flex: none; max-width: none; width: auto; height: auto; max-height: 84vh; min-width: 170vw; }
  .hslide-zoom__nav { width: 40px; height: 40px; font-size: 20px; }
}

/* hslide — 슬라이드 하단 상세 설명문 */
.hslide__desc {
  padding: 22px 26px 24px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.hslide__desc h4 {
  margin: 0 0 12px; font-size: 17px; font-weight: 800; color: var(--plum);
  display: flex; align-items: center; gap: 9px;
}
.hslide__desc h4::before {
  content: ""; flex: none; width: 4px; height: 17px;
  border-radius: 2px; background: var(--grad-accent);
}
.hslide__desc p {
  margin: 0 0 11px; font-size: 14.5px; line-height: 1.85; color: var(--slate);
  word-break: keep-all;
}
.hslide__desc p:last-child { margin-bottom: 0; }
.hslide__desc strong { color: var(--plum); font-weight: 700; }
.hslide__desc .hslide__desc-note {
  margin-top: 14px; padding: 12px 15px;
  font-size: 13.5px; line-height: 1.75; color: var(--slate);
  background: var(--bg-warm); border-left: 3px solid var(--coral);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.hslide__item .hslide__frame { display: flex; flex-direction: column; }
@media (max-width: 860px) {
  .hslide__desc { padding: 18px 18px 20px; }
  .hslide__desc h4 { font-size: 15.5px; }
  .hslide__desc p { font-size: 13.8px; line-height: 1.8; }
}
@media (max-width: 480px) {
  .hslide__desc { padding: 16px 14px 18px; }
  .hslide__desc p { font-size: 13.5px; }
}
