/* ============================================================
   최대성 이사장 PR 사이트 공용 스타일
   팔레트: 딥네이비 잉크 + 아이보리 + 골드 포인트
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@400;600;700;900&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
  --ink: #1b2434;
  --ink-2: #263349;
  --paper: #faf8f3;
  --paper-2: #f2eee4;
  --card: #ffffff;
  --gold: #b08d3e;
  --gold-soft: #c9a45c;
  --gold-faint: #e9dfc8;
  --text: #2a2f3a;
  --muted: #6f7684;
  --line: #e3ddcf;
  --serif: 'Noto Serif KR', 'Nanum Myeongjo', serif;
  --sans: 'Noto Sans KR', -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 78px; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
/* width/height 속성이 붙은 <img> 가 CSS 로 폭만 줄면 height 속성값이 그대로 남아
   세로로 늘어난다. height:auto 로 비율을 지킨다. */
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--gold-soft); padding: 12px 20px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* 스크롤 등장 */
[data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity .8s ease, transform .8s cubic-bezier(0.2,0.7,0.2,1); }
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* ---------- 상단 내비게이션 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 243, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
  color: var(--gold-soft); font-family: var(--serif); font-weight: 900;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 17px; color: var(--ink); letter-spacing: 0.02em; }
.brand-sub { display: block; font-size: 11px; color: var(--muted); letter-spacing: 0.1em; margin-top: -4px; }
.brand-name { display: block; }
.nav { display: flex; gap: 26px; align-items: center; }
.nav a { font-size: 14.5px; font-weight: 500; color: #454c5a; transition: color .2s; }
.nav a:hover { color: var(--gold); }
.nav a.nav-cta {
  background: var(--ink); color: #f6f1e5; padding: 8px 18px; border-radius: 999px;
  font-weight: 600;
}
.nav a.nav-cta:hover { background: var(--ink-2); color: var(--gold-soft); }
/* 모바일: 브랜드 아래에 가로 스크롤되는 칩 내비게이션을 깔아 10개 섹션 모두 도달 가능하게 한다. */
@media (max-width: 760px) {
  .topbar-in { flex-direction: column; align-items: stretch; height: auto; padding-top: 9px; }
  .brand { padding-bottom: 8px; }
  .nav {
    gap: 6px; overflow-x: auto; flex-wrap: nowrap;
    margin: 0 -24px; padding: 0 24px 9px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a {
    flex: 0 0 auto; font-size: 13px; padding: 6px 13px; border-radius: 999px;
    background: #f1ece0; border: 1px solid var(--line); color: #4a5160;
  }
  .nav a.nav-cta { padding: 6px 13px; font-size: 13px; }
}

/* ---------- 히어로 텍스트 ---------- */
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: 0.22em; color: var(--gold-soft);
  font-weight: 600; margin-bottom: 22px;
}
.hero-eyebrow::before { content: ''; width: 34px; height: 1px; background: var(--gold-soft); }
.hero-h1 {
  font-family: var(--serif); font-weight: 900; font-size: 50px;
  line-height: 1.28; color: #f7f3e8; margin-bottom: 18px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.45);
}
.hero-role { font-family: var(--serif); font-size: 20px; color: #d6cfbc; margin-bottom: 14px; }
.hero-role strong { color: var(--gold-soft); font-weight: 700; }
.hero-desc {
  border-left: 3px solid var(--gold); padding: 4px 0 4px 20px;
  font-size: 16px; line-height: 1.9; color: #cdc6b4;
  margin-bottom: 34px; max-width: 560px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; font-size: 15px; font-weight: 600;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%); color: #211a08; box-shadow: 0 8px 24px rgba(176,141,62,0.35); }
.btn-ghost { border: 1px solid rgba(238,233,220,0.4); color: #eee9dc; }
.btn-ghost:hover { border-color: var(--gold-soft); color: var(--gold-soft); }

.hero-figure { position: relative; }
.hero-figure .frame {
  border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(201,164,92,0.5);
  box-shadow: 0 30px 70px rgba(0,0,0,0.45);
  transform: rotate(1.2deg);
  background: #10151f;
}
.hero-figure .frame img { width: 100%; height: auto; }
.hero-figure figcaption {
  margin-top: 14px; font-size: 12.5px; color: #aab2bf; text-align: right;
}
@media (max-width: 880px) { .hero-h1 { font-size: 34px; } .hero-role { font-size: 17px; } }

/* ---------- 비디오형 히어로 (첫 화면) ---------- */
.hero-video {
  position: relative; overflow: hidden;
  min-height: calc(100vh - 64px);
  display: flex; align-items: center;
  background: #0c111c; color: #eee9dc;
}
.hv-slide {
  position: absolute; inset: -8%;
  background-size: cover; background-position: center;
  opacity: 0; will-change: transform, opacity;
  filter: brightness(0.48) saturate(0.85) blur(3px);
  animation: hvFade 32s linear infinite, hvKen 16s ease-in-out infinite alternate;
}
.hv-slide.s2 { animation-delay: 16s, 0s; }
@keyframes hvFade {
  0% { opacity: 0; } 6% { opacity: 1; } 47% { opacity: 1; } 56% { opacity: 0; } 100% { opacity: 0; }
}
@keyframes hvKen {
  from { transform: scale(1.04) translate(0, 0); }
  to   { transform: scale(1.24) translate(-2.5%, 2%); }
}
#hv-particles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.hv-overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(176,141,62,0.18), transparent 60%),
    linear-gradient(100deg, rgba(12,17,28,0.92) 0%, rgba(12,17,28,0.55) 55%, rgba(12,17,28,0.75) 100%),
    radial-gradient(ellipse at center, transparent 55%, rgba(5,8,14,0.55) 100%);
}
.hv-overlay::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 26px 26px;
}
.hv-in {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px;
  align-items: center; width: 100%;
  position: relative; z-index: 3; padding-top: 48px; padding-bottom: 88px;
}
.hero-h1 .h1-org {
  display: block; font-size: 25px; font-weight: 700; letter-spacing: -0.01em;
  color: #d9d2c0; margin-bottom: 6px;
}
.hv-title .accent {
  display: block;
  background: linear-gradient(100deg, #c9a45c 22%, #f8ecc6 40%, #c9a45c 58%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0;
  /* 등장(hvUp)과 광택(hvShimmer)을 한 선언에 합친다 — 따로 쓰면 뒤 규칙이 앞을 덮어써
     opacity 가 0 에 머문다. */
  animation:
    hvUp 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.55s forwards,
    hvShimmer 5.5s linear 1.5s infinite;
}
@keyframes hvShimmer { to { background-position: -220% 0; } }
.hv-a1, .hv-a2, .hv-a3, .hv-a4, .hv-a5, .hv-a6 {
  opacity: 0; animation: hvUp 1s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.hv-a1 { animation-delay: 0.25s; } .hv-a2 { animation-delay: 0.45s; }
.hv-a3 { animation-delay: 0.65s; } .hv-a4 { animation-delay: 0.85s; }
.hv-a5 { animation-delay: 1.05s; } .hv-a6 { animation-delay: 0.7s; }
@keyframes hvUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.hv-portrait { animation: hvUp 1s cubic-bezier(0.2,0.7,0.2,1) 0.7s forwards, hvFloat 7s ease-in-out 1.8s infinite; }
@keyframes hvFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.hv-scroll {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 3; font-size: 11px; letter-spacing: 0.34em; color: rgba(238,233,220,0.65);
  text-align: center; opacity: 0; animation: hvUp 1s ease 1.5s forwards;
}
.hv-scroll::after {
  content: ''; display: block; width: 10px; height: 10px; margin: 8px auto 0;
  border-right: 2px solid var(--gold-soft); border-bottom: 2px solid var(--gold-soft);
  transform: rotate(45deg); animation: hvBounce 1.8s ease-in-out infinite;
}
@keyframes hvBounce { 0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 1; } 50% { transform: rotate(45deg) translate(6px, 6px); opacity: 0.35; } }
@media (max-width: 880px) {
  .hero-video { min-height: auto; }
  /* 좌우 값은 .wrap 의 24px 를 유지해야 한다 — 단축 속성으로 0 을 쓰면 여백이 사라진다. */
  .hv-in { grid-template-columns: 1fr; gap: 40px; padding: 64px 24px 90px; }
}
@media (prefers-reduced-motion: reduce) {
  .hv-slide { animation: none; opacity: 1; }
  .hv-slide.s2 { display: none; }
  .hv-a1, .hv-a2, .hv-a3, .hv-a4, .hv-a5, .hv-a6,
  .hv-portrait, .hv-scroll, .hv-title .accent { animation: none; opacity: 1; }
}
@media (max-width: 880px) { .hero-h1 .h1-org { font-size: 18px; } }

/* ---------- 지표 스트립 ---------- */
.stats { background: var(--ink); border-top: 1px solid rgba(201,164,92,0.25); color: #d8d1bf; }
.stats-in { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 26px 18px; text-align: center; border-left: 1px solid rgba(255,255,255,0.06); }
.stat:first-child { border-left: none; }
.stat b { display: block; font-family: var(--serif); font-size: 30px; font-weight: 900; color: var(--gold-soft); line-height: 1.2; }
.stat span { font-size: 13px; color: #a7aebc; }
@media (max-width: 700px) { .stats-in { grid-template-columns: repeat(2, 1fr); } .stat { border-left: none; } }

/* ---------- 공통 섹션 ---------- */
section.block { padding: 84px 0; }
section.block.alt { background: var(--paper-2); }
.sec-eyebrow { font-size: 12.5px; letter-spacing: 0.24em; color: var(--gold); font-weight: 700; margin-bottom: 10px; }
.sec-title { font-family: var(--serif); font-size: 34px; font-weight: 900; color: var(--ink); line-height: 1.35; margin-bottom: 14px; }
.sec-lead { color: var(--muted); max-width: 700px; margin-bottom: 44px; font-size: 16.5px; }

/* 프로필 */
.profile-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 52px; align-items: start; }
.profile-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 34px 32px; box-shadow: 0 10px 30px rgba(27,36,52,0.06);
}
.profile-card h3 { font-family: var(--serif); font-size: 20px; color: var(--ink); margin-bottom: 18px; padding-bottom: 14px; border-bottom: 2px solid var(--gold-faint); }
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 10px 16px; font-size: 15px; }
.kv dt { color: var(--gold); font-weight: 700; }
.kv dd { color: var(--text); }
.profile-body p { margin-bottom: 18px; font-size: 16px; }
.profile-body p strong { color: var(--ink); }
@media (max-width: 860px) { .profile-grid { grid-template-columns: 1fr; } }

/* 이사장 소개 그리드 */
.chair-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 52px; align-items: start; }
.chair-photo { position: relative; }
.chair-photo img {
  width: 100%; border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 22px 50px rgba(27,36,52,0.18);
}
.chair-photo::before {
  content: ''; position: absolute; inset: 16px -16px -16px 16px; z-index: -1;
  border: 2px solid var(--gold-faint); border-radius: 16px;
}
.chair-photo figcaption { margin-top: 16px; font-size: 13px; color: var(--muted); text-align: center; }
@media (max-width: 860px) { .chair-grid { grid-template-columns: 1fr; gap: 34px; } }

