/* theme-2026.css v6 — 2026-10-14 claude 재작성.
   겉옷만 입힌다: 색 · 머리글 · 단추 · 푸터 · 게시판 색 · 새 질환/안내 쪽.
   기존 쪽의 배치(폭 · 격자 · 글자 크기 · 상자 계산 방식 · 여백)는 건드리지 않는다.
   되돌리기: head.php 와 게시판 header-renew.php 의 이 파일 <link> 한 줄을 지우면 7/16 디자인으로 돌아간다. */

/* ── 색 ─────────────────────────────────────────────────────────────── */
:root {
  --navy: #172e45;
  --beige: #efe7dd;
  --cta: #9a6b3f;              /* 대표 결정 2026-10-14 — 코퍼 브라운 */
  --h1: 40px; --h2: 28px; --h3: 20px;   /* 새 질환·안내 쪽에만 쓴다 */
  /* 7/16 디자인(redesign.css)이 쓰는 색 변수만 바꿔 전체 톤을 맞춘다 */
  --renew-ink: var(--navy);
  --renew-muted: var(--navy);
  --renew-green: var(--cta);
  --renew-green-dark: var(--cta);
  --renew-mint: var(--beige);
  --renew-sand: var(--beige);
  --renew-copper: var(--cta);
  --renew-line: var(--beige);
}
/* 스크롤 등장 효과를 끈다 — 넓은 화면에서 첫 화면 아래가 비어 보이던 원인 */
#main .rv { opacity: 1; transform: none; transition: none; }
#main *, #main *::before, #main *::after { animation: none !important; transition: none !important; }
#main .main_slide .txt :is(h1,h3,p,span,a) { opacity: 1; transform: none; will-change: auto; }
#main a:focus-visible, #header#header#header a:focus-visible, #header#header#header button:focus-visible, #footer a:focus-visible { outline: 2px solid var(--cta); outline-offset: 4px; }
/* 단추는 색만 */
#main .button, #main .more_btn, #main .contact_btn a { background: var(--cta); color: white; border-color: var(--cta); }
#main .button-outline { background: white; color: var(--cta); }
#main .community-link { background: var(--beige); }
#main .community-link a { background: var(--cta); color: white; }
#main .doctor_list .doctor .txt p::before { background: var(--beige); }

