/* heritage.ayo.pe.kr — 국가유산·박물관·문화시설 독자 스킨 (2026-09-27, 사이트 고유 디자인 규칙).
 *
 * 콘셉트: **박물관 전시실 × 유물 명패**. 국가유산·박물관 페이지는 "이것이 무엇이고 언제 어디의 것인가" 를
 * 답하는 곳이라 전시실 벽·액자·유물 설명 명패·도록(카탈로그) 번호 말투로 화면을 짠다.
 * site.css(디자인 A) 위에 덮어쓰고 전부 body.site-heritage 아래로 가둔다 — 다른 사이트에 새지 않는다.
 *
 *   헤더   : 가운데 정렬 전시 현수막 + 이중선 + 아래 단청 띠(오방색 반복)
 *   탭     : 전시실 안내 글자(밑줄만, 선택 시 금박 밑줄)
 *   요약표 : 유물 명패(흰 판 + 왼쪽 금박 선 + 작은 표제)
 *   질답   : 도록 항목 — I · II · III 로마 숫자(금박 명조)
 *   목록   : 전시 벽 액자(이중 테두리 + 매트)
 *   메뉴   : 전시관 입구 아치 문
 *   글꼴   : 제목 Song Myung · 본문 Nanum Myeongjo
 *
 * ⚠️ 광고 유닛(<ins>·.ad-top·.ad-row 안쪽)에는 배경·테두리·라벨을 씌우지 않는다(site.css 애드센스 절).
 * ⚠️ 질문(h2)과 답(p) 사이에 요소를 끼우지 않는다 — 장식은 ::before/::after 로만.
 */

body.site-heritage {
  --fg: #221e19;
  --fg-soft: #4a433a;
  --muted: #7c7266;
  --line: #d9d0c1;
  --line-soft: #e8e1d4;
  --bg: #fffdf8;
  --bg-soft: #f3eee4;
  --accent: #8a5a1c;          /* 금박 갈색 */
  --accent-strong: #5f3c0f;
  --accent-soft: #f2e7d2;
  --accent-wash: #faf5ea;
  --accent-line: #d8c29c;
  --gilt: #a67c2e;
  --ink: #1f1b16;
  --dan-r: #b8322a;           /* 단청 주홍 */
  --dan-g: #2f6b4f;           /* 뇌록 */
  --dan-b: #28507a;           /* 군청 */
  --dan-y: #d9a52b;           /* 석간주 노랑 */
  --wall: #efebe3;            /* 전시실 벽 */
  --title: "Song Myung", "Nanum Myeongjo", "AppleMyungjo", serif;
  --dancheong: repeating-linear-gradient(90deg,
      var(--dan-r) 0 18px, #f4ecdc 18px 21px, var(--dan-g) 21px 39px, #f4ecdc 39px 42px,
      var(--dan-b) 42px 60px, #f4ecdc 60px 63px, var(--dan-y) 63px 81px, #f4ecdc 81px 84px);
  --radius: 2px;
  --wrap: 860px;
  background: var(--wall);
  font-family: "Nanum Myeongjo", "AppleMyungjo", "Batang", serif;
  line-height: 1.8;
}

body.site-heritage main,
body.site-heritage .site-foot,
body.site-heritage .ad-top,
body.site-heritage .top-search { max-width: var(--wrap); }

body.site-heritage h1,
body.site-heritage .brand,
body.site-heritage .qa-head,
body.site-heritage section.list > h2,
body.site-heritage section.children > h2,
body.site-heritage section.other-sites > h2,
body.site-heritage .near h2,
body.site-heritage .mapsec-head,
body.site-heritage .source h2,
body.site-heritage .menu-cards li > a {
  font-family: var(--title);
  font-weight: 400;
  letter-spacing: 0;
}

/* ── 헤더: 전시 현수막 ───────────────────────────────────────────────── */
body.site-heritage .site-head {
  position: relative;
  max-width: none;
  margin: 0 0 14px;
  padding: 26px 20px 30px;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  border-bottom: 0;
  background: var(--bg);
  border-top: 5px double var(--ink);
  text-align: center;
}
/* 단청 띠 */
body.site-heritage .site-head::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 10px;
  background: var(--dancheong);
  border-top: 2px solid var(--ink);
}
body.site-heritage .brand {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 2px;
}
body.site-heritage .brand::before,
body.site-heritage .brand::after {
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: 34px; height: 1px;
  margin: 0 14px;
  background: var(--gilt);
  box-shadow: 0 4px 0 var(--gilt);
}
body.site-heritage .brand a { color: var(--ink); }
body.site-heritage .brand a:hover { color: var(--accent); text-decoration: none; }
body.site-heritage .site-head nav { justify-content: center; gap: 4px 22px; }
body.site-heritage .site-head nav a {
  padding: 2px 2px 4px;
  border-radius: 0;
  background: transparent;
  color: var(--fg-soft);
  font-size: 15px;
  letter-spacing: 1px;
  border-bottom: 2px solid transparent;
}
body.site-heritage .site-head nav a:hover { background: transparent; color: var(--accent); border-bottom-color: var(--accent-line); text-decoration: none; }
body.site-heritage .site-head nav a.on { color: var(--ink); font-weight: 700; border-bottom-color: var(--gilt); }