/* FAQ */
.faq-list { display: grid; gap: 14px; }
.faq-item {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 4px 26px; transition: box-shadow .2s, border-color .2s;
}
.faq-item[open] { box-shadow: 0 12px 32px rgba(27,36,52,0.08); border-color: var(--gold-faint); }
.faq-item summary {
  font-family: var(--serif); font-size: 17.5px; font-weight: 700; color: var(--ink);
  padding: 20px 34px 20px 0; cursor: pointer; list-style: none; position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ''; position: absolute; right: 4px; top: 50%;
  width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  transform: rotate(45deg); transition: transform .25s;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq-a { padding: 0 0 22px; color: #4a5160; font-size: 15.5px; border-top: 1px solid var(--line); padding-top: 18px; }
.faq-a strong { color: var(--ink); }

/* 타임라인 (활동·업적) */
.timeline { position: relative; margin-top: 10px; }
.timeline::before { content: ''; position: absolute; left: 130px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--gold-faint), var(--line)); }
.tl-item { display: grid; grid-template-columns: 106px 48px 1fr; margin-bottom: 34px; }
.tl-date { text-align: right; font-family: var(--serif); font-weight: 700; color: var(--gold); font-size: 15px; padding-top: 2px; }
.tl-dot { position: relative; }
.tl-dot::before {
  content: ''; position: absolute; left: 18px; top: 7px; width: 13px; height: 13px;
  border-radius: 50%; background: var(--paper); border: 3px solid var(--gold);
}
.timeline { list-style: none; }
.tl-body h3, .tl-body h4 { font-family: var(--serif); font-size: 18.5px; color: var(--ink); margin-bottom: 6px; }
.tl-body p { color: #4a5160; font-size: 15px; max-width: 640px; }
@media (max-width: 640px) {
  .timeline::before { left: 8px; }
  .tl-item { grid-template-columns: 28px 1fr; }
  .tl-date { grid-column: 2; text-align: left; margin-bottom: 4px; }
  .tl-dot { grid-column: 1; grid-row: 1 / span 2; }
  .tl-dot::before { left: 2px; }
  .tl-body { grid-column: 2; }
}

/* 어록 */
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.quote-card {
  background: linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 100%);
  color: #e6dfcd; border-radius: 16px; padding: 40px 36px 32px; position: relative;
  box-shadow: 0 16px 40px rgba(27,36,52,0.25);
}
.quote-card::before {
  content: '\201C'; position: absolute; top: 10px; left: 24px;
  font-family: var(--serif); font-size: 84px; color: rgba(201,164,92,0.4); line-height: 1;
}
.quote-card p { font-family: var(--serif); font-size: 17.5px; line-height: 1.95; position: relative; z-index: 1; }
.quote-card footer { margin-top: 20px; font-size: 13px; color: #9aa3b2; }
@media (max-width: 800px) { .quotes { grid-template-columns: 1fr; } }

/* 카드 그리드 (사업 / 자료실 / 보도) */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 30px 28px; transition: transform .2s, box-shadow .2s; position: relative;
}
a.card:hover, .card.hoverable:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(27,36,52,0.12); }
.card .icon {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);
  display: flex; align-items: center; justify-content: center; font-size: 22px; color: #211a08;
}
.card h3, .card h4 { font-family: var(--serif); font-size: 18px; color: var(--ink); margin-bottom: 8px; }
.card p { font-size: 14.5px; color: var(--muted); }
.card .tag {
  display: inline-block; margin-bottom: 12px; font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.08em; color: var(--gold); border: 1px solid var(--gold-faint);
  background: #fbf7ec; padding: 3px 10px; border-radius: 999px;
}
.card .meta { display: block; margin-top: 14px; font-size: 12.5px; color: #9aa1ae; }
.card.placeholder { border-style: dashed; background: transparent; }
.card.placeholder .icon { background: var(--paper-2); color: var(--gold); border: 1px dashed var(--gold-faint); }

/* 재단 배너 */
.found-banner {
  border-radius: 20px; overflow: hidden; position: relative; color: #efe9da;
  background:
    linear-gradient(100deg, rgba(20,27,40,0.94) 30%, rgba(20,27,40,0.55)),
    var(--banner-img, none) center/cover;
  padding: 56px 52px; box-shadow: 0 24px 60px rgba(27,36,52,0.3);
}
.found-banner h3 { font-family: var(--serif); font-size: 28px; font-weight: 900; margin: 10px 0 12px; color: #f5f0e3; }
.found-banner p { max-width: 560px; color: #c9c2b0; margin-bottom: 26px; font-size: 15.5px; }
@media (max-width: 640px) { .found-banner { padding: 40px 28px; } }

/* 연혁(재단 페이지) 인용 박스 */
.legacy-note {
  border-left: 3px solid var(--gold); background: #fbf8ef;
  padding: 22px 26px; border-radius: 0 12px 12px 0; margin-top: 34px;
  font-family: var(--serif); color: #4d4433; font-size: 15.5px;
}

/* 법인 정보 표 */
.info-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: 0 10px 30px rgba(27,36,52,0.06); }
.info-table th, .info-table td { text-align: left; padding: 15px 22px; border-bottom: 1px solid var(--line); font-size: 15px; }
.info-table th { width: 180px; background: #f6f2e7; color: var(--gold); font-family: var(--serif); font-weight: 700; }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: none; }
@media (max-width: 560px) { .info-table th { width: 120px; } }

/* 푸터 */
footer.site {
  background: var(--ink); color: #9aa3b2; padding: 52px 0 40px; font-size: 14px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 34px; }
footer.site h5, footer.site .footer-h { font-family: var(--serif); color: #e6dfcd; font-size: 16px; font-weight: 700; margin-bottom: 14px; }
footer.site address { font-style: normal; font-size: 13.5px; line-height: 1.9; }
footer.site a { color: #b6bdc9; display: block; margin-bottom: 8px; transition: color .2s; }
footer.site a:hover { color: var(--gold-soft); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 22px; font-size: 12.5px; color: #6d7686; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 26px; } }

/* ============================================================
   AI 채팅 위젯 (우하단)
   ============================================================ */
#cw-fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 1000;
  width: 62px; height: 62px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);
  color: #211a08; font-size: 26px;
  box-shadow: 0 12px 32px rgba(176,141,62,0.5);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s;
}
#cw-fab:hover { transform: scale(1.08); }
#cw-panel {
  position: fixed; right: 26px; bottom: 102px; z-index: 1000;
  width: 372px; max-width: calc(100vw - 32px); height: 540px; max-height: calc(100vh - 130px);
  background: #fdfcf9; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 30px 80px rgba(27,36,52,0.35);
  display: none; flex-direction: column; overflow: hidden;
}
#cw-panel.open { display: flex; }
.cw-head {
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
  color: #f0ead9; padding: 16px 20px; display: flex; align-items: center; gap: 12px;
}
.cw-head .dot { width: 9px; height: 9px; border-radius: 50%; background: #6fce7f; box-shadow: 0 0 8px #6fce7f; }
.cw-head b { font-family: var(--serif); font-size: 15.5px; }
.cw-head small { display: block; font-size: 11.5px; color: #9aa3b2; }
.cw-head .cw-close { margin-left: auto; background: none; border: none; color: #9aa3b2; font-size: 20px; cursor: pointer; }
.cw-msgs { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.cw-msg { max-width: 86%; padding: 11px 15px; border-radius: 14px; font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.cw-msg.user { align-self: flex-end; background: var(--ink); color: #ece6d6; border-bottom-right-radius: 4px; }
.cw-msg.bot { align-self: flex-start; background: #f1ecdf; color: #33394a; border-bottom-left-radius: 4px; }
.cw-msg.bot.typing { color: #8b8f9a; font-style: italic; }
.cw-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.cw-input textarea {
  flex: 1; resize: none; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font-family: var(--sans); font-size: 14px; height: 44px; outline: none;
}
.cw-input textarea:focus { border-color: var(--gold-soft); }
.cw-input button {
  width: 44px; height: 44px; border: none; border-radius: 10px; cursor: pointer;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);
  color: #211a08; font-size: 18px;
}
.cw-input button:disabled { opacity: 0.5; cursor: default; }
@media (max-width: 480px) { #cw-panel { right: 16px; } #cw-fab { right: 16px; bottom: 18px; } }

/* ============================================================
   모바일 최적화 (~560px, 320px 기준으로 검증)
   ============================================================ */
@media (max-width: 560px) {
  html { scroll-padding-top: 112px; }
  .wrap { padding: 0 18px; }

  /* 헤더 */
  .brand-mark { width: 30px; height: 30px; font-size: 15px; border-radius: 7px; }
  .brand-name { font-size: 14.5px; letter-spacing: -0.03em; }
  .brand-sub { font-size: 9.5px; letter-spacing: 0.06em; }
  .nav { margin: 0 -18px; padding: 0 18px 9px; }

  /* 히어로 */
  .hv-in { padding: 46px 18px 70px; gap: 30px; }
  .hero-eyebrow { font-size: 11.5px; letter-spacing: 0.16em; margin-bottom: 16px; }
  .hero-eyebrow::before { width: 20px; }
  .hero-h1 { font-size: 28px; margin-bottom: 14px; }
  .hero-h1 .h1-org { font-size: 15px; }
  .hero-role { font-size: 16px; margin-bottom: 12px; }
  .hero-desc { font-size: 14.5px; padding-left: 14px; margin-bottom: 26px; }
  .hero-actions { gap: 10px; }
  .btn { padding: 11px 20px; font-size: 14px; }
  .hero-figure .frame { transform: none; }   /* 회전이 가로 넘침을 만든다 */
  .hero-figure figcaption { text-align: left; }
  .hv-scroll { display: none; }

  /* 지표 스트립 */
  .stat { padding: 18px 10px; }
  .stat b { font-size: 24px; }
  .stat span { font-size: 11.5px; line-height: 1.55; }

  /* 공통 섹션 */
  section.block { padding: 52px 0; }
  .sec-title { font-size: 26px; margin-bottom: 10px; }
  .sec-lead { font-size: 15px; margin-bottom: 30px; }
  .sec-eyebrow { font-size: 11.5px; letter-spacing: 0.18em; }

  /* 프로필 / 정의 목록 — 96px 라벨 열을 두면 값이 뭉개진다. 세로로 쌓는다. */
  .profile-card { padding: 24px 20px; }
  .profile-card h3 { font-size: 18px; }
  .profile-body p { font-size: 15px; }
  .kv { grid-template-columns: 1fr; gap: 0; }
  .kv dt { font-size: 12.5px; letter-spacing: 0.02em; margin-top: 12px; }
  .kv dt:first-of-type { margin-top: 0; }
  .kv dd { font-size: 14.5px; }

  /* 이사장 사진 */
  .chair-grid { gap: 26px; }
  .chair-photo::before { display: none; }    /* 오른쪽으로 16px 삐져나온다 */
  .chair-photo figcaption { font-size: 12.5px; }

  /* 타임라인 */
  .tl-body h3, .tl-body h4 { font-size: 17px; }
  .tl-body p { font-size: 14.5px; }
  .tl-item { margin-bottom: 26px; }

  /* 카드 */
  .cards { gap: 16px; }
  .card { padding: 24px 20px; }
  .card h3, .card h4 { font-size: 17px; }
  .card .icon { width: 40px; height: 40px; font-size: 19px; margin-bottom: 14px; }
  .legacy-note { padding: 18px 18px; font-size: 14.5px; margin-top: 26px; }

  /* FAQ */
  .faq-item { padding: 2px 18px; }
  .faq-item summary { font-size: 15.5px; padding: 17px 26px 17px 0; }
  .faq-a { font-size: 14.5px; padding-bottom: 18px; }

  /* 법인 정보표 — 2열을 유지하면 값 칸이 90px 이하로 눌린다. 라벨/값을 세로로 쌓는다. */
  .info-table, .info-table tbody, .info-table tr, .info-table th, .info-table td { display: block; width: auto; }
  .info-table tr { border-bottom: 1px solid var(--line); padding: 13px 18px; }
  .info-table tr:last-child { border-bottom: none; }
  .info-table th { background: none; border: none; padding: 0 0 3px; font-size: 12.5px; }
  .info-table td { border: none; padding: 0; font-size: 14.5px; }

  /* 푸터 */
  footer.site { padding: 40px 0 32px; }
  .footer-grid { gap: 24px; margin-bottom: 26px; }

  /* 채팅 위젯 */
  #cw-fab { width: 54px; height: 54px; font-size: 22px; right: 14px; bottom: 14px; }
  #cw-panel {
    right: 10px; left: 10px; width: auto; max-width: none;
    bottom: 76px; height: auto; max-height: 64vh;
  }
  .cw-msg { max-width: 90%; font-size: 13.5px; }
}

/* 초소형 (320px 전후) */
@media (max-width: 380px) {
  .wrap { padding: 0 14px; }
  .nav { margin: 0 -14px; padding: 0 14px 9px; }
  .hv-in { padding: 42px 14px 64px; }
  .hero-h1 { font-size: 25px; }
  .hero-h1 .h1-org { font-size: 14px; }
  .brand-name { font-size: 13.5px; }
  .sec-title { font-size: 23px; }
  .btn { padding: 10px 16px; font-size: 13.5px; }
  .stat b { font-size: 21px; }
  .stat span { font-size: 11px; }
  .card { padding: 20px 17px; }
  .profile-card { padding: 20px 17px; }
  .faq-item { padding: 2px 15px; }
  .faq-item summary { font-size: 15px; }
}