/* ── 머리글 (자체 완결 — 1181~1920 · 360~390 에서 확인) ───────────── */
#header#header#header { z-index: 1000; height: 82px; background: white; backdrop-filter: none; box-shadow: 0 1px 0 var(--beige); }  /* v8: 위치(fixed)는 원래대로 — sticky 로 바꾸면 본문 위 여백이 두 번 들어간다. 높이도 원래 82 */
#header#header#header .container { display: flex; align-items: center; width: min(1440px,100%); height: 82px; padding: 0 24px; gap: 16px; min-width: 0; }
#header#header#header .logo { flex: 0 0 auto; width: auto; margin: 0; }
#header#header#header .logo > a { min-height: 44px; display: flex; align-items: center; gap: 8px; }
#header#header#header .brand-copy { flex-direction: row; align-items: center; gap: 0; }
#header#header#header .brand-copy strong { color: var(--navy); font-size: 16px; font-weight: 800; letter-spacing: -.3px; line-height: 1.2; white-space: nowrap; }
#header#header#header nav { flex: 1; height: 82px; }
#header#header#header nav .main_menu { display: flex; align-items: stretch; justify-content: center; height: 82px; padding: 0; min-width: 0; }
#header#header#header nav .main_menu > li { height: 82px; }
#header#header#header nav .main_menu > li > a { height: 82px; padding: 0 8px; color: var(--navy); font-size: 16px; white-space: nowrap; }
#header#header#header nav .main_menu > li::before, #header#header#header nav .main_menu > li > a::after { display: none; }
#header#header#header nav .sub_menu { top: 82px; border: 1px solid var(--beige); border-radius: 0; background: white; box-shadow: none; padding: 8px; }
#header#header#header nav .sub_menu li a { min-height: 44px; padding: 8px 16px; color: var(--navy); font-size: 16px; line-height: 1.7; }
#header#header#header nav .sub_menu li a:hover { color: var(--navy); background: var(--beige); }
#header#header#header .header-actions { display: flex; align-items: center; gap: 8px; }
#header#header#header .header-phone { min-height: 44px; justify-content: center; color: var(--navy); }
#header#header#header .header-phone small { color: var(--navy); font-size: 12px; }
#header#header#header .header-phone strong { font-size: 16px; }
#header#header#header .header-cta { min-height: 44px; padding: 0 16px; border-radius: 8px; background: var(--cta); color: white; font-size: 16px; }
#header#header#header .header-login, #header#header#header .header-admin { min-height: 44px; padding: 8px; border: 1px solid var(--beige); border-radius: 8px; color: var(--navy); }
#header#header#header .header-en { order: 10; margin-left: 0; min-width: 40px; min-height: 36px; padding: 0 10px; border: 1px solid var(--beige); border-radius: 8px; color: var(--navy); font-size: 13px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
#header#header#header .header-en:hover { background: var(--beige); }
#header#header#header .hamburger { width: 44px; height: 44px !important; min-width: 44px; padding: 8px; z-index: 1003; border: 1px solid var(--beige); border-radius: 8px; background: white; align-items: center; justify-content: center; flex-direction: column; gap: 6px; }
#header#header#header .hamburger span { position: static; display: block; width: 24px; height: 2px; margin: 0; background: var(--navy); }
#header#header#header .hamburger.active span:first-child { transform: translateY(4px) rotate(45deg); }
#header#header#header .hamburger.active span:last-child { transform: translateY(-4px) rotate(-45deg); }
@media (max-width: 1180px) {
  #header#header#header .container { padding: 0 16px; }
  #header#header#header .header-actions { display: none; }
  #header#header#header .header-en { order: 0; margin-left: auto; }
  #header#header#header .hamburger { display: flex; margin-left: 8px; }
  #header#header#header nav { position: fixed; top: 0; left: 0; right: auto; width: 100%; height: 100dvh; padding: 80px 24px 88px; background: white; box-shadow: none; overflow-y: auto; visibility: hidden; transform: none; transition: none; }
  #header#header#header nav.open { visibility: visible; right: auto; }
  #header#header#header nav .main_menu { display: block; height: auto; }
  #header#header#header nav .main_menu > li { height: auto; display: block; border-color: var(--beige); }
  #header#header#header nav .main_menu > li > a { height: 56px; padding: 8px; }
  #header#header#header nav .sub_menu, #header#header#header nav .sub_menu.wide { position: static; top: auto; transform: none; width: 100%; padding: 8px 16px; border: 0; box-shadow: none; }
  #header#header#header .nav-mobile-contact a { background: var(--cta); color: white; min-height: 48px; font-size: 16px; border-radius: 8px; }
  #header#header#header .nav-mobile-contact a.nav-login { background: white; color: var(--navy); }
  #header#header#header .board-member-links a { display: inline-flex; min-height: 44px; align-items: center; margin: 8px; color: var(--navy); }
}
@media (max-width: 820px) {
  #header#header#header, #header#header#header .container { height: 68px; }  /* v8: 원래 모바일 머리글 68 */
  #header#header#header nav { padding-top: 68px; }
}

/* ── 홈 첫 화면 — 사진 위 네이비 덮개와 흰 글자. 크기는 원래 CSS 그대로 ── */
#main .sec01 .swiper-slide > .img { position: relative; background: var(--navy); }
#main .sec01 .swiper-slide > .img::after { content: ''; position: absolute; inset: 0; background: var(--navy); opacity: .72; pointer-events: none; }
#main .sec01 .swiper-slide.chronic-care-slide > .img::after { display: none; }
#main .sec01 .swiper-slide .txt { z-index: 2; }
#main .sec01 .swiper-slide .txt :is(span,h1,h3,p,a,em) { color: white; }
#main .sec01 .swiper-slide .txt a { background: var(--cta); border: 1px solid white; border-radius: 8px; }
#main .sec01 .chronic-care-background { background: var(--navy); }