/* 검색창 */
body.site-heritage .site-search input[type="search"] {
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  background: transparent;
  font-family: inherit;
}
body.site-heritage .site-search input[type="search"]:focus { outline: 0; border-bottom-color: var(--gilt); }
body.site-heritage .site-search button {
  border-radius: 0;
  background: var(--ink);
  font-family: var(--title);
  font-weight: 400;
  letter-spacing: 2px;
}
body.site-heritage .site-search button:hover { background: var(--accent); }

/* ── 제목·경로 ───────────────────────────────────────────────────────── */
body.site-heritage .crumb { font-size: 13px; letter-spacing: .5px; }
body.site-heritage .crumb a { color: var(--muted); }
body.site-heritage .crumb a::after { content: "  ·  "; color: var(--gilt); white-space: pre; }
body.site-heritage .crumb span { color: var(--ink); }

body.site-heritage h1 {
  position: relative;
  font-size: 34px;
  line-height: 1.35;
  color: var(--ink);
  margin: 26px 0 22px;
  padding-top: 18px;
}
/* 제목 위 금박 짧은 선 + 점 */
body.site-heritage h1::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 56px; height: 7px;
  background:
    linear-gradient(var(--gilt), var(--gilt)) 0 3px / 44px 1px no-repeat,
    radial-gradient(circle, var(--dan-r) 3px, transparent 3.5px) 100% 50% / 7px 7px no-repeat;
}
body.site-heritage .lead { margin: 0 0 24px; color: var(--fg-soft); font-size: 16.5px; }
body.site-heritage .data-date {
  margin: 0 0 20px;
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
}

/* ── 요약표: 유물 명패 ──────────────────────────────────────────────── */
body.site-heritage .summary {
  border: 1px solid var(--line);
  border-left: 4px solid var(--gilt);
  border-radius: 0;
  background: var(--bg);
  box-shadow: 0 1px 0 var(--line), 0 14px 24px -14px rgba(34, 30, 25, .25);
}
body.site-heritage .summary th {
  background: transparent;
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 2px;
}
body.site-heritage .summary td { font-weight: 700; color: var(--ink); }
body.site-heritage .summary tr + tr th,
body.site-heritage .summary tr + tr td { border-top: 1px solid var(--line-soft); }
body.site-heritage .summary td a:not(.btn) { color: var(--accent); }

body.site-heritage .btn { border-radius: 0; font-family: inherit; }
body.site-heritage .btn-phone { border: 1px solid var(--ink); color: var(--ink); background: transparent; }
body.site-heritage .btn-phone:hover { background: var(--ink); color: var(--bg); }