/* ── 홈 나머지 섹션 — 홈(.main_slide 가 있는 쪽)에만. 안내 쪽도 .sec02/.sec03 을 쓰므로 반드시 한정 ── */
#main:has(.main_slide) :is(.sec02,.sec03,.sec05,.sec06) { background: white; background-image: none; }
#main:has(.main_slide) :is(.sec02_tit,.sec_title,.sec03_tit,.sec05_tit) { color: var(--navy); }
#main:has(.main_slide) :is(.sec02_tit,.sec_title,.sec03_tit,.sec05_tit) h3 { color: var(--navy); }
#main:has(.main_slide) :is(.sec02_tit,.sec03_tit,.sec05_tit) h3::after { display: none; }
#main:has(.main_slide) :is(.sec02_tit,.sec_title,.sec03_tit,.sec05_tit) p { color: var(--navy); }
#main:has(.main_slide) .sec02 .sec02_list ul li { background: white; border: 1px solid var(--beige); border-radius: 8px; box-shadow: none; transform: none; }
#main:has(.main_slide) .sec02 .sec02_list ul li:hover { background: white; border-color: var(--navy); box-shadow: none; transform: none; }
#main:has(.main_slide) .sec02 .sec02_list ul li a :is(h4,p) { color: var(--navy); }
#main:has(.main_slide) .sec02 .sec02_list ul li a p::before { display: none; }
#main:has(.main_slide) .sec02 .sec02_list ul li a .img { border-radius: 50%; background: var(--beige); }
#main:has(.main_slide) .sec02 .sec02_list ul li a .img :is(img,svg) { filter: none; transform: none; }
#main:has(.main_slide) .sec03 .swiper-slide .img::before { display: none; }
#main:has(.main_slide) .sec03 .swiper-slide .txt { background: white; color: var(--navy); }
#main:has(.main_slide) .sec03 .swiper-slide .txt :is(span,h4) { color: var(--navy); }
#main:has(.main_slide) .sec06 .info_txt * { color: var(--navy); }
#main:has(.main_slide) .sec06 .direction :is(span,em) { background: var(--beige); color: var(--navy); }
#main:has(.main_slide) .sec06 .contact_btn a { color: white; }

/* ── 질환·안내 쪽(disease-detail.css 를 쓰는 쪽: sub10xx · 새 쪽 8) ── */
#main.disease-page { color: var(--navy); background: white; }
#main .disease-container { width: min(848px,calc(100% - 64px)); min-width: 0; margin: auto; }
#main .disease-hero { min-height: 280px; background: var(--beige); }
#main .disease-hero > img { display: none; }
#main .disease-hero-shade { background: none; }
#main .disease-hero-copy { padding-block: 48px; }
#main .disease-hero-copy :is(h1,p,span) { color: var(--navy); }
#main .disease-hero-copy h1 { font-size: var(--h1); line-height: 1.3; letter-spacing: -.04em; }
#main .disease-hero-copy p { font-size: 16px; margin-bottom: 8px; }
#main .disease-content { padding-bottom: 64px; }
#main .disease-content :is(p,li,td,th) { font-size: 16px; line-height: 1.7; }
#main .disease-content h2 { font-size: var(--h2); line-height: 1.4; letter-spacing: -.03em; }
#main .disease-content :is(h3,h4) { font-size: var(--h3); line-height: 1.4; letter-spacing: -.02em; }
#main .disease-breadcrumb { min-height: 64px; color: var(--navy); border-color: var(--beige); font-size: 16px; }
#main .disease-breadcrumb a { min-height: 44px; display: inline-flex; align-items: center; }
#main .disease-breadcrumb strong { color: var(--navy); }
#main .disease-summary { display: block; padding: 64px 0; }
#main .disease-summary > p { margin-top: 24px; color: var(--navy); font-size: 16px; line-height: 1.7; }
#main .disease-label, #main .disease-section-title span { color: var(--navy); font-size: 16px; }
#main .disease-section { padding: 48px 0; border-color: var(--beige); }
#main .disease-section-title { margin-bottom: 24px; }
#main :is(.disease-summary,.disease-section-title) h2 { border-left: 4px solid var(--navy); padding-left: 16px; font-size: var(--h2); }
#main :is(.symptom-grid,.check-grid) { gap: 16px; }
#main .symptom-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
#main :is(.symptom-grid,.check-grid) article { border: 1px solid var(--beige); border-radius: 8px; background: white; box-shadow: none; padding: 24px; min-height: 0; }
#main :is(.symptom-grid,.check-grid) article :is(span,p,h3) { color: var(--navy); font-size: 16px; line-height: 1.7; }
#main .symptom-grid article > span { background: var(--beige); }
#main .check-grid article h3 { font-size: var(--h3); }
#main .disease-alert { display: block; padding: 24px; border: 1px solid #a32626; border-radius: 8px; background: white; color: var(--navy); }
#main .disease-alert > p { color: var(--navy); margin-top: 16px; font-size: 16px; }
#main .disease-alert > div > span { color: var(--navy); border-color: var(--beige); }
#main .disease-alert h2 { font-size: var(--h2); }
#main .disease-contact { display: block; margin: 48px 0; padding: 32px; background: var(--beige); border: 0; border-radius: 8px; }
#main .disease-contact h2 { font-size: var(--h2); }
#main .disease-contact-actions { margin-top: 24px; flex-direction: row; flex-wrap: wrap; min-width: 0; }
#main .disease-contact-actions a:not(.button) { display: inline-flex; align-items: center; min-height: 44px; padding: 8px; color: var(--cta); }
#main .disease-sources, #main .disease-sources :is(strong,a) { color: var(--navy); font-size: 16px; border-color: var(--beige); }
#main .disease-sources a { min-height: 44px; display: inline-flex; align-items: center; }
#main .renewal-prose :is(p,li), #main .renewal-table :is(th,td) { color: var(--navy); font-size: 16px; line-height: 1.7; }
#main .renewal-table { overflow-x: auto; }
#main :is(.renewal-table,.disease-content) table { width: 100%; border-collapse: collapse; background: white; }
#main :is(.renewal-table,.disease-content) :is(th,td) { padding: 16px; border: 1px solid var(--beige); color: var(--navy); word-break: keep-all; overflow-wrap: anywhere; }  /* keep-all 만으로 한 글자씩 끊기지 않는다. 첫 칸 nowrap 은 음식 표에서 둘째 칸을 뭉갰으므로 뺐다(v7) */
#main :is(.renewal-table,.disease-content) th { background: var(--beige); }
@media (max-width: 820px) {
  :root { --h1: 32px; --h2: 24px; --h3: 20px; }
  #main .disease-container { width: calc(100% - 32px); }
  #main .disease-hero { min-height: 248px; }
  #main .disease-summary { padding: 48px 0; }
  #main .check-grid { grid-template-columns: 1fr; }
  #main :is(.symptom-grid,.check-grid) article { padding: 16px; }
  #main .disease-contact { padding: 24px; }
  #main .disease-contact-actions { flex-direction: column; }
}

/* ── 푸터 ── */
#footer { background: var(--navy); color: white; margin: 0; }
#footer#footer .container { width: min(1184px,calc(100% - 64px)) !important; min-width: 0 !important; max-width: 100%; padding: 48px 0 !important; margin: auto; display: grid; grid-template-columns: 2fr 1fr; gap: 32px; }
#footer .footer_info ul { display: flex; flex-wrap: wrap; gap: 8px 24px; }
#footer .footer_info ul li, #footer .footer_info ul li span, #footer :is(a,p) { color: white; font-size: 16px; line-height: 1.7; }
#footer .footer_info ul li { margin: 0; padding: 0; }
#footer .footer_info ul li::after { display: none; }
#footer a { min-height: 44px; display: inline-flex; align-items: center; }
#footer .copyright { margin: 0; }
#footer#footer .copyright { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 820px) {
  #footer { padding-bottom: 80px; }
  #footer#footer .container { width: calc(100% - 32px) !important; grid-template-columns: 1fr; padding: 32px 0 !important; }
  #footer .footer_info ul { display: block; }
  #footer .footer_info ul li { margin-bottom: 8px; }
}