/* ── 질답: 도록 항목 ─────────────────────────────────────────────────── */
body.site-heritage .qa-head {
  justify-content: center;
  font-size: 20px;
  letter-spacing: 4px;
  color: var(--ink);
  margin: 0 0 4px;
}
body.site-heritage .qa-head::before {
  content: "";
  width: 40px; height: 1px;
  border-radius: 0;
  background: var(--gilt);
}
body.site-heritage .qa-head::after {
  content: "";
  width: 40px; height: 1px;
  background: var(--gilt);
}
body.site-heritage .qa-list {
  counter-reset: hq;
  padding: 4px 0;
  border: 0;
  border-top: 3px double var(--ink);
  border-bottom: 3px double var(--ink);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.site-heritage .qa-item {
  counter-increment: hq;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  column-gap: 8px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
body.site-heritage .qa-item h2 {
  grid-column: 2;
  font-family: "Nanum Myeongjo", serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 8px;
}
body.site-heritage .qa-item h2::before {
  content: counter(hq, upper-roman) ".";
  position: absolute;
  margin-left: -64px;
  width: 56px;
  text-align: right;
  font-family: var(--title);
  font-weight: 400;
  font-size: 19px;
  color: var(--gilt);
}
body.site-heritage .qa-item { position: relative; }
body.site-heritage .qa-item p {
  grid-column: 2;
  padding-left: 0;
  color: var(--fg-soft);
  font-size: 16px;
}
body.site-heritage .qa-list > ins.adsbygoogle { margin: 8px 0; }

/* ── 지도·주변 ───────────────────────────────────────────────────────── */
body.site-heritage .mapsec-head { color: var(--ink); font-size: 20px; }
body.site-heritage .map-box { border-radius: 0; }
body.site-heritage .map-canvas,
body.site-heritage .pano-canvas { border-radius: 0; }
body.site-heritage .near { border-top: 0; margin-top: 48px; }
body.site-heritage .near h2 {
  padding-left: 16px;
  border-left: 1px solid var(--gilt);
  box-shadow: inset 3px 0 0 var(--bg), inset 4px 0 0 var(--gilt);
  font-size: 19px;
  color: var(--ink);
}
body.site-heritage .near-block {
  padding: 4px 22px 18px;
  background: var(--bg);
  border: 1px solid var(--line);
}
body.site-heritage .near > .near-block > p,
body.site-heritage .near ul,
body.site-heritage .near .more { padding-left: 0; }
body.site-heritage .near ul li { padding: 6px 0; border-bottom: 1px dotted var(--line); }
body.site-heritage .dist {
  background: transparent;
  border: 1px solid var(--accent-line);
  border-radius: 0;
  color: var(--accent);
  font-style: italic;
}

/* ── 목록: 전시 벽 액자 ──────────────────────────────────────────────── */
body.site-heritage section.list > h2,
body.site-heritage section.children > h2,
body.site-heritage section.other-sites > h2 {
  font-size: 21px;
  color: var(--ink);
  text-align: center;
  border-bottom: 0;
  padding-bottom: 12px;
  background: linear-gradient(var(--gilt), var(--gilt)) center bottom / 60px 1px no-repeat;
  margin-bottom: 18px;
}
body.site-heritage .place-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
body.site-heritage .place-list li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 18px 16px 16px;
  border: 1px solid #3a3129;
  outline: 6px solid var(--bg);
  outline-offset: -8px;
  background: var(--bg);
  box-shadow: 0 0 0 5px #5b4a38, 0 0 0 6px #2c241c, 0 12px 18px -8px rgba(34, 30, 25, .35);
  margin: 6px;
}
body.site-heritage .place-list li:hover { box-shadow: 0 0 0 5px var(--gilt), 0 0 0 6px #6b4d18, 0 12px 18px -8px rgba(34, 30, 25, .35); }
body.site-heritage .place-list li > a { color: var(--ink); font-weight: 800; font-size: 16px; }
body.site-heritage .place-list li.ad-row {
  grid-column: 1 / -1;
  margin: 0; padding: 0; border: 0; outline: 0; background: none; box-shadow: none;
}
body.site-heritage .cat {
  order: -1;
  padding: 0;
  background: transparent;
  border-radius: 0;
  color: var(--dan-r);
  font-size: 11.5px;
  letter-spacing: 2px;
}
body.site-heritage .place-list li { min-width: 0; }
body.site-heritage .place-list li > * { max-width: 100%; }
body.site-heritage .addr { flex-basis: auto; font-size: 12.5px; font-style: italic; }

/* ── 지역: 전시실 층별 안내 ──────────────────────────────────────────── */
body.site-heritage .region-links {
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 0 20px;
}
body.site-heritage .region-links li {
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
}
body.site-heritage .region-links li > a { color: var(--ink); font-weight: 700; }
body.site-heritage .region-links li:hover { border-bottom-color: var(--gilt); }
body.site-heritage .region-links li:hover > a { color: var(--accent); }
body.site-heritage .count { font-style: italic; color: var(--gilt); }

/* 첫 화면 메뉴: 전시관 아치 문 */
body.site-heritage .menu-cards { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
body.site-heritage .menu-cards li {
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-height: 200px;
  padding: 24px 16px 22px;
  border: 1px solid var(--ink);
  border-radius: 999px 999px 0 0;
  background:
    radial-gradient(ellipse at 50% 0, rgba(166, 124, 46, .18), transparent 60%),
    var(--bg);
  box-shadow: inset 0 0 0 6px var(--bg), inset 0 0 0 7px var(--accent-line);
  text-align: center;
}
body.site-heritage .menu-cards li::after {
  content: "";
  order: -1;
  width: 60%;
  height: 8px;
  margin-bottom: auto;
  margin-top: 30px;
  background: var(--dancheong);
  opacity: .85;
}
body.site-heritage .menu-cards li:hover { background: var(--accent-wash); }
body.site-heritage .menu-cards li > a { font-size: 22px; color: var(--ink); }

/* ── 출처·삭제요청·바닥 ───────────────────────────────────────────────── */
body.site-heritage .source h2 { color: var(--ink); font-size: 18px; }
body.site-heritage .removal {
  border: 1px solid var(--line);
  border-top: 3px double var(--ink);
  border-radius: 0;
  background: var(--bg);
  box-shadow: none;
}
body.site-heritage .removal::before { content: none; }
body.site-heritage .removal-icon { border-radius: 50%; background: transparent; border: 1px solid var(--gilt); color: var(--gilt); font-family: var(--title); }
body.site-heritage .removal-title { font-family: var(--title); font-weight: 400; font-size: 17px; }
body.site-heritage .btn-removal { background: var(--ink); box-shadow: none; letter-spacing: 1px; }
body.site-heritage .btn-removal:hover { background: var(--accent); }

body.site-heritage .site-foot {
  position: relative;
  max-width: none;
  margin-top: 60px;
  padding: 30px max(20px, calc((100% - var(--wrap)) / 2 + 20px)) 44px;
  border-top: 0;
  background: #1f1b16;
  color: #cfc5b4;
  text-align: center;
}
body.site-heritage .site-foot::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 8px;
  background: var(--dancheong);
}
body.site-heritage .site-foot a { color: var(--dan-y); }

body.site-heritage main.not-found { text-align: center; }
body.site-heritage main.not-found h1::before { left: 50%; transform: translateX(-50%); }
body.site-heritage main.not-found .region-links { text-align: left; }

@media (max-width: 760px) {
  body.site-heritage .place-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 600px) {
  body.site-heritage .site-head { padding: 20px 16px 26px; }
  body.site-heritage .brand { font-size: 23px; letter-spacing: 1px; }
  body.site-heritage .brand::before,
  body.site-heritage .brand::after { content: none; }
  body.site-heritage .site-head nav { gap: 2px 14px; }
  body.site-heritage h1 { font-size: 26px; }
  body.site-heritage .place-list { grid-template-columns: 1fr; }
  body.site-heritage .qa-item { grid-template-columns: 38px minmax(0, 1fr); column-gap: 6px; }
  body.site-heritage .qa-item h2::before { margin-left: -44px; width: 38px; font-size: 16px; }
  body.site-heritage .menu-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  body.site-heritage .menu-cards li { min-height: 160px; }
  body.site-heritage .menu-cards li > a { font-size: 19px; }
}

/* ── 다크 모드: 폐관 후 전시실 ──────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  body.site-heritage {
    --fg: #ece5d8;
    --fg-soft: #c6bcaa;
    --muted: #978d7e;
    --line: #3d362d;
    --line-soft: #2f2a23;
    --bg: #1d1a16;
    --bg-soft: #26221c;
    --accent: #d7ae62;
    --accent-strong: #ecc67f;
    --accent-soft: #33291a;
    --accent-wash: #241f18;
    --accent-line: #5f4d2d;
    --gilt: #c9a15a;
    --ink: #f0e8d9;
    --wall: #14120f;
  }
  body.site-heritage .place-list li { border-color: #6b5a44; box-shadow: 0 0 0 5px #3a3026, 0 0 0 6px #6b5a44, 0 12px 18px -8px rgba(0, 0, 0, .6); }
  body.site-heritage .site-search button,
  body.site-heritage .btn-removal { background: #3a3228; color: var(--ink); }
  body.site-heritage .btn-phone:hover { color: #1d1a16; }
  body.site-heritage .site-foot { background: #0d0c0a; }
}