/* ── 게시판 ── */
.board-container, .container-board { color: var(--navy); }
.board_tit { color: var(--navy); }
:is(#bo_list,#bo_v,#bo_cate) { color: var(--navy); }
:is(#bo_list,#bo_v) :is(th,td) { border-color: var(--beige); }
:is(#bo_list,#bo_v) a { color: var(--navy); }
#bo_list :is(th,td,a,span), #bo_v :is(p,a,span) { color: var(--navy); }
#bo_list :is(th,td) { background: white; }

/* ── 오른쪽 FMT 띄움 단추 · 휴대폰 하단 고정 단추 ── */
a.fmt-float, a.fmt-float:hover { background: var(--cta); border-color: var(--cta); box-shadow: none; color: white; transition: none; }
a.fmt-float .fmt-float-icon { color: var(--cta); background: white; }
a.fmt-float .fmt-float-copy :is(small,strong) { color: white; }
a.fmt-float .fmt-float-copy strong { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 820px) {
  .mobile-quickbar { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); position: fixed; inset: auto 0 0; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); background: white; border-top: 1px solid var(--beige); box-shadow: none; z-index: 998; }
  .mobile-quickbar a { display: flex; align-items: center; justify-content: center; min-height: 48px; background: var(--cta); color: white; border: 0; font-size: 16px; }
  .mobile-quickbar a:last-child { color: white; border-left: 1px solid white; }
  .mobile-quickbar a[href*='map.kakao'] { display: none; }
  .fmt-float, .floating, .float_menu { display: none; }
}

/* v9 — 휴대폰 홈: 원래 CSS 가 머리글을 흐름 안(sticky 68px)에 두면서도 본문 위 여백 81px(PC 고정 머리글용)을 그대로 둬 첫 화면 위가 비었다. 홈에만 0 으로. 안내 쪽은 자기 규칙으로 이미 붙어 있다 */
@media (max-width: 820px) {
  #main:has(.main_slide) { margin-top: 0; }
}

/* v10 — 홈 슬라이드 사진: 4·5번 img 에 width=3840 height=1600 속성이 있어 표준 모드에서 높이 1600px 으로 늘어나(왜곡) 슬라이드 묶음이 1600 이 되고 첫 화면 아래가 비었다. 폭 100%·높이 자동으로 — 1·2번(1920×800)·3번(12/5)·4·5번(3840/1600) 모두 2.4:1 로 같아진다 */
#main .sec01 .swiper-slide > .img img { width: 100%; height: auto; display: block; }

/* v11 — 질환 쪽 머리띠 그림 (코덱스 제안, 총괄 검수). 그림이 있는 머리띠에만 격자. 그림 없는 쪽(sub0103·0304·0305·en)은 변화 없음 */
#main .disease-hero .disease-hero-copy:has(.disease-hero-figure) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); column-gap: 24px; align-content: center; align-items: center; }
#main .disease-hero .disease-hero-copy:has(.disease-hero-figure) > :is(p, h1, span) { grid-column: 1; min-width: 0; overflow-wrap: anywhere; }
#main .disease-hero .disease-hero-figure { display: block; position: static; grid-column: 2; grid-row: 1 / 4; justify-self: center; align-self: center; width: 100%; height: 220px; object-fit: contain; border-radius: 12px; }
@media (max-width: 820px) {
  #main .disease-hero .disease-hero-copy:has(.disease-hero-figure) { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  #main .disease-hero .disease-hero-figure { grid-column: 1; grid-row: 4; width: 100%; height: 130px; margin-top: 20px; }
}

/* v12 — 오른쪽 FMT 띄움 단추 「대변이식센터」가 「대변이식센 / 터」로 갈라지던 것(대표 지적). 글자는 한 줄, 단추 폭은 글자에 맞춘다 */
a.fmt-float { width: auto !important; min-width: 0; padding-left: 12px; padding-right: 12px; }
a.fmt-float .fmt-float-copy strong, a.fmt-float .fmt-float-copy small { white-space: nowrap; overflow-wrap: normal; word-break: keep-all; }
