/* =============================================================
 * 안동, 댐 아카이브 — 정적 데모 공통 스타일
 * DESIGN_SYSTEM.md §2 디자인 토큰을 정확히 반영. file:// 호환.
 * ============================================================= */

/* [adam] G-402: 그누보드 코어 페이지 (쪽지함 / 회원 가입·정보 등) 좌측 가장자리 붙음 fix.
   `.new_win` 은 그누보드 팝업 창 용도라 wrapper padding 부재 — 우리 사이트는 일반 페이지로 사용하므로
   max-width + center-margin + padding 추가해 다른 페이지와 정렬 일치. */
body > .new_win {
    max-width: 1280px;
    margin: 24px auto 48px;
    padding: 0 16px;
}
.new_win h1 { font-family: 'Noto Serif KR', serif; font-weight: 700; color: var(--text); margin: 0 0 16px; }
.new_win .new_win_con,
.new_win > section,
.new_win > article { padding-top: 8px; }

/* ----- 디자인 토큰 ----- */
:root {
  --bg:           #FAF7F2;
  --surface:      #FFFFFF;
  --surface-2:    #F5F0E6;
  --border:       #E5DFD5;
  --text:         #1F1B16;
  --text-sec:     #4A453E;
  --muted:        #5F584F;
  --primary:      #2C5F6F;
  --primary-soft: #E8F1F3;
  --primary-dark: #1A3F4A;
  --accent:       #845415;
  --accent-soft:  #F5EBDC;
  --success:      #2A8A5F;
  --warn:         #8A5A1D;
  --danger:       #B23A3A;

  --radius:     10px;
  --radius-img: 4px;
  --header-h:   64px;
  --tree-w:     260px;

  --shadow-card:   0 1px 2px rgba(0,0,0,.05);
  --shadow-hover:  0 6px 18px rgba(0,0,0,.08);
  --shadow-modal:  0 24px 64px rgba(0,0,0,.28);
}

[data-theme="dark"] {
  --bg:           #0F1416;
  --surface:      #1A2226;
  --surface-2:    #212B30;
  --border:       #2B3437;
  --text:         #EDE7DC;
  --text-sec:     #B9B1A4;
  --muted:        #8B847A;
  --primary:      #6FB6C7;
  --primary-soft: #1E3A5F;
  --primary-dark: #3A8C9F;
  --accent:       #D89E58;
  --accent-soft:  #3A2E1E;
}

/* ----- 리셋 ----- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  /* G-314: 컬러 이모지 폰트를 stack 끝에 추가 — Noto Sans 가 이모지 미지원이라 fallback 없으면 "?" 로 깨짐. */
  font-family: 'Pretendard Variable', 'Pretendard', 'Noto Sans KR', system-ui, -apple-system, 'Segoe UI', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'EmojiOne Color';
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.font-display { font-family: 'Noto Serif KR', 'Pretendard Variable', serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji'; letter-spacing: -.01em; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ----- 헤더 ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: block; /* [adam] G-425: 자식 정렬은 .site-header__inner 가 담당 */
  padding: 0;
}
/* [adam] G-425 / G-428: 헤더 내부 1440 컨테이너 — 사이트 표준 max-width 1440 (DESIGN_SYSTEM §1.5).
   로고/우측 utility 가 본문 좌·우 가장자리(.container 1440)에 정렬된다. */
.site-header__inner {
  width: 100%;
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-sizing: border-box;
}
.site-header .logo {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-family: 'Noto Serif KR', serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--primary);
  letter-spacing: -.02em;
  white-space: nowrap;
}
.site-header .logo small {
  display: inline-flex;
  align-items: center;
  align-self: center;
  height: 1em;
  margin-left: 7px;
  color: #5f6d68;
  font-family: 'Pretendard Variable', 'Noto Sans KR', sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  transform: translateY(1px);
}
.site-nav { display: flex; gap: 4px; flex: 1; }
.site-nav a {
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--text-sec);
  font-size: 14px;
  font-weight: 500;
}
.site-nav a:hover { background: var(--surface-2); text-decoration: none; }
.site-nav a.active { color: var(--primary); background: var(--primary-soft); }

.search-box {
  flex: 0 0 280px;
  position: relative;
}

/* 헤더 반응형 — 좁은 화면에서 search-box / nav 점진 축소 */
@media (max-width: 1100px) {
  .site-header__inner { gap: 16px; padding: 0 18px; }
  .search-box { flex: 0 0 200px; }
  .site-nav a { padding: 6px 8px; font-size: 13px; }
}
@media (max-width: 900px) {
  .search-box { display: none; }
  .site-header { gap: 12px; padding: 0 16px; }
}
@media (max-width: 640px) {
  .site-header .logo small { display: none; }
  .site-nav { gap: 0; overflow-x: auto; }
  .site-nav a { padding: 6px 6px; font-size: 12px; white-space: nowrap; }
}
.search-box input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
}
.search-box input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-color: var(--primary);
}
.search-box button {
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--text-sec);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: .65;
}
.search-box button:hover,
.search-box button:focus-visible {
  color: var(--primary);
  opacity: 1;
}
.search-box button svg {
  width: 16px;
  height: 16px;
}

/* ----- 컨테이너 ----- */
.container { max-width: 1440px; margin: 0 auto; padding: 24px; }
.container-narrow { max-width: 880px; margin: 0 auto; padding: 32px 24px; }
.container-wide { max-width: 1440px; margin: 0 auto; padding: 32px 24px; }
@media (max-width: 1480px) {
  .container-wide { padding: 24px 16px; }
}

/* ----- 버튼 ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: all .12s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: #8E6429; color: #fff; border-color: #8E6429; }
a.btn-accent { color: #fff !important; }
a.btn-accent:hover { color: #fff !important; text-decoration: none; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #8E2727; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 30px !important; padding: 0 10px !important; font-size: 13px !important; line-height: 1 !important; }
.btn-xs { height: 26px !important; padding: 0 8px !important; font-size: 12px !important; line-height: 1 !important; border-radius: 6px !important; }
.btn-lg { height: 44px !important; padding: 0 20px !important; font-size: 15px !important; }
a.btn, button.btn { line-height: 1; }
.adam-photo-list-btn {
  gap: 6px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(44,95,111,.18);
}
.adam-photo-list-btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.photo-meta-actions {
  align-items: center;
}
.photo-meta-actions .btn {
  min-width: 0;
  justify-content: center;
}
/* 댓글 영역 액션 버튼들 (삭제 폼 안 button + 관리 a 태그) 정렬 통일 */
.comment-item .actions { align-items: center; }
.comment-item .actions form { display: inline-flex; align-items: center; margin: 0; }
.comment-item .actions .btn,
.comment-item .actions form button.btn,
.comment-item .actions a.btn { display: inline-flex !important; align-items: center; height: 26px !important; padding: 0 8px !important; font-size: 11px !important; line-height: 1 !important; }

/* ----- 배지 ----- */
.badge {
  display: inline-flex; align-items: center;
  height: 20px; padding: 0 8px;
  border-radius: 999px;
  font-size: 11px; font-weight: 500;
  background: var(--surface-2);
  color: var(--text-sec);
}
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-accent  { background: var(--accent-soft); color: var(--accent); }
.badge-success { background: rgba(42,138,95,.12); color: var(--success); }
.badge-warn    { background: rgba(199,134,26,.12); color: var(--warn); }
.badge-danger  { background: rgba(178,58,58,.12); color: var(--danger); }
.badge-muted   { background: rgba(122,116,108,.12); color: var(--muted); }

/* ----- 카드 ----- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-header h2 { margin: 0; font-size: 18px; }
.card-body { padding: 20px; }

/* ----- 폼 ----- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 640px) {
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text-sec); }
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 0;
  border-color: var(--primary);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ----- 테이블 ----- */
.tbl { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 14px; }
.tbl thead th {
  background: var(--surface-2);
  color: var(--text-sec);
  font-weight: 600;
  font-size: 13px;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.tbl tbody td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr:last-child td { border-bottom: none; }
.row-actions { display: flex; gap: 4px; }

/* ----- 페이지네이션 ----- */
.pagination { display: flex; gap: 4px; align-items: center; justify-content: center; padding: 16px 0; }
.page-btn {
  min-width: 32px; height: 32px; padding: 0 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
}
.page-btn:hover { background: var(--surface-2); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* =============================================================
 * 사용자 페이지 — 아카이브 레이아웃
 * ============================================================= */
.archive-grid {
  display: grid;
  grid-template-columns: var(--tree-w) 1fr;
  gap: 24px;
  align-items: start;
  padding: 24px;
  max-width: 1440px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .archive-grid { grid-template-columns: 1fr; }
  .archive-tree { display: none; }
}

.archive-tree {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
}
.tree-section { margin-top: 12px; }
.tree-section:first-child { margin-top: 0; }
.tree-section h3 {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 8px 12px;
}
.tree-node {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  user-select: none;
}
.tree-node:hover { background: var(--surface-2); }
.tree-node.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.tree-node .chevron {
  width: 14px; display: inline-block; text-align: center;
  font-size: 10px; color: var(--muted); transition: transform .15s;
}
.tree-node.expanded .chevron { transform: rotate(90deg); }
.tree-node .label { flex: 1; }
.tree-node .count {
  background: rgba(122,116,108,.12);
  color: var(--muted);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 500;
}
.tree-children { padding-left: 16px; display: none; }
.tree-node.expanded + .tree-children { display: block; }

/* ----- 갤러리 ----- */
.archive-main { min-width: 0; }
.archive-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.archive-toolbar .crumb {
  font-size: 13px; color: var(--muted);
}
.archive-toolbar .crumb strong { color: var(--text); }
.archive-toolbar .count-label { font-size: 14px; color: var(--text-sec); font-weight: 600; }
.archive-toolbar select.form-select { height: 32px; width: auto; font-size: 13px; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: 16px;
}
.photo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-img);
  overflow: hidden;
  display: block;
  color: inherit;
  text-decoration: none;
  transition: box-shadow .2s, transform .2s;
}
.photo-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); text-decoration: none; }
.photo-card .thumb { aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; position: relative; }
.photo-card .thumb svg { width: 100%; height: 100%; display: block; }
.photo-card .cap { padding: 10px 12px; }
.photo-card .title { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--text); margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.photo-card .meta { font-size: 11px; color: var(--muted); }
.photo-card .wm {
  position: absolute;
  bottom: 6px; right: 8px;
  font-size: 9px;
  color: rgba(255,255,255,.85);
  font-family: 'Noto Serif KR', serif;
  letter-spacing: .04em;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
  pointer-events: none;
}

/* =============================================================
 * 사진 상세 / 라이트박스 페이지
 * ============================================================= */

/* 좌측 트리 + 메인(사진+메타) 2단 그리드 */
.detail-grid {
  display: grid;
  grid-template-columns: var(--tree-w) 1fr;
  gap: 24px;
  align-items: start;
  padding: 24px;
  max-width: 1440px;
  margin: 0 auto;
}
@media (max-width: 1100px) {
  .detail-grid { grid-template-columns: 220px 1fr; gap: 16px; padding: 16px; }
}
@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid .archive-tree { display: none; }
}

/* 메인 영역 안 — 사진 + 우측 메타 카드 (반응형)
 * v1.5.6: 우측 패널 360→280px (좌측 트리 260px 와 같이 있으면 본 콘텐츠가 너무 좁아짐).
 */
.photo-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: start;
  min-width: 0;
}
@media (max-width: 1280px) {
  .photo-detail { grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; }
}
@media (max-width: 1100px) {
  .photo-detail { grid-template-columns: minmax(0, 1fr) 240px; gap: 12px; }
}
@media (max-width: 980px) {
  .photo-detail { grid-template-columns: 1fr; }
}
.photo-figure {
  background: #1A1F22;
  border-radius: var(--radius);
  padding: 16px;
  position: relative;
  min-height: 480px;
  display: flex; align-items: center; justify-content: center;
}
.photo-figure svg { max-width: 100%; max-height: 70vh; border-radius: 4px; }
.photo-figure .wm-big {
  position: absolute;
  bottom: 24px; right: 32px;
  color: rgba(255,255,255,.7);
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  letter-spacing: .08em;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.adam-photo-set {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
}
.adam-photo-set__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.adam-photo-set__head h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
}
.adam-photo-set__head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.adam-photo-set__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
}
.adam-photo-set__item {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.adam-photo-set__item:hover,
.adam-photo-set__item:focus-visible {
  border-color: var(--primary);
  text-decoration: none;
}
.adam-photo-set__item:focus-visible {
  outline: 3px solid rgba(44, 95, 111, 0.28);
  outline-offset: 2px;
}
.adam-photo-set__item.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(44, 95, 111, 0.14);
}
.adam-photo-set__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: var(--surface-2);
}
.adam-photo-set__item span {
  display: block;
  padding: 8px 9px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adam-photo-zoom-btn {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(17,20,21,.62);
  color: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.adam-photo-zoom-btn:hover,
.adam-photo-zoom-btn:focus-visible {
  background: rgba(17,20,21,.82);
  border-color: rgba(255,255,255,.82);
  outline: none;
}
.adam-notice-view-grid > aside .btn.btn-sm {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  line-height: 1.2;
}
.adam-gallery-open {
  overflow: hidden;
}
.adam-gallery-viewer[hidden] {
  display: none !important;
}
.adam-gallery-viewer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 12px;
  padding: 28px;
  background: rgba(17, 20, 21, 0.88);
  backdrop-filter: blur(4px);
}
.adam-gallery-viewer__figure {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.adam-gallery-viewer__figure img {
  display: block;
  max-width: min(100%, 1180px);
  max-height: calc(100vh - 150px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
  background: #111;
}
.adam-gallery-viewer__figure figcaption {
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: min(100%, 900px);
  text-align: center;
}
.adam-gallery-viewer__figure strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 700;
}
.adam-gallery-viewer__figure span {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}
.adam-gallery-viewer__close,
.adam-gallery-viewer__nav {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s;
}
.adam-gallery-viewer__close:hover,
.adam-gallery-viewer__nav:hover,
.adam-gallery-viewer__close:focus-visible,
.adam-gallery-viewer__nav:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
  outline: none;
}
.adam-gallery-viewer__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
}
.adam-gallery-viewer__nav {
  width: 56px;
  height: 72px;
  border-radius: 8px;
  font-size: 46px;
  line-height: 1;
  justify-self: center;
}
.adam-gallery-viewer.is-single {
  grid-template-columns: minmax(0, 1fr);
}
.adam-gallery-viewer.is-single .adam-gallery-viewer__nav {
  display: none;
}
@media (max-width: 760px) {
  .adam-gallery-viewer {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    padding: 54px 14px 18px;
  }
  .adam-gallery-viewer__figure img {
    max-height: calc(100vh - 190px);
  }
  .adam-gallery-viewer__figure figcaption {
    flex-direction: column;
    gap: 4px;
  }
  .adam-gallery-viewer__figure strong {
    max-width: 90vw;
  }
  .adam-gallery-viewer__nav {
    position: fixed;
    bottom: 18px;
    width: calc(50vw - 24px);
    height: 46px;
    font-size: 34px;
  }
  .adam-gallery-viewer__nav--prev {
    left: 14px;
  }
  .adam-gallery-viewer__nav--next {
    right: 14px;
  }
}
.photo-meta-card { padding: 20px; }
.photo-meta-card h1 { font-size: 22px; margin: 0 0 4px; font-family: 'Noto Serif KR', serif; line-height: 1.3; }
.photo-meta-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.photo-meta dl { margin: 0; }
.photo-meta dt { font-size: 12px; color: var(--muted); margin-top: 12px; }
.photo-meta dd { font-size: 14px; color: var(--text); margin: 2px 0 0; }

.comment-list { margin-top: 20px; }
.comment-item {
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.comment-item .name { font-size: 13px; font-weight: 600; }
.comment-item .name .provider { font-size: 10px; padding: 1px 5px; border-radius: 4px; margin-left: 6px; background: var(--surface-2); color: var(--muted); }
.comment-item .time { font-size: 11px; color: var(--muted); margin-left: 6px; }
.comment-item .body { font-size: 13px; color: var(--text-sec); margin-top: 4px; line-height: 1.55; }

/* =============================================================
 * 관리자 레이아웃
 * ============================================================= */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - var(--header-h));
}
.admin-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 16px 8px;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
}
.admin-sidebar h4 {
  font-size: 11px; color: var(--muted); margin: 12px 12px 4px;
  letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
}
.admin-sidebar a {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-sec);
}
.admin-sidebar a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.admin-sidebar a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.admin-main { padding: 24px; min-width: 0; }
.admin-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.admin-header h1 { margin: 0 0 4px; font-size: 24px; }
.admin-header .sub { color: var(--muted); font-size: 13px; }
.admin-header .actions { display: flex; gap: 8px; }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}
.kpi-label { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .03em; }
.kpi-val { font-size: 28px; font-weight: 700; color: var(--text); margin-top: 4px; }
.kpi-sub { font-size: 12px; color: var(--success); margin-top: 2px; }
.kpi-sub.neg { color: var(--danger); }

/* Alert / Soft backgrounds */
.alert {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid;
  font-size: 13px;
  margin-bottom: 16px;
}
.alert-info { background: var(--primary-soft); border-color: rgba(44,95,111,.2); color: var(--primary-dark); }
.alert-warn { background: rgba(199,134,26,.10); border-color: rgba(199,134,26,.25); color: var(--warn); }
.alert-danger { background: rgba(178,58,58,.10); border-color: rgba(178,58,58,.25); color: var(--danger); }
.row-draft-soft { background: rgba(122,116,108,.06); }
.row-warn-soft  { background: rgba(199,134,26,.07); }
.row-danger-soft { background: rgba(178,58,58,.06); }

/* Dropzone */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  background: var(--surface-2);
  transition: all .15s;
}
.dropzone:hover, .dropzone.drag-over {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.dropzone .icon { font-size: 32px; color: var(--muted); }
.dropzone .title { font-size: 14px; font-weight: 600; margin-top: 8px; }
.dropzone .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab-btn {
  padding: 10px 16px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-weight: 500;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }
.tab-btn:hover { color: var(--text); }

/* ----- 푸터 ----- */
.site-footer {
  margin-top: 64px;
  padding: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
}
.site-footer a { color: var(--muted); margin: 0 6px; }

/* ----- 기타 유틸 ----- */
.text-muted { color: var(--muted); }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 16px; } .mt-4 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 16px; } .mb-4 { margin-bottom: 24px; }
.flex { display: flex; }
.gap-2 { gap: 8px; } .gap-3 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.hidden { display: none; }

/* ----- 모션 감소 ----- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =============================================================
 * 2안(아카이브 중심) 핵심 컴포넌트 통합 — v0.6
 *   - 메인의 큰 검색창 + 빠른 필터 chip
 *   - record-card (배지 + 기록번호 + 요약 + chip)
 *   - filter-panel (좌측 sticky)
 *   - chips-bar (선택된 필터)
 *   - result-toolbar (개수/정렬/뷰 토글)
 *   - citation / rights-note (상세 페이지)
 *   - collection-card (메인 컬렉션)
 *   - timeline-preview, map-preview (메인 진입 카드)
 * ============================================================= */

/* ── 메인 큰 검색 ───────────────────────────────── */
.c-index-search {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 24px;
  padding: 24px;
}
.c-search-panel {
  max-width: 920px;
  margin: 0 auto;
}
.c-search-panel__form {
  display: flex;
  gap: 8px;
  background: var(--surface);
  padding: 8px;
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}
.c-search-panel__input {
  flex: 1;
  height: 52px;
  border: none;
  background: transparent;
  padding: 0 16px;
  font-size: 16px;
  color: var(--text);
  font-family: inherit;
}
.c-search-panel__input:focus { outline: none; }
.c-search-panel__btn {
  height: 52px;
  padding: 0 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.c-search-panel__btn:hover { background: var(--primary-dark); }

.c-search-panel__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 14px;
  align-items: center;
}
.c-search-panel__quick::before {
  content: '빠른 필터';
  color: var(--muted);
  font-size: 12px;
  margin-right: 6px;
}
.c-search-panel__quick a {
  display: inline-block;
  padding: 5px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-sec);
  text-decoration: none;
}
.c-search-panel__quick a:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

/* ── 기록 카드 ──────────────────────────────────── */
.c-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 20px;
}
.c-record-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.c-record-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.c-record-card__thumb-link {
  display: block;
}
.c-record-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  overflow: hidden;
}
.c-record-card__thumb svg,
.c-record-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.c-record-card__thumb.img-error::before {
  content: '🖼 이미지 준비 중';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px;
}
.c-record-card__badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.c-record-card__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.c-record-card__recno {
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .04em;
}
.c-record-card__collection {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}
.c-record-card__title {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Noto Serif KR', 'Pretendard Variable', serif;
  line-height: 1.4;
}
.c-record-card__title a {
  color: var(--text);
  text-decoration: none;
}
.c-record-card__title a:hover { color: var(--primary); }
.c-record-card__meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.c-record-card__summary {
  font-size: 13px;
  color: var(--text-sec);
  line-height: 1.55;
  margin: 4px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.c-record-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: auto;
  padding-top: 8px;
}

/* ── 기록 유형 배지 (마을/사진/구술/문헌) ──────── */
.c-record-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .03em;
  background: rgba(255,255,255,.95);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.c-record-badge--village { background: #31596F; color: #fff; border-color: #2D5266; }
.c-record-badge--photo   { background: #7A4E14; color: #fff; border-color: #5C3E22; }
.c-record-badge--oral    { background: #3E6B35; color: #fff; border-color: #31592A; }
.c-record-badge--doc     { background: #61472C; color: #fff; border-color: #4F3924; }
.c-record-badge--sm { height: 20px; font-size: 10px; padding: 0 6px; }

/* ── 공개 범위 배지 ─────────────────────────────── */
.c-availability-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(255,255,255,.95);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.c-availability-badge--public  { background: #E8F1F3; color: #1A3F4A; border-color: rgba(44,95,111,.3); }
.c-availability-badge--partial { background: #FCF1E0; color: #8E6429; border-color: rgba(176,125,58,.3); }
.c-availability-badge--private { background: #F4E4E4; color: #8E2727; border-color: rgba(178,58,58,.3); }
.c-availability-badge--pending { background: #ECEAE5; color: #4A453E; border-color: var(--border); }

.c-record-group-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(255,255,255,.96);
  color: #7A4E14;
  border: 1px solid rgba(122,78,20,.35);
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
  white-space: nowrap;
}
.c-record-card__badges .c-record-badge--sm,
.c-record-card__badges .c-record-group-badge,
.c-record-card__badges .c-availability-badge {
  box-sizing: border-box;
  height: 20px;
  min-height: 20px;
  padding: 0 6px;
  font-size: 10px;
  line-height: 1;
  align-items: center;
}

/* ── chip (키워드 / 필터 제거 가능) ────────────── */
.c-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: var(--surface-2);
  color: var(--text-sec);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.c-chip--keyword { color: var(--accent); background: var(--accent-soft); border-color: rgba(176,125,58,.25); }
.c-chip--filter { background: var(--primary-soft); color: var(--primary); border-color: rgba(44,95,111,.3); padding-right: 4px; }
.c-chip__remove {
  width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 10px;
  border-radius: 50%;
  padding: 0;
  margin-left: 2px;
}
.c-chip__remove:hover { background: rgba(44,95,111,.15); }

/* ── 필터 패널 (좌측 sticky) ─────────────────────── */
.c-filter-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  position: sticky;
  top: calc(var(--header-h) + 16px);
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.c-filter-panel__header {
  flex: 0 0 auto;
  position: relative;
  background: var(--surface);
  z-index: 3;
  padding: 12px 10px 9px;
  margin: 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.c-filter-panel__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 4px 12px 10px;
}
.c-filter-panel__actions {
  display: none;
}
.c-filter-panel__apply {
  border: none;
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.c-filter-panel__title { font-size: 14px; font-weight: 700; color: var(--text); }
.c-filter-panel__reset {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.c-filter-panel__reset:hover { color: var(--primary); text-decoration: underline; }
.c-filter-panel fieldset {
  border: none;
  padding: 8px 0 6px;
  margin: 0;
  border-bottom: 1px solid var(--border);
}
.c-filter-panel fieldset:last-child { border-bottom: none; }
.c-filter-panel legend {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .04em;
  margin-bottom: 5px;
  padding: 0;
  text-transform: uppercase;
}
.c-filter-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  min-width: 0;
}
.c-filter-panel label:hover { color: var(--primary); }
.c-filter-panel label input[type="checkbox"] {
  width: 14px; height: 14px;
  accent-color: var(--primary);
}

/* ── 필터 패널 안의 권역 트리 (체크박스 + 펼침) ── */
.c-filter-tree { margin: 3px 0 0; }
.c-filter-tree__node {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text);
  position: relative;
  min-width: 0;
}
.c-filter-tree__node:hover { color: var(--primary); }
.c-filter-tree__toggle {
  width: 16px; height: 18px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s;
  flex-shrink: 0;
}
.c-filter-tree__toggle--placeholder {
  visibility: hidden;
}
.c-filter-tree__toggle[aria-expanded="true"] { transform: rotate(90deg); }
.c-filter-tree__label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  min-width: 0;
}
.c-filter-tree__label input[type="checkbox"] {
  width: 14px; height: 14px;
  accent-color: var(--primary);
  flex-shrink: 0;
}
.c-filter-tree__name {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: keep-all;
}
.c-filter-tree__count {
  font-size: 10px;
  color: var(--muted);
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 999px;
  flex-shrink: 0;
}
.c-filter-tree__children {
  padding-left: 12px;
  border-left: 1px dashed var(--border);
  margin-left: 6px;
  margin-top: 1px;
  margin-bottom: 2px;
}
.c-filter-tree__children[hidden] { display: none; }
.c-filter-tree__node[data-level="dam"] .c-filter-tree__name { font-weight: 700; color: var(--text); }
.c-filter-tree__node[data-level="dong_myeon"] .c-filter-tree__name { font-weight: 500; }
.c-filter-tree__node[data-level="village"] .c-filter-tree__name { font-size: 12px; color: var(--text-sec); }

/* ── chips-bar (적용된 필터 표시) ────────────────── */
.c-chips-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.c-chips-bar:empty { display: none; }
.c-chips-bar::before {
  content: '적용된 필터';
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-right: 4px;
}
.c-chips-bar__clear {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
  margin-left: auto;
}

/* ── 결과 툴바 ──────────────────────────────────── */
.c-result-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.c-result-count { font-size: 14px; color: var(--text-sec); font-weight: 500; }
.c-result-count strong { color: var(--primary); font-weight: 700; }
.c-result-toolbar__right { display: flex; gap: 8px; align-items: center; }
.c-view-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}
.c-view-toggle__btn {
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.c-view-toggle__btn.is-active { background: var(--primary); color: #fff; }
.c-view-toggle__btn:hover:not(.is-active) { background: var(--surface-2); color: var(--text); }
.c-result-sort {
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  font-size: 13px;
  color: var(--text);
  font-family: inherit;
}

/* ── 검색 결과 레이아웃 (필터 + 결과 2단) ────── */
.c-result-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 1100px) {
  .c-result-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 900px) {
  .c-result-layout { grid-template-columns: 1fr; }
  .c-filter-panel { display: none; }
  .c-filter-panel.is-open {
    display: flex; flex-direction: column;
    position: fixed; inset: 0;
    z-index: 600;
    border-radius: 0; max-height: none;
    background: var(--surface);
    overflow: hidden; padding: 0;
    box-shadow: 0 -8px 24px rgba(0,0,0,0.18);
    animation: adam-filter-slide-up .25s ease-out;
  }
  /* 닫기 버튼 — JS 가 만들지 않더라도 ::after 로 sticky 동작 버튼 출력 */
  .c-filter-panel.is-open .c-filter-panel__header {
    position: relative; top: auto; background: var(--surface);
    margin: 0; padding: 14px 20px;
    border-bottom: 1px solid var(--border); z-index: 2;
  }
  .c-filter-panel.is-open .c-filter-panel__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 20px 16px;
  }
  /* "닫기/적용" floating action */
  .c-filter-panel.is-open::after {
    content: "✕  닫기 / 적용";
    position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
    background: var(--primary); color: white; padding: 10px 24px;
    border-radius: 24px; font-size: 14px; font-weight: 600;
    box-shadow: 0 6px 18px rgba(0,0,0,0.20);
    cursor: pointer; z-index: 5;
    pointer-events: none; /* 실제 닫기는 body 클릭 핸들러가 처리 (아래 JS) */
  }
  /* 모바일 필터 열린 상태일 때 body scroll lock */
  body.adam-filter-open { overflow: hidden; }
}
.c-filter-panel.is-open::after {
  content: none;
  display: none;
}
.c-filter-panel.is-open .c-filter-panel__actions {
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
  padding: 10px 20px 16px;
  background: linear-gradient(to top, var(--surface) 72%, rgba(255,255,255,0));
  pointer-events: auto;
  z-index: 4;
}
.c-filter-panel.is-open .c-filter-panel__apply {
  min-width: 124px;
  height: 42px;
  padding: 0 22px;
  border-radius: 24px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.20);
}
@keyframes adam-filter-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.c-filter-toggle-btn {
  display: none;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  align-items: center;
  gap: 6px;
}
@media (max-width: 900px) {
  .c-filter-toggle-btn { display: inline-flex; margin-bottom: 12px; }
}

/* Records search bar: keep archive/detail aligned in the same 1440px shell.
   Form left offset = container padding 24px + filter 260px + gap 24px. */
.c-records-search-bar {
  width: 100%;
  max-width: 1440px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  margin: 0 auto 16px;
}
.c-records-search-bar__form {
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 0 calc(24px + var(--tree-w) + 24px); /* 좌측: container padding + tree + gap = 308px */
}
@media (max-width: 1100px) {
  .c-records-search-bar__form {
    padding-left: calc(24px + 220px + 16px);          /* 260px */
    padding-right: 24px;
  }
}
@media (max-width: 900px) {
  .c-records-search-bar__form {
    padding-left: 16px;
    padding-right: 16px;
  }
}
.c-records-search-bar__input {
  flex: 1;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
.c-records-search-bar__input:focus {
  outline: 2px solid var(--primary);
  border-color: var(--primary);
}
.c-records-search-bar__count { color: var(--muted); font-size: 13px; margin-left: auto; }
.c-records-search-bar__count strong { color: var(--primary); }

/* ── 컬렉션 카드 (메인) ────────────────────────── */
.c-collection-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 20px;
}
.c-collection-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s;
}
.c-collection-card:hover {
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}
.c-collection-card__img {
  background: linear-gradient(135deg, #2C5F6F 0%, #1A3F4A 100%);
  position: relative;
  min-height: 200px;
}
.c-collection-card__img img {
  width: 100%; height: 100%; object-fit: cover;
}
.c-collection-card__body { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.c-collection-card__title {
  margin: 0;
  font-size: 18px;
  font-family: 'Noto Serif KR', serif;
  font-weight: 700;
  color: var(--text);
}
.c-collection-card__meta {
  display: flex; gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.c-collection-card__meta strong { color: var(--accent); font-weight: 700; }
.c-collection-card__desc {
  font-size: 13px;
  color: var(--text-sec);
  line-height: 1.65;
  margin: 4px 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.c-collection-card__chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; }
@media (max-width: 600px) {
  .c-collection-card { grid-template-columns: 1fr; }
  .c-collection-card__img { min-height: 160px; }
}

/* ── 섹션 타이틀 ───────────────────────────────── */
.c-section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
}
.c-section-title h2 {
  margin: 0;
  font-family: 'Noto Serif KR', serif;
  font-size: 24px;
  font-weight: 700;
}
.c-section-title__more {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}
.c-section-title__more:hover { color: var(--primary); text-decoration: underline; }

/* ── 지도/연표 미리보기 (메인 진입 카드) ──────── */
.c-index-map-preview {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  align-items: stretch;
}
.c-index-map-preview__text {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.c-index-map-preview__text h2 {
  font-family: 'Noto Serif KR', serif;
  font-size: 24px;
  margin: 0 0 12px;
}
.c-index-map-preview__text p { color: var(--text-sec); line-height: 1.7; margin: 0 0 16px; }
.c-index-map-preview__legend {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.c-index-map-preview__legend li {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 0;
  font-size: 13px; color: var(--text-sec);
}
.c-index-map-preview__map {
  position: relative;
  min-height: 320px;
  background: #B6D4DC;
}
.c-index-map-preview__map img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.c-index-map-preview__map-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.c-map-marker {
  position: absolute;
  color: var(--danger);
  font-size: 20px;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
}
@media (max-width: 800px) {
  .c-index-map-preview { grid-template-columns: 1fr; }
}

/* ── 연표 (메인 미리보기) ──────────────────────── */
.c-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.c-timeline::before {
  content: '';
  position: absolute;
  left: 80px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}
.c-timeline__item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  padding: 16px 0;
  position: relative;
}
.c-timeline__item::before {
  content: '';
  position: absolute;
  left: 75px;
  top: 24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  z-index: 1;
}
.c-timeline__year {
  font-family: 'Noto Serif KR', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}
.c-timeline__title { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--text); }
.c-timeline__desc { font-size: 13px; color: var(--text-sec); line-height: 1.65; margin: 0; }
.c-timeline__link {
  font-size: 12px;
  color: var(--primary);
  margin-left: 8px;
  text-decoration: none;
}
.c-timeline__link:hover { text-decoration: underline; }

/* ── 큐레이션 스토리 카드 ──────────────────────── */
.adam-timeline-preview-card {
  min-height: 414px;
  display: flex;
}
.adam-timeline-preview-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.adam-timeline-preview-item {
  min-width: 0;
  align-items: start;
}
.adam-timeline-preview-item > div {
  min-width: 0;
}
.adam-timeline-preview-desc,
.adam-timeline-preview-item span[style*="font-size:12px"] {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  line-height: 1.55;
  word-break: keep-all;
}
@media (max-width: 900px) {
  .adam-timeline-preview-card {
    min-height: auto;
  }
  .adam-timeline-preview-list {
    display: block;
  }
}

.c-story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 16px;
}
.c-story-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.c-story-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.c-story-card__link { display: block; text-decoration: none; color: inherit; }
.c-story-card__img {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #3A7585, #2C5F6F);
  overflow: hidden;
}
.c-story-card__img img { width: 100%; height: 100%; object-fit: cover; }
.c-story-card__body { padding: 18px 20px; }
.c-story-card__label { font-size: 11px; color: var(--accent); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.c-story-card__title {
  margin: 4px 0 6px;
  font-family: 'Noto Serif KR', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.c-story-card__desc { font-size: 13px; color: var(--text-sec); line-height: 1.6; margin: 0; }

/* ── 인용 형식 블록 ─────────────────────────────── */
.c-citation {
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  padding: 14px 16px;
  border-radius: 0 6px 6px 0;
  font-size: 12px;
  color: var(--text-sec);
  line-height: 1.7;
  margin: 12px 0;
}
.c-citation__label {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.c-citation__text {
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  color: var(--text);
  line-height: 1.7;
}
.c-citation__copy {
  margin-top: 6px;
  font-size: 11px;
  color: var(--primary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

/* ── 권리 정보 ─────────────────────────────────── */
.c-rights-note {
  background: rgba(199,134,26,.06);
  border: 1px solid rgba(199,134,26,.2);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--text-sec);
  line-height: 1.65;
  margin: 12px 0;
}
.c-rights-note__title {
  font-size: 11px;
  font-weight: 700;
  color: var(--warn);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 4px;
  display: flex; align-items: center; gap: 4px;
}
.adam-photo-protect,
.adam-photo-protect img {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* ── 시안/Beta 안내 배너 (옵션) ───────────────── */
.c-source-note {
  background: rgba(122,116,108,.08);
  border: 1px dashed var(--border);
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  text-align: center;
  margin: 8px 0;
}

/* ── 빈 상태 ───────────────────────────────────── */
.c-empty-state {
  padding: 64px 24px;
  text-align: center;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}
.c-empty-state__icon { font-size: 36px; opacity: .4; }
.c-empty-state__title { font-size: 16px; font-weight: 700; margin: 12px 0 6px; }
.c-empty-state__desc { font-size: 13px; color: var(--muted); margin: 0; }

/* ── 페이지 헤더 ───────────────────────────────── */
.c-page-header {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  padding: 28px 0 24px;
  margin: 0 0 24px;
  width: 100%;
  box-sizing: border-box;
}
.c-page-header > .container,
.c-page-header > .container-wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}
.c-page-header h1 {
  font-family: 'Noto Serif KR', serif;
  font-size: 26px;
  margin: 8px 0 4px;
}
.c-page-header__desc { color: var(--muted); margin: 4px 0 0; font-size: 13px; }
.c-crumb { font-size: 12px; color: var(--muted); }
.c-crumb a { color: var(--muted); text-decoration: none; }
.c-crumb a:hover { color: var(--primary); text-decoration: underline; }

/* ── 모달 ───────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 500;
  display: none;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-modal);
  width: min(560px, 90vw);
  max-height: 90vh;
  display: flex; flex-direction: column;
}
.modal-header { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { margin: 0; font-size: 18px; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

/* =============================================================
 * [adam] G-247: SNS 로그인 모달 + 댓글 영역 로그인 CTA
 * ============================================================= */
.adam-login-modal { width: min(420px, 92vw) !important; }
.adam-login-modal .modal-header { align-items: flex-start; padding: 20px 24px 16px; }
.adam-login-modal .modal-body { padding: 20px 24px 24px; }
.adam-login-modal__close {
    background: transparent; border: none; cursor: pointer;
    min-width: 42px; height: 32px; padding: 0 10px; border-radius: 6px;
    font-size: 12px; color: var(--muted);
    display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.adam-login-modal__close:hover { background: var(--surface-2); color: var(--text); }
.adam-login-modal__divider {
    display: flex; align-items: center; gap: 8px;
    margin: 16px 0; color: var(--muted); font-size: 12px;
}
.adam-login-modal__divider::before,
.adam-login-modal__divider::after {
    content: ""; flex: 1 1 auto; height: 1px; background: var(--border);
}
.adam-sns-btn {
    display: flex; align-items: center; gap: 12px;
    width: 100%; height: 48px;
    padding: 0 16px;
    border-radius: 8px; border: 1px solid transparent;
    font-size: 14px; font-weight: 500;
    text-decoration: none;
    transition: filter 0.15s, transform 0.05s;
    margin-bottom: 8px;
}
.adam-sns-btn:hover { filter: brightness(0.95); }
.adam-sns-btn:active { transform: translateY(1px); }
.adam-sns-btn__icon {
    flex: 0 0 24px; width: 24px; height: 24px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 4px; font-weight: 700; font-size: 14px;
}
.adam-sns-btn__label { flex: 1 1 auto; text-align: center; }
.adam-sns-btn--kakao { background: #FEE500; color: #391B1B; }
.adam-sns-btn--kakao .adam-sns-btn__icon { background: rgba(0,0,0,0.10); color: #391B1B; }
.adam-sns-btn--naver { background: #03C75A; color: white; }
.adam-sns-btn--naver .adam-sns-btn__icon { background: rgba(255,255,255,0.20); color: white; }
.adam-sns-btn--google { background: white; color: #3C4043; border-color: #dadce0; }
.adam-sns-btn--google .adam-sns-btn__icon { background: #4285F4; color: white; }
.adam-social-disabled {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    word-break: keep-all;
}

/* 댓글 영역 로그인 CTA */
.adam-login-cta {
    display: flex; align-items: center; gap: 12px;
    flex-wrap: wrap; justify-content: space-between;
}
.adam-login-cta__actions { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 600px) {
    .adam-login-cta { flex-direction: column; align-items: flex-start; }
    .adam-login-cta__actions { width: 100%; }
}

/* =============================================================
 * [adam] 그누보드 메인페이지 — 히어로 (D-005 추가, demo/index.html 인라인 스타일을 클래스로 추출)
 * ============================================================= */
.adam-hero {
  padding: 80px 24px 64px;
  text-align: center;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}
.adam-hero__eyebrow {
  letter-spacing: 0.25em;
  font-size: 12px;
  margin: 0;
}
.adam-hero__title {
  margin: 16px 0 0;
  font-size: clamp(36px, 6vw, 52px);
  font-weight: 700;
  line-height: 1.1;
}
.adam-hero__lead {
  max-width: 560px;
  margin: 24px auto 0;
  font-size: 16px;
  line-height: 1.7;
}
.adam-hero__cta {
  justify-content: center;
  margin-top: 32px;
}

/* =============================================================
 * [adam] D-005: 그누보드 기본 출력 잔재 숨김 (v1.6.4 패치)
 * head.sub.php 의 #hd_login_msg, #hd_h1 등이 우리 헤더와 중복 출력되어 숨김.
 * ============================================================= */

/* screen-reader 전용 텍스트 (그누보드 표준 .sound_only) */
.sound_only {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    margin: -1px !important;
    padding: 0 !important;
}

/* 그누보드 기본 head.sub.php 출력 — 우리 .site-header 와 중복이라 숨김 */
#hd_login_msg,
#hd_h1,
#skip_to_container {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* 그누보드 게시판/스킨 영역의 잔재 요소 */
.sound_only_focusable:focus {
    position: static !important;
    left: auto !important;
    width: auto !important;
    height: auto !important;
}

/* tail.php 의 #aside (외부 로그인/설문조사 사이드) — 메인페이지에서는 숨김 */
body #aside { display: none; }

/* =============================================================
 * [adam] D-005: 그누보드 wrapper 폭 제한 해제 (v1.6.4 패치 2)
 * default.css 의 #container_wr {width:1200px} 가 본문을 좁힘.
 * demo 의 1280px wide + 풀폭 site-header/site-footer 를 살린다.
 * ============================================================= */

body #wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important; /* [adam] G-472: default.css 의 #hd,#wrapper,#ft{min-width:1200px} 가 모바일·태블릿 viewport 에서 1200px 강제 → 가로 넘침(body overflow:hidden 으로 가려졌으나 실 모바일 가로 스크롤 위험). min-width 해제로 풀 반응형. */
    margin: 0 !important;
    padding: 0 !important;
}
/* [adam] G-472: 헤더(#hd)·푸터(#ft) 도 default.css min-width:1200px 해제 — 모바일 반응형 (.site-header/.site-footer 가 실제 헤더/푸터지만 그누보드 wrapper id 잔존 대비). */
body #hd, body #ft {
    min-width: 0 !important;
}
/* 그누보드 wrapper 는 풀폭 — 폭 제한은 안쪽의 .container / .container-wide 가 담당 */
body #container_wr {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}
body #container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: auto !important;
}

/* 메인페이지에서는 container 좌우 패딩 제거 (히어로/검색바가 풀폭이도록) */
body.adam-page-home #container,
.adam-hero,
.c-records-search-bar,
.c-index-search {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* 메인페이지 히어로/검색바는 풀폭 배경 + 내부에 .container 로 폭 제한 */
.adam-hero { padding: 80px 24px 64px !important; max-width: 100% !important; }

/* hr 가 헤더 뒤에 자동 출력되는 그누보드 기본을 제거 */
body > hr,
#hd + hr,
#hd_wrapper + hr,
.site-header + hr {
    display: none !important;
}

/* container 클래스 — 모든 페이지 1440px 통일 (사용자 요구) */
.container,
.container-wide,
.container-narrow {
    width: 100% !important;
    max-width: 1440px !important;
    margin: 0 auto !important;
    padding: 24px !important;
    box-sizing: border-box !important;
}

/* [adam] G-424-fix / G-427: 컨텐츠 페이지(content.php — guide/copyright/privacy/donation_guide 등) 외곽 wrapper.
   헤더(.site-header__inner, max-width 1280) / 메인(.adam-hero-a__inner) / 푸터(.site-footer__grid) 와 동일한 1280 정렬.
   주의. line 1920 의 `main { max-width: 1440px; }` 와 line 3149 의 `body main { ... }` 가 더 specific 하므로
        셀렉터 specificity 와 !important 둘 다 사용해 override 한다. */
main.adam-content-page,
body main.adam-content-page,
.adam-content-page {
    width: 100% !important;
    max-width: 1440px !important;
    margin: 0 auto !important;
    padding: 24px 24px 64px !important;
    box-sizing: border-box !important;
}
/* [adam] G-427/G-428: 우리 .adam-content-page__card 가 #ctt 의 max-width:880 으로 좁아지던 문제 해결.
   사이트 표준 .c-page-header > .container 는 본래 1440 이므로 별도 override 불필요. */
#ctt.adam-content-page__card,
article#ctt.adam-content-page__card {
    max-width: none !important;
    width: 100% !important;
}
.adam-content-page__crumb {
    font-size: 13px;
    color: var(--muted);
    padding: 4px 0 16px;
}
.adam-content-page__card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px 48px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
@media (max-width: 768px) {
    .adam-content-page { padding: 16px 16px 48px; }
    .adam-content-page__card { padding: 28px 20px; border-radius: 8px; }
}

/* 메인 영역 안의 폭 제한 — 그누보드 페이지에서 main 도 1440 으로 */
main {
    width: 100% !important;
    max-width: 1440px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

/* 헤더/푸터는 풀폭이지만 내부 컨텐츠는 1440 으로 정렬 */
.site-header, .site-footer {
    width: 100% !important;
    max-width: none !important;
}

/* =============================================================
 * [adam] G-218: 그누보드 기본 출력 잔재 추가 숨김
 * 공지/기증 페이지 좌측 상단에 그누보드 #container_title 이 중복 표시되는 것 제거
 * ============================================================= */

#container_title,
.new_subject,
#hd_h1,
#skip_to_container,
#hd_login_msg,
#hd_define,
#hd_qnb,
#tnb,
#bo_v_top,
#aside,
.bo_fx > .btn_bo_user,
#bo_list_total {
    display: none !important;
}

/* 그누보드 기본 검색 box, 글쓰기 box 가 노출되지 않도록 */
.bo_sch_wrap { display: none !important; }

/* 그누보드 board.php list 가 출력하는 #bo_list, #bo_v 컨테이너 폭 */
#bo_list, #bo_v, #bo_w {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* page-header 의 box-sizing 보정 */
.c-page-header,
.c-records-search-bar,
.c-result-layout {
    box-sizing: border-box !important;
}

/* =============================================================
 * [adam] G-219: 헤더 우측 버튼 폰트 보정 + 그누보드 write/view 폼 톤
 * ============================================================= */

/* 헤더 우측 로그인/관리자/로그아웃 영역 — 폰트 크기 강제 */
.site-header .hd_login_actions {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    flex: 0 0 auto !important;
}
.site-header .hd_login_actions a,
.site-header .hd_login_actions span,
.site-header .hd_login_actions .btn {
    font-size: 13px !important;
    height: 30px !important;
    padding: 0 12px !important;
    line-height: 28px !important;
    white-space: nowrap !important;
    border-radius: 6px !important;
}
/* [adam] G-485: 위 blanket 규칙(.hd_login_actions span/a !important)이 회원 드롭다운 메뉴
   (.adam-userbar__menu) 내부의 span(아이콘·배지)까지 30px/13px/padding 으로 비대화 → 메뉴 내부 span 은
   자연 렌더로 환원 (드롭다운은 로그인 액션 버튼이 아니라 메뉴 항목이므로 blanket 의도 대상 아님). */
.site-header .hd_login_actions .adam-userbar__menu span {
    font-size: inherit !important;
    height: auto !important;
    padding: 0 !important;
    line-height: normal !important;
    border-radius: 0 !important;
    white-space: normal !important;
}
/* [adam] G-485: 알림 미열람 배지 — 컴팩트 고정 pill (blanket·reset 둘 다 이기는 specificity). */
.site-header .hd_login_actions .adam-userbar__menu .adam-userbar__badge {
    display: inline-block !important;
    min-width: 16px;
    height: 16px !important;
    line-height: 16px !important;
    padding: 0 5px !important;
    margin-left: 6px;
    background: #b03a2e;
    color: #fff;
    font-size: 10px !important;
    font-weight: 600;
    text-align: center;
    border-radius: 8px !important;
    box-sizing: border-box;
}
.site-header .hd_login_msg {
    color: var(--text-sec) !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    padding: 0 4px !important;
}
.site-header .btn-primary {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}
.site-header .btn-ghost {
    background: transparent !important;
    border-color: var(--border) !important;
    color: var(--text-sec) !important;
}

/* 그누보드 게시판 글쓰기 페이지 (bbs/write.php) — 우리 톤으로 */
#bo_w {
    width: 100% !important;
    max-width: 1440px !important;
    margin: 24px auto !important;
    padding: 24px !important;
    box-sizing: border-box !important;
}
#bo_w h2, #bo_w h3 {
    color: var(--text);
    font-family: 'Noto Serif KR', serif;
}
#bo_w .write_div,
#bo_w fieldset {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    padding: 16px !important;
    margin-bottom: 12px !important;
    box-shadow: var(--shadow-card);
}
#bo_w label.frm_label,
#bo_w label[for] {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text-sec) !important;
}
#bo_w .frm_input,
#bo_w input[type=text],
#bo_w input[type=password],
#bo_w textarea,
#bo_w select {
    width: 100% !important;
    padding: 9px 12px !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    background: var(--surface) !important;
    color: var(--text) !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
}
#bo_w .frm_input:focus,
#bo_w textarea:focus,
#bo_w select:focus {
    outline: 2px solid var(--primary) !important;
    outline-offset: 0 !important;
    border-color: var(--primary) !important;
}
#bo_w .btn_confirm {
    text-align: right !important;
    margin-top: 16px !important;
}
#bo_w .btn_submit,
#bo_w .btn_cancel {
    height: 40px !important;
    padding: 0 24px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
}
#bo_w .btn_submit {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}
#bo_w .btn_cancel {
    background: var(--surface) !important;
    color: var(--text-sec) !important;
    border: 1px solid var(--border) !important;
}

/* =============================================================
 * [adam] G-225: 사용자 페이지 가로 스크롤 종합 안전망
 * ============================================================= */
html, body { overflow-x: hidden !important; max-width: 100vw; }
body > * { max-width: 100vw; box-sizing: border-box; }

/* c-records-search-bar 폼은 별도 max-width 1440px 으로 가운데 정렬 — site-header 와 일관 */
.c-records-search-bar { width: 100%; box-sizing: border-box; }
.c-records-search-bar__form { box-sizing: border-box; }

/* =============================================================
 * [adam] G-246: 전체 페이지 디자인 통일성 — 반응형 / 폼 / 카드 보강
 * ============================================================= */

/* 모든 사용자 페이지 main 영역 — 1440px 일관성 */
main, main.container-wide, main.container { max-width: 1440px; margin: 0 auto; width: 100%; box-sizing: border-box; }
main > .container { padding-left: 24px; padding-right: 24px; }

/* 1100px 이하 → 컨테이너 패딩 줄임 */
@media (max-width: 1100px) {
    main { padding: 0 16px; }
    .container, .container-wide { padding: 0 16px !important; }
}

/* 768px 이하 → 모바일 적응 */
@media (max-width: 768px) {
    .c-page-header { padding: 20px 0 16px !important; }
    .c-page-header h1 { font-size: 22px !important; }
    .c-page-header__desc { font-size: 12px !important; }
    .site-header { flex-wrap: wrap; padding: 8px 12px !important; }
    .site-nav { width: 100%; order: 3; }
    .search-box { order: 4; flex: 1 1 100%; }
    /* 카드 / 폼 정렬 */
    .card-header { padding: 14px 16px !important; flex-wrap: wrap; gap: 8px; }
    .card-body { padding: 16px !important; }
    .photo-detail .photo-figure { aspect-ratio: 4/3; }
    /* 게시판 메타카드 sticky 해제 */
    .photo-meta-card { position: static !important; }
    /* 그리드 -> 단일 컬럼 */
    .photo-detail article, .photo-detail .grid {
        grid-template-columns: 1fr !important;
    }
}

/* [adam] G-524: Notice/donation board lists become readable cards on narrow screens. */
@media (max-width: 600px) {
    body main.container-wide table.adam-board-table--mobile-card {
        display: block !important;
        width: 100% !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        overflow: visible !important;
    }
    body main.container-wide table.adam-board-table--mobile-card thead {
        display: none !important;
    }
    body main.container-wide table.adam-board-table--mobile-card tbody {
        display: grid !important;
        gap: 8px !important;
        width: 100% !important;
    }
    body main.container-wide table.adam-board-table--mobile-card tbody tr {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
        column-gap: 10px;
        row-gap: 4px;
        width: 100% !important;
        padding: 12px 14px !important;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: var(--surface);
        box-sizing: border-box;
    }
    body main.container-wide table.adam-board-table--mobile-card tbody tr.row-warn-soft {
        background: rgba(199,134,26,.07);
    }
    body main.container-wide table.adam-board-table--mobile-card tbody td {
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        text-align: left !important;
        box-sizing: border-box;
    }
    body main.container-wide table.adam-board-table--mobile-card tbody td:nth-child(1) {
        grid-column: 1;
        min-width: 48px !important;
        padding-top: 1px !important;
        text-align: center !important;
    }
    body main.container-wide table.adam-board-table--mobile-card tbody td:nth-child(2) {
        grid-column: 2;
    }
    body main.container-wide table.adam-board-table--mobile-card tbody td:nth-child(2) a {
        display: inline !important;
        max-width: 100% !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        word-break: keep-all;
        overflow-wrap: anywhere;
        font-size: 13px !important;
        line-height: 1.45 !important;
    }
    body main.container-wide table.adam-board-table--mobile-card tbody td:nth-child(n+3) {
        display: none !important;
    }
    body main.container-wide table.adam-board-table--mobile-card .badge {
        white-space: nowrap !important;
    }
}

/* 카드 호버 효과 (글로벌) */
.c-record-card, .c-story-card { transition: transform 0.18s, box-shadow 0.18s; }
.c-record-card:hover, .c-story-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(31,27,22,0.10); }

/* 빈 상태 (empty state) — 일관 톤 */
.c-empty-state {
    text-align: center; padding: 48px 24px;
    background: var(--surface);
    border: 1px dashed var(--border); border-radius: var(--radius);
    color: var(--muted);
}
.c-empty-state__icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.c-empty-state__title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.c-empty-state__desc { font-size: 13px; color: var(--muted); }

/* 토스트/알림 메시지 일관성 */
.alert {
    padding: 12px 16px; border-radius: 8px;
    margin: 12px 0; font-size: 14px; line-height: 1.6;
}
.alert-info { background: var(--primary-soft, #E8F1F3); color: var(--primary-dark, #1A3F4A); border-left: 4px solid var(--primary); }
.alert-success { background: #C6F0D4; color: #205A38; border-left: 4px solid var(--success, #2A8A5F); }
.alert-warn { background: #FFE7B5; color: #6E5210; border-left: 4px solid var(--warn, #C7861A); }
.alert-error, .alert-danger { background: #FBD4D4; color: #6E1010; border-left: 4px solid var(--danger, #B23A3A); }

/* =============================================================
 * [adam] G-252: 재점검 사이클 — 폴리시 (모바일/오버플로/일관성)
 * ============================================================= */

/* 1. archive list 의 chip-bar 가 좁은 화면에서 overflow 스크롤 가능 */
.c-chips-bar {
    overflow-x: auto; flex-wrap: wrap;
    -webkit-overflow-scrolling: touch;
}
@media (max-width: 768px) {
    .c-chips-bar { flex-wrap: nowrap; padding-bottom: 4px; }
    .c-chip { flex: 0 0 auto; }
}

/* 2. 메인 페이지 hero 모바일 폰트 */
@media (max-width: 768px) {
    .adam-hero h1, .hero-title { font-size: 26px !important; line-height: 1.3 !important; }
    .adam-hero .adam-hero__sub, .hero-sub { font-size: 14px !important; }
    .c-search-panel__form { flex-direction: column; gap: 8px; }
    .c-search-panel__form input { width: 100%; }
    .c-search-panel__quick { gap: 6px; }
    .c-search-panel__quick a { font-size: 12px; padding: 4px 10px; }
}

/* 3. 사진 상세 큰 사진 영역 — sticky 메타카드와 함께 grid 보장 */
.photo-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}
@media (max-width: 1100px) {
    .photo-detail { grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; }
}
@media (max-width: 768px) {
    .photo-detail { grid-template-columns: 1fr; }
    .photo-detail .photo-meta-card { position: static !important; order: 0; }
}
.photo-figure { width: 100%; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--surface-2); }
.photo-figure img, .photo-figure svg { display: block; width: 100%; height: auto; }
.photo-figure .wm-big {
    position: absolute; right: 12px; bottom: 12px;
    color: rgba(255,255,255,0.7); font-size: 11px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
    pointer-events: none;
}

/* 4. .meta-card / .photo-meta-card 일관 톤 */
.photo-meta-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-card);
}
.photo-meta-card .photo-meta dl { display: grid; grid-template-columns: 80px 1fr; gap: 8px 12px; margin: 0; }
.photo-meta-card .photo-meta dt { font-size: 12px; color: var(--muted); font-weight: 500; margin: 0; }
.photo-meta-card .photo-meta dd { margin: 0; font-size: 13px; color: var(--text); }

/* 5. .c-rights-note — 권리 정보 박스 */
.c-rights-note {
    margin-top: 16px; padding: 12px 14px;
    background: var(--accent-soft, #F5EBDC);
    border-radius: 8px; border-left: 4px solid var(--accent);
    font-size: 12px; line-height: 1.6;
}
.c-rights-note__title { font-weight: 700; color: var(--text); margin-bottom: 4px; }

/* 6. 빠른 필터 링크 hover */
.c-search-panel__quick a {
    transition: all 0.12s;
    border-radius: 16px;
}
.c-search-panel__quick a:hover {
    background: var(--primary) !important; color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(44,95,111,0.20);
}

/* 7. footer 모바일 정렬 */
@media (max-width: 600px) {
    .site-footer { padding: 24px 16px; }
    .site-footer__links { gap: 8px 12px; font-size: 12px; }
    .site-footer__company { font-size: 11px; }
    #top_btn { width: 40px; height: 40px; right: 16px; bottom: 16px; }
}

/* =============================================================
 * [adam] G-253: 사용자 페이지 모바일 반응형 종합 정리
 * 768 / 600 / 480 / 380 — 단계별 정렬
 * ============================================================= */

/* ── 768px 이하 (태블릿) ── */
@media (max-width: 768px) {
    /* 헤더: 로고/네비/검색을 적층 */
    .site-header {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 14px !important;
        height: auto !important;
        min-height: 0 !important;
    }
    .site-header .logo {
        flex: 1 1 auto;
        font-size: 16px !important;
    }
    .site-header .logo small {
        display: none !important;
    }
    .site-header .hd_login_actions {
        flex: 0 0 auto;
        order: 2;
    }
    .site-header .hd_login_actions a,
    .site-header .hd_login_actions span {
        font-size: 12px !important;
        height: 28px !important;
        padding: 0 10px !important;
        line-height: 26px !important;
    }
    .site-header .site-nav {
        order: 3;
        flex: 1 1 100%;
        gap: 0;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: thin;
        padding-bottom: 4px;
    }
    .site-header .site-nav a {
        padding: 6px 10px !important;
        font-size: 13px !important;
    }
    .site-header .search-box {
        order: 4;
        flex: 1 1 100%;
    }
    .site-header .search-box input[type=search] {
        width: 100% !important;
    }

    /* 히어로 */
    .adam-hero {
        padding: 40px 20px 32px !important;
    }
    .adam-hero__title { font-size: 32px !important; margin-top: 12px !important; }
    .adam-hero__eyebrow { font-size: 11px !important; }
    .adam-hero__lead { font-size: 14px !important; margin-top: 16px !important; }
    .adam-hero__cta { flex-direction: column; gap: 8px !important; margin-top: 20px; }
    .adam-hero__cta .btn { width: 100%; max-width: 280px; }

    /* 검색 패널 */
    .c-search-panel { padding: 16px !important; }
    .c-search-panel__form { flex-direction: column !important; gap: 8px !important; }
    .c-search-panel__form input { width: 100% !important; }
    .c-search-panel__btn { width: 100% !important; }
    .c-search-panel__quick { flex-wrap: wrap !important; gap: 6px !important; justify-content: center; }

    /* 섹션 타이틀 */
    .c-section-title { flex-wrap: wrap; gap: 8px; margin-bottom: 16px !important; }
    .c-section-title h2 { font-size: 22px !important; }
    .c-section-title__more { font-size: 13px !important; }

    /* 컬렉션 — 1단 */
    .c-collection-list { grid-template-columns: 1fr !important; gap: 16px !important; }
    .c-collection-card__body { padding: 14px !important; }
    .c-collection-card__title { font-size: 16px !important; }

    /* 대표 기록 그리드 — 2단 */
    #featuredGrid, .c-result-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    /* 스토리 카드 — 1단 */
    .c-story-grid { grid-template-columns: 1fr !important; gap: 16px !important; }

    /* 페이지 헤더 */
    .c-page-header { padding: 24px 0 18px !important; }
    .c-page-header h1 { font-size: 22px !important; }
    .c-page-header__desc { font-size: 13px !important; }

    /* container 좌우 패딩 보정 */
    .container, .container-wide { padding: 0 16px !important; }
    section.container { padding: 32px 16px !important; }
}

/* ── 600px 이하 (작은 태블릿/큰 폰) ── */
@media (max-width: 600px) {
    .adam-hero__title { font-size: 28px !important; }
    .adam-hero { padding: 32px 16px 24px !important; }
    section.container { padding: 24px 16px !important; }
    .c-section-title h2 { font-size: 20px !important; }
}

/* ── 480px 이하 (모바일) ── */
@media (max-width: 480px) {
    /* 헤더 더 컴팩트 */
    .site-header .logo { font-size: 15px !important; }
    .site-header .hd_login_actions { gap: 4px !important; }
    .site-header .hd_login_actions a { padding: 0 8px !important; font-size: 11px !important; }
    .site-header .hd_login_msg { display: none !important; }

    /* 히어로 더 작게 */
    .adam-hero__title { font-size: 24px !important; }
    .adam-hero__lead { font-size: 13px !important; }
    .adam-hero__lead br { display: none; }

    /* 대표 기록 — 1단 */
    #featuredGrid, .c-result-grid {
        grid-template-columns: 1fr !important;
    }

    /* 카드 내부 패딩 축소 */
    .c-record-card__body { padding: 12px !important; }
    .c-record-card__title { font-size: 14px !important; }
    .c-record-card__summary { font-size: 12px !important; -webkit-line-clamp: 2; }

    /* 페이지 헤더 */
    .c-page-header h1 { font-size: 20px !important; }
}

/* ── 380px 이하 (작은 폰) ── */
@media (max-width: 380px) {
    .site-header { padding: 8px 12px !important; }
    .site-header .logo { font-size: 14px !important; }
    .site-header .site-nav a { padding: 4px 8px !important; font-size: 12px !important; }
    .adam-hero__title { font-size: 22px !important; }
    .c-section-title h2 { font-size: 18px !important; }
    section.container { padding: 20px 12px !important; }
}

/* ── 사진 상세 페이지 모바일 ── */
@media (max-width: 768px) {
    .photo-detail { grid-template-columns: 1fr !important; gap: 16px !important; }
    .photo-detail .photo-meta-card {
        position: static !important;
        order: 0; /* DOM 순서대로 사진 다음에 메타 표시 */
    }
    .photo-figure { border-radius: 8px; }
    .photo-meta-card h1 { font-size: 20px !important; }
    .photo-meta-card .photo-meta dl {
        grid-template-columns: 70px 1fr !important;
        gap: 6px 10px !important;
    }
    /* 댓글 영역 */
    .comment-item { padding: 10px 0 !important; }
    .comment-item .body { font-size: 13px !important; }
}

/* ── 게시판 (notice/donation) view 모바일 ── */
@media (max-width: 768px) {
    /* 상세 페이지의 .grid (sidebar) — 1단 */
    main.container-wide .grid[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    main.container-wide aside.card {
        position: static !important;
    }
}

/* ── 콘텐츠 페이지 (greeting/location) 모바일 ── */
@media (max-width: 768px) {
    .con_body, .content-page {
        padding: 16px !important;
        font-size: 14px;
        line-height: 1.7;
    }
}

/* ── 메인 페이지 추가 반응형 (G-255) ── */
@media (max-width: 1100px) {
    /* 메인 컬렉션/대표기록 — 2단 */
    .c-collection-list { grid-template-columns: 1fr 1fr !important; }
    #featuredGrid, .c-result-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 900px) {
    /* 메인 컬렉션 — 1단 */
    .c-collection-list { grid-template-columns: 1fr !important; }
    #featuredGrid, .c-result-grid { grid-template-columns: repeat(2, 1fr) !important; }
    /* 메인 hero CTA 가로 */
    .adam-hero__cta { gap: 8px; }
    /* 빠른 필터 가로 스크롤 */
    .c-search-panel__quick { overflow-x: auto; white-space: nowrap; padding-bottom: 4px; }
    .c-search-panel__quick a { display: inline-block; flex: 0 0 auto; }
}

/* ── 사진 상세 추가 반응형 (G-255) ── */
@media (max-width: 1100px) {
    .photo-detail {
        grid-template-columns: minmax(0, 1fr) 280px !important;
        gap: 16px !important;
    }
    .photo-meta-card { padding: 16px !important; }
    .photo-meta-card h1 { font-size: 18px !important; }
}
@media (max-width: 900px) {
    .photo-detail { grid-template-columns: 1fr !important; }
    .photo-meta-card { position: static !important; order: 0; max-width: 100%; }
    .photo-figure { aspect-ratio: 4/3; max-width: 100%; }
    .photo-figure svg, .photo-figure img { width: 100% !important; height: auto !important; }
    /* 같은 마을 다른 사진 그리드 — 2단 */
    #relatedGrid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
}
@media (max-width: 500px) {
    .photo-detail { gap: 12px !important; }
    .photo-meta-card { padding: 14px !important; }
    .photo-meta-card .photo-meta dl { grid-template-columns: 60px 1fr !important; gap: 4px 8px !important; }
    .photo-meta-card .photo-meta dd { font-size: 12px !important; }
    #relatedGrid { grid-template-columns: 1fr !important; }
    /* 액션 버튼 그룹 - 가로 스크롤 */
    .photo-meta-card > div[style*="flex"] { flex-wrap: wrap; gap: 4px !important; }
}

/* =============================================================
 * G-259: 카드 그리드 2단 (모바일에서도) — 사용자 의도 반영 */
/* =============================================================
 * G-258: 카드 그리드 단일 컬럼 강제 — 스크린샷에서 잘려 보이던 이슈 해결
 * 작은 viewport 에서는 카드 그리드 자동 폭 minmax 가 카드 폭이 viewport 보다 큰 경우 발생
 * ============================================================= */

/* 모든 카드 그리드 자식 — min-width: 0 으로 overflow 방지 */
.c-result-grid > *, .c-story-grid > *, .c-collection-list > * { min-width: 0 !important; }

/* SVG/이미지 — viewport 보다 넓어지지 않게 */
.c-record-card svg, .c-record-card img,
.c-story-card svg, .c-story-card img,
.c-collection-card svg, .c-collection-card img,
.photo-figure svg, .photo-figure img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* body 가로 스크롤 안전망 */
html, body { max-width: 100vw !important; overflow-x: hidden !important; }
* { max-width: 100%; }

/* 768px 이하 (태블릿/큰 모바일) — 그리드 2단 (1단이 아닌 2단으로 화면에 맞게) */
@media (max-width: 768px) {
    #featuredGrid,
    .c-result-grid,
    #relatedGrid,
    .c-story-grid,
    main #resultGrid,
    main .c-result-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    /* 컬렉션은 카드가 커서 1단 유지 */
    .c-collection-list { grid-template-columns: 1fr !important; gap: 12px !important; }
    /* 카드 컴팩트 */
    .c-record-card__body { padding: 12px !important; }
    .c-record-card__title { font-size: 14px !important; line-height: 1.35 !important; }
    .c-record-card__summary { font-size: 11px !important; line-height: 1.5 !important; -webkit-line-clamp: 2; }
    .c-record-card__recno { font-size: 10px !important; }
    .c-record-card__collection { font-size: 11px !important; }
    .c-record-card__chips { gap: 2px !important; }
    .c-record-card__chips .c-chip { font-size: 10px !important; padding: 1px 5px !important; }
    .c-record-card__badges { gap: 4px !important; }
    .c-record-card__badges .c-record-badge--sm,
    .c-record-card__badges .c-record-group-badge,
    .c-record-card__badges .c-availability-badge {
        height: 18px !important;
        min-height: 18px !important;
        font-size: 9px !important;
        padding: 0 4px !important;
    }
    /* 컬렉션 카드 본문 */
    .c-collection-card__body { padding: 14px !important; }
    .c-collection-card__title { font-size: 16px !important; }
    .c-collection-card__desc { font-size: 13px !important; }
    /* 페이지 헤더 dec */
    .c-page-header { padding: 18px 16px !important; }
}

/* 480px 이하 (작은 폰) — 카드는 여전히 2단 유지, 다만 더 컴팩트 */
@media (max-width: 480px) {
    #featuredGrid, .c-result-grid, #relatedGrid, main #resultGrid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    .c-story-grid { grid-template-columns: 1fr !important; }  /* 스토리는 텍스트 많으니 1단 */
    .c-record-card__body { padding: 10px !important; }
    .c-record-card__title { font-size: 13px !important; }
    .c-record-card__summary { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* 360px 이하 (아주 작은 폰) — 그래도 2단 유지, 다만 카드 매우 컴팩트 */
@media (max-width: 360px) {
    #featuredGrid, .c-result-grid, #relatedGrid, main #resultGrid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }
    .c-record-card__body { padding: 8px !important; }
    .c-record-card__title { font-size: 12px !important; line-height: 1.3 !important; }
    .c-record-card__summary { display: none !important; }
    .c-record-card__chips { display: none !important; }
}

/* photo detail 의 inline style override — 항상 2단 (큰 카드 1단 안 함) */
@media (max-width: 768px) {
    #relatedGrid[style*="grid-template-columns"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* G-260 marker — site.css 동기화 확인용 */
/* =============================================================
 * G-262: 모바일 2단 그리드 — 최종 강제 (어떤 분기에서도 1단 안 되게)
 * 우선순위 가장 높이 — file 끝부분에 추가
 * ============================================================= */
@media (max-width: 900px) {
    #featuredGrid,
    .c-result-grid,
    #relatedGrid,
    main #resultGrid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .c-record-card { max-width: 100% !important; }
    .c-record-card__thumb { aspect-ratio: 4/3 !important; }
}
@media (max-width: 768px) {
    /* 컨테이너 좌우 패딩 줄여 카드 더 큰 영역 활용 */
    main, main.container-wide, section.container {
        padding-left: 12px !important; padding-right: 12px !important;
    }
}
/* 카드 안 SVG 가 절대 카드 영역 안 머무름 — overflow: hidden 안전망 */
.c-record-card, .c-collection-card, .c-story-card {
    overflow: hidden !important;
    min-width: 0 !important;
}
.c-record-card *, .c-collection-card *, .c-story-card * {
    max-width: 100% !important;
    min-width: 0 !important;
}
.c-record-card__thumb-link {
    display: block; width: 100%; overflow: hidden;
}

/* =============================================================
 * G-264: 메인 2단 그리드 viewport 초과 방지 — 최강제
 * grid 자체와 grid items 모두 viewport 안에 fit
 * ============================================================= */
#featuredGrid, .c-result-grid, #relatedGrid {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
#featuredGrid > *, .c-result-grid > *, #relatedGrid > * {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}
/* SVG/이미지 안 — viewport 보다 큰 intrinsic 차단 */
#featuredGrid svg, .c-result-grid svg, #relatedGrid svg,
.c-record-card svg, .c-collection-card svg, .c-story-card svg {
    max-width: 100% !important; max-height: 100% !important;
    display: block !important;
}
/* 카드 내부 chips/badges 가 wrap 되어야 카드가 늘어나지 않음 */
.c-record-card__chips, .c-record-card__badges {
    flex-wrap: wrap !important; gap: 4px !important;
    min-width: 0 !important;
}
.c-record-card__chips .c-chip,
.c-record-card__badges .c-record-badge,
.c-record-card__badges .c-availability-badge,
.c-record-card__badges .c-record-group-badge {
    flex: 0 1 auto; min-width: 0; max-width: 100%;
    white-space: normal; word-break: keep-all;
}
/* [adam] G-531: tiny/mobile record badges should stay as compact pills, not split into stacked text. */
.c-record-card__badges {
    flex-wrap: nowrap !important;
    max-width: calc(100% - 20px) !important;
}
.c-record-card__badges .c-record-badge,
.c-record-card__badges .c-availability-badge,
.c-record-card__badges .c-record-group-badge {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
}
/* 모바일에서 메인 hero title 한 줄 너무 길지 않게 — 강제 줄바꿈 */
@media (max-width: 480px) {
    .adam-hero__title {
        font-size: 22px !important;
        line-height: 1.3 !important;
        word-break: keep-all;
    }
    .adam-hero__title br { display: inline !important; }
    .adam-hero__lead { font-size: 12px !important; line-height: 1.5 !important; }
    /* 카드 thumb 더 작게 */
    .c-record-card__thumb { aspect-ratio: 4/3 !important; }
    .c-record-card__body { padding: 8px !important; }
    .c-record-card__title { font-size: 12px !important; }
    .c-record-card__recno, .c-record-card__collection { font-size: 10px !important; }
}

@media (max-width: 520px) {
    .photo-meta-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px !important;
    }
    .photo-meta-actions .adam-photo-list-btn {
        grid-column: 1 / -1;
        width: 100%;
    }
    .photo-meta-actions .btn {
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}


/* =============================================================
 * [adam] G-261/G-262: 폴리쉬 — 호버/포커스/터치 인터랙션
 * ============================================================= */

/* 1. 카드 호버 효과 — 터치 디바이스에서 제거 (sticky hover 방지) */
@media (hover: hover) and (pointer: fine) {
    .c-record-card, .c-collection-card, .c-story-card { transition: transform 0.18s, box-shadow 0.18s; }
    .c-record-card:hover, .c-collection-card:hover, .c-story-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(31,27,22,0.10);
    }
}
@media (hover: none) {
    .c-record-card:active, .c-collection-card:active { transform: scale(0.98); transition: transform 0.1s; }
}

/* 2. focus-visible — 키보드 사용자 위한 명확한 포커스 표시 */
*:focus-visible {
    outline: 2px solid var(--primary, #2C5F6F) !important;
    outline-offset: 2px !important;
    border-radius: 4px;
}
.btn:focus-visible, button:focus-visible { outline-offset: 2px; }
a:focus-visible { text-decoration: underline; outline-offset: 3px; }

/* 3. archive list 의 빠른 필터 (chip 형태 링크) — 모바일 가로 스크롤 시 스크롤바 숨김 */
.c-search-panel__quick { scrollbar-width: thin; }
.c-search-panel__quick::-webkit-scrollbar { height: 4px; }
.c-search-panel__quick::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 2px; }
.c-search-panel__quick::-webkit-scrollbar-track { background: transparent; }

/* 4. 페이지네이션 일관 톤 */
.pagination, nav.pagination {
    display: flex; justify-content: center; gap: 4px;
    padding: 24px 0; flex-wrap: wrap;
}
.pagination .page-btn, nav.pagination button, nav.pagination a {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 10px;
    border-radius: 6px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text-sec);
    font-size: 13px; cursor: pointer;
    transition: background 0.12s, color 0.12s;
    text-decoration: none;
}
.pagination .page-btn:hover:not(:disabled),
nav.pagination button:hover:not(:disabled),
nav.pagination a:hover { background: var(--surface-2); color: var(--text); }
.pagination .page-btn.active,
.pagination .page-btn:active,
nav.pagination .active {
    background: var(--primary) !important; color: white !important;
    border-color: var(--primary) !important; font-weight: 600;
}
.pagination .page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination .page-btn.is-disabled { opacity: 0.4; cursor: not-allowed; }
.adam-pagination__list {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}
.adam-pagination .pg_page,
.adam-pagination .pg_current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    margin: 0;
    border-radius: 6px;
    line-height: 34px;
    text-indent: 0;
    overflow: visible;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-sec);
}
.adam-pagination .pg_page:hover {
    background: var(--surface-2);
    color: var(--text);
}
.adam-pagination .pg_current {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
    font-weight: 600;
}
.adam-pagination .pg_start,
.adam-pagination .pg_prev,
.adam-pagination .pg_next,
.adam-pagination .pg_end {
    background-image: none;
    width: auto;
}
.adam-pagination .is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 5. archive list 의 사진 카드 그라데이션 위 텍스트 가독성 */
.c-record-card__badges { z-index: 2; }

/* 6. 사진 상세 페이지 액션 영역 모바일 줄바꿈 */
@media (max-width: 600px) {
    .photo-meta-card > div[style*="display: flex"][style*="gap: 6px"],
    .photo-meta-card > div[style*="flex"][style*="margin: 14px"] {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    .photo-meta-card > div[style*="flex"] .btn { flex: 1 1 auto; min-width: 0; }
}

/* 7. 헤더 검색창 placeholder 사이즈 축소 (모바일) */
@media (max-width: 480px) {
    .site-header .search-box input::placeholder { font-size: 12px; }
}

/* 8. notice/donation 목록 사진 - 게시판 행 모바일 폰트 */
@media (max-width: 600px) {
    main.container-wide table tbody td {
        font-size: 13px !important; padding: 8px 6px !important;
    }
    main.container-wide table .c-crumb { display: none !important; }  /* 모바일에서 breadcrumb 숨김 */
}

/* 9. 빈 텍스트가 들어가는 곳에 안전망 */
:empty.c-page-header__desc, :empty.notice_inserter { display: none; }

/* 10. 댓글 작성 폼 모바일 풀폭 */
@media (max-width: 600px) {
    .comment-item form, .comment-item textarea { width: 100% !important; }
    .comment-item .actions { flex-wrap: wrap; }
}

/* 11. 헤더 로그인된 상태 우측 버튼 모바일 작게 */
@media (max-width: 480px) {
    .site-header .hd_login_msg { display: none !important; }
}

/* =============================================================
 * G-260: 카드 thumb / SVG 가로 초과 방지
 * 카드 내부 SVG/img 가 카드 폭을 넘지 않도록 강화
 * ============================================================= */
.c-record-card { overflow: hidden; min-width: 0; box-sizing: border-box; }
.c-record-card__thumb {
    width: 100% !important;
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
    background: var(--surface-2, #F5F0E6);
}
.c-record-card__thumb svg,
.c-record-card__thumb img {
    position: absolute; inset: 0;
    width: 100% !important; height: 100% !important;
    max-width: 100% !important; max-height: 100% !important;
    object-fit: cover;
    display: block;
}
.c-collection-card { overflow: hidden; min-width: 0; }
.c-collection-card__img {
    width: 100% !important;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--surface-2);
}
.c-collection-card__img svg, .c-collection-card__img img {
    width: 100% !important; height: 100% !important;
    max-width: 100% !important;
    object-fit: cover; display: block;
}
.c-story-card { overflow: hidden; min-width: 0; }
.c-story-card__img {
    width: 100% !important;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--surface-2);
}
.c-story-card__img svg, .c-story-card__img img {
    width: 100% !important; height: 100% !important;
    object-fit: cover; display: block;
}

/* =============================================================
 * G-259: 메인 hero / 검색 / 버튼 모바일 중앙정렬 보강
 * ============================================================= */
@media (max-width: 768px) {
    .adam-hero {
        text-align: center !important;
        padding: 32px 20px !important;
    }
    .adam-hero__eyebrow, .adam-hero__title, .adam-hero__lead { text-align: center !important; }
    .adam-hero__cta {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        margin-top: 20px !important;
    }
    .adam-hero__cta .btn {
        flex: 0 1 auto;
        min-width: 130px;
    }
    /* 검색 패널 카드 중앙 + 폼 적층 */
    .c-search-panel {
        margin: 0 auto !important; padding: 18px !important;
        max-width: 100% !important;
        text-align: center;
    }
    .c-search-panel__form {
        display: flex !important;
        flex-direction: row !important;
        gap: 6px !important;
        align-items: stretch !important;
    }
    .c-search-panel__input { flex: 1 1 auto; min-width: 0; }
    .c-search-panel__btn { flex: 0 0 auto; min-width: 64px; }
    .c-search-panel__quick {
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        margin-top: 12px;
    }
    .c-search-panel__quick a {
        font-size: 12px !important; padding: 4px 10px !important;
        border-radius: 14px !important;
    }
    /* 섹션 타이틀 가운데 정렬 */
    .c-section-title {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* ── 로그인/회원가입 모바일 ── */
@media (max-width: 600px) {
    .adam-auth-wrap {
        width: 100% !important;
        max-width: 100vw !important;
        padding: 20px 12px 0 !important;
        gap: 16px;
        box-sizing: border-box;
    }
    .adam-auth-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 24px 20px !important;
        box-sizing: border-box;
    }
    .adam-auth-card__head h1 { font-size: 20px !important; }
    .adam-auth-options,
    .adam-auth-foot {
        flex-wrap: wrap;
        gap: 10px;
    }
    .adam-auth-link { white-space: nowrap; }
    .adam-auth-aside {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        position: static;
        padding: 20px !important;
        box-sizing: border-box;
    }
    body .register {
        padding: 20px 16px !important;
        margin: 16px auto !important;
    }
    body .register section h2,
    body .register .register_form_inner h2 {
        font-size: 14px !important;
        padding: 12px 16px !important;
    }
    body .register .register_form_inner > ul,
    body .register .register_form_inner > div { padding: 14px 16px !important; }
    body .register .btn_confirm {
        flex-direction: column-reverse; align-items: stretch;
    }
    body .register .btn_confirm .btn_submit,
    body .register .btn_confirm .btn_close { width: 100% !important; }
}

/* 사용자 페이지 — 댓글 영역 입력창 정돈 */
.comment-list .comment-item textarea {
    width: 100%; min-height: 72px;
    padding: 10px 12px;
    border: 1px solid var(--border); border-radius: 8px;
    font-family: inherit; font-size: 14px; line-height: 1.6;
}
.comment-list .comment-item textarea:focus {
    outline: 2px solid var(--primary); outline-offset: 0;
    border-color: var(--primary);
}

/* footer 통일 */
.site-footer { background: var(--surface-2); border-top: 1px solid var(--border); padding: 32px 24px; margin-top: 60px; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 0 12px; justify-content: center; margin-bottom: 12px; font-size: 13px; }
.site-footer__links a { color: var(--text-sec); text-decoration: none; }
.site-footer__links a:hover { color: var(--primary); text-decoration: underline; }
.site-footer__company { text-align: center; font-size: 12px; color: var(--muted); line-height: 1.7; }
.site-footer__company strong { color: var(--text); }
#top_btn {
    position: fixed; right: 24px; bottom: 24px;
    width: 44px; height: 44px;
    background: var(--primary); color: white;
    border: none; border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer; z-index: 100;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
#top_btn:hover { background: var(--primary-dark, #1A3F4A); }

/* 그누보드 게시판 view (글 상세) 도 톤 통일 */
#bo_v {
    width: 100% !important;
    max-width: 1440px !important;
    margin: 24px auto !important;
    padding: 24px !important;
    box-sizing: border-box !important;
}
#bo_v_title, #bo_v_top, #bo_v_info {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    padding: 16px 20px !important;
    margin-bottom: 12px !important;
}
#bo_v_atc { padding: 24px !important; min-height: 200px; }
#bo_v_act .btn_b01, #bo_v_act .btn_b02 {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
    border-radius: 6px !important;
    padding: 6px 16px !important;
}

/* =============================================================
 * [adam] G-235u: 사용자 페이지 버튼 hover / 검색 폼 안정화 (사용자측)
 * ============================================================= */

/* 버튼 호버 색 통일 — primary, ghost */
.btn { transition: background 0.15s, color 0.15s, border-color 0.15s; }
.btn-primary:hover, .btn.btn-primary:hover {
    background: var(--primary-dark, #1A3F4A) !important;
    color: white !important;
    border-color: var(--primary-dark, #1A3F4A) !important;
}
.btn-ghost:hover, .btn.btn-ghost:hover {
    background: var(--surface-2, #F5F0E6) !important;
    color: var(--text, #1F1B16) !important;
    border-color: var(--text-sec, #4A453E) !important;
}
.btn-success, .btn.btn-success { background: var(--success, #2A8A5F); color: white; border-color: var(--success, #2A8A5F); }
.btn-success:hover, .btn.btn-success:hover { filter: brightness(0.92); }
.btn-warn, .btn.btn-warn { background: var(--warn, #C7861A); color: white; border-color: var(--warn, #C7861A); }

/* 사진 상세 / 게시판 목록 새글 작성 버튼 — 강조 톤 통일 */
.btn-sm.btn-primary:hover { background: var(--primary-dark, #1A3F4A) !important; color: white !important; }

/* 검색 박스 (헤더) — 좌측 36px 은 🔍 아이콘 자리, 그래서 padding-left: 36px 유지 */
.site-header .search-box input[type=search] {
    border: 1px solid var(--border) !important;
    background: white !important;
    color: var(--text) !important;
    padding: 0 12px 0 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 13px !important;
}

/* 사진 상세 페이지 - 본문 폰트 일관성 */
.photo-detail h1, .photo-detail h2, .photo-detail h3 {
    font-family: 'Noto Serif KR', serif !important;
    color: var(--text) !important;
}
.photo-detail h1 { font-size: 24px !important; line-height: 1.4; }
.photo-detail h2 { font-size: 18px !important; line-height: 1.45; }
.photo-detail h3 { font-size: 16px !important; }
.photo-detail .meta-card, .photo-detail .card { font-size: 14px; }
.photo-detail .meta-card dt, .photo-detail .meta-row .label { font-size: 12px; color: var(--muted); }
.photo-detail .meta-card dd, .photo-detail .meta-row .value { font-size: 14px; color: var(--text); margin: 0 0 12px; }
.photo-detail .alert { font-size: 13px; line-height: 1.6; }

/* =============================================================
 * [adam] G-245: 로그인/회원가입/비밀번호 찾기 페이지 — demo paper-tone
 * ============================================================= */

.adam-auth-wrap {
    max-width: 1100px;
    /* [adam] G-479: margin-top:32px 가 부모와 collapse 되어 무효(헤더에 딱 붙음) → padding-top 으로
       전환하여 상단 여백 확보(collapse 무관). 다른 컨텐츠 페이지의 c-page-header 역할 대체. */
    margin: 0 auto 60px;
    padding: 40px 24px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
    align-items: start;
}
@media (max-width: 900px) {
    .adam-auth-wrap { grid-template-columns: 1fr; }
}
.adam-auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius, 12px);
    box-shadow: var(--shadow-card, 0 1px 3px rgba(0,0,0,0.06));
    padding: 32px 36px;
}
.adam-auth-card__head { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 2px solid var(--accent); }
.adam-auth-card__head h1 { font-size: 24px; margin: 0 0 4px; font-weight: 700; color: var(--text); }
.adam-auth-card__head p { margin: 0; font-size: 13px; color: var(--muted); }
.adam-auth-options { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 20px; }
.adam-auth-link { font-size: 13px; color: var(--muted); text-decoration: none; }
.adam-auth-link:hover { color: var(--primary); text-decoration: underline; }
.adam-checkbox { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-sec); cursor: pointer; }
.adam-checkbox input[type=checkbox] { width: 16px; height: 16px; margin: 0; cursor: pointer; }
.adam-auth-submit { width: 100% !important; display: block !important; }
.adam-auth-foot {
    margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.adam-auth-aside {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius, 12px);
    padding: 24px 26px;
    position: sticky; top: 80px;
}
.adam-auth-bullets { margin: 12px 0 0; padding: 0; list-style: none; }
.adam-auth-bullets li {
    position: relative; padding: 6px 0 6px 20px; font-size: 13px; color: var(--text-sec); line-height: 1.6;
}
.adam-auth-bullets li::before { content: "•"; position: absolute; left: 4px; color: var(--accent); font-weight: 700; }

/* 회원가입 — gnuboard 의 .form_01 / .tbl_frm01 구조를 paper-tone 으로 */
body .register {
    max-width: 1100px;
    margin: 32px auto 60px;
    padding: 32px 36px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius, 12px);
    box-shadow: var(--shadow-card, 0 1px 3px rgba(0,0,0,0.06));
}
body .register h2 {
    font-family: 'Noto Serif KR', serif !important;
    font-size: 17px !important;
    color: var(--text) !important;
    margin: 24px 0 12px !important;
    padding-bottom: 8px !important;
    border-bottom: 2px solid var(--accent) !important;
}
body .register h2:first-child { margin-top: 0 !important; }
body .register .register_form_inner { margin-bottom: 28px; }
body .register .form_01 li, body .register .tbl_frm01 li {
    list-style: none; padding: 10px 0; border-bottom: 1px solid var(--border, #e5dfd5);
}
body .register .form_01 ul, body .register .tbl_frm01 ul { padding: 0; margin: 0; list-style: none; }
body .register label, body .register .frm_label {
    display: block; font-size: 13px; font-weight: 600; color: var(--text-sec); margin-bottom: 6px;
}
body .register .frm_input, body .register input[type=text], body .register input[type=password], body .register input[type=email], body .register input[type=tel], body .register select, body .register textarea {
    width: 100% !important; max-width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid var(--border, #d4cfc3) !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    background: var(--surface, #fff) !important;
    color: var(--text, #1F1B16) !important;
    font-family: inherit !important;
}
body .register .frm_input:focus, body .register input:focus, body .register select:focus, body .register textarea:focus {
    outline: 2px solid var(--primary) !important; outline-offset: 0 !important; border-color: var(--primary) !important;
}
body .register .half_input { display: inline-block; vertical-align: top; width: calc(50% - 8px); }
body .register .left_input { margin-right: 8px; }
@media (max-width: 600px) {
    body .register .half_input { width: 100%; margin-right: 0; }
}
body .register .twopart_input { width: 100px !important; display: inline-block !important; }
body .register .frm_address { margin-top: 8px; }
body .register .btn_frmline {
    display: inline-flex; align-items: center; height: 38px;
    padding: 0 12px; margin-left: 6px;
    background: var(--surface-2); color: var(--text-sec);
    border: 1px solid var(--border); border-radius: 6px;
    font-size: 12px; cursor: pointer;
}
body .register .btn_frmline:hover { background: rgba(176,125,58,0.10); color: var(--text); }
body .register .tooltip_icon {
    background: transparent; border: none; color: var(--muted);
    padding: 0 4px; cursor: help;
}
body .register .tooltip {
    display: none; position: absolute;
    background: #1F1B16; color: white;
    padding: 8px 12px; border-radius: 6px;
    font-size: 12px; line-height: 1.5; max-width: 280px; z-index: 100;
    margin-top: 4px;
}
body .register .chk_box { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; padding: 8px 0; }
body .register .chk_box input[type=checkbox] { width: 16px; height: 16px; margin: 2px 0 0; }
body .register .chk_box label { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 0; }
body .register .chk_box .chk_li { font-size: 13px; color: var(--text); margin-left: 4px; }
body .register .cert_req { color: var(--danger); font-size: 12px; margin-left: 6px; }
body .register .cert_desc { color: var(--muted); font-size: 12px; margin-left: 4px; }
body .register #msg_certify { font-size: 12px; color: var(--success); margin-top: 4px; }
body .register .sub-consents { margin: 8px 0 0 24px; padding: 0; list-style: none; border-left: 2px solid var(--border); padding-left: 12px; }
body .register .sub-consents li.is-inline { padding: 4px 0; border-bottom: none; }
body .register .consent-date { font-size: 11px; color: var(--muted); margin-left: 24px; margin-top: 2px; }
body .register .btn_confirm {
    margin-top: 24px; padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex; gap: 8px; justify-content: flex-end;
}
body .register .btn_submit, body .register .btn_close {
    height: 44px !important; padding: 0 24px !important;
    font-size: 14px !important; font-weight: 600 !important;
    border-radius: 8px !important; border: 1px solid transparent !important;
    cursor: pointer !important; line-height: 1 !important;
    display: inline-flex !important; align-items: center !important;
}
body .register .btn_submit { background: var(--primary) !important; color: white !important; border-color: var(--primary) !important; }
body .register .btn_submit:hover { background: var(--primary-dark, #1A3F4A) !important; border-color: var(--primary-dark, #1A3F4A) !important; }
body .register .btn_close { background: var(--surface) !important; color: var(--text-sec) !important; border-color: var(--border) !important; text-decoration: none !important; }
body .register .btn_close:hover { background: var(--surface-2) !important; }
body .register #msg_mb_id, body .register #msg_mb_nick { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; min-height: 16px; }

/* 비밀번호 찾기 페이지 (password_lost) — 가벼운 카드 */
body #fpassword_lost, body .password_lost {
    max-width: 480px;
    margin: 40px auto;
    padding: 32px 36px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius, 12px);
    box-shadow: var(--shadow-card);
}

/* 회원가입 약관 동의 페이지 — 섹션 카드 구조 */
body .register section {
    margin: 16px 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}
body .register section h2 {
    background: var(--surface-2) !important;
    margin: 0 !important;
    padding: 14px 20px !important;
    border-bottom: 1px solid var(--border) !important;
    border-radius: 0 !important;
    font-family: 'Noto Serif KR', serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text) !important;
}
body .register section > div, body .register section > table { padding: 16px 20px; }
body .register section table { margin: 0; padding: 0; }

body .register #fregister_term, body .register .fregister_terms { margin-bottom: 16px; }
body .register #fregister_term > div, body .register #fregister_term {
    padding: 0 !important;
}
body .register #fregister_term textarea {
    width: 100% !important; height: 140px !important;
    padding: 14px !important; font-family: 'Noto Sans KR', sans-serif !important;
    font-size: 13px !important; line-height: 1.7 !important;
    background: #FAFAFA !important; color: var(--text-sec) !important;
    border: none !important; border-radius: 0 !important;
    border-bottom: 1px solid var(--border) !important;
    resize: vertical; display: block;
}
body .register .fregister_terms > div { padding: 0 !important; }
body .register .fregister_terms table {
    width: 100% !important; border-collapse: collapse !important;
    background: var(--surface) !important;
    border: none !important; border-radius: 0 !important;
    border-bottom: 1px solid var(--border) !important;
    font-size: 13px !important;
}
body .register .fregister_terms thead th {
    background: #FAFAFA !important; color: var(--text-sec) !important;
    padding: 10px 16px !important; font-weight: 600 !important; font-size: 12px !important;
    border-bottom: 1px solid var(--border) !important;
    text-align: left !important;
}
body .register .fregister_terms tbody td {
    padding: 10px 16px !important; border-bottom: 1px solid var(--border) !important;
    color: var(--text) !important; font-size: 13px !important; line-height: 1.5;
}
body .register .fregister_terms tbody tr:last-child td { border-bottom: none !important; }

/* 동의 체크박스를 섹션 푸터로 — 좌측 정렬, 텍스트 옆에 명시 */
body .register .fregister_agree {
    margin: 0 !important;
    padding: 12px 20px !important;
    background: var(--primary-soft, #E8F1F3) !important;
    border: none !important;
    border-top: 1px solid var(--border) !important;
    border-radius: 0 !important;
    display: flex !important; align-items: center !important; gap: 10px !important;
    position: static !important;
}
body .register .fregister_agree::before {
    display: none;
    content: "";
}
body .register .fregister_agree input[type=checkbox] {
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    position: static !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: auto !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    margin: 0 !important;
    flex: 0 0 20px !important;
    cursor: pointer;
}
body .register .fregister_agree label { display: inline-flex; align-items: center; margin: 0 !important; font-weight: 600; color: var(--primary-dark, #1A3F4A); cursor: pointer; }
body .register .fregister_agree label b { font-weight: 600 !important; }

/* 모두 동의 박스 — 가장 강조 */
body .register #fregister_chkall, body .register .chk_all {
    margin: 16px 0 8px !important;
    padding: 14px 18px !important;
    background: var(--accent-soft, #F5EBDC) !important;
    border: 2px solid var(--accent) !important;
    border-radius: 10px !important;
    display: flex !important; align-items: center !important; gap: 10px !important;
}
body .register #fregister_chkall input[type=checkbox] { width: 20px !important; height: 20px !important; margin: 0 !important; cursor: pointer; }
body .register #fregister_chkall label {
    margin: 0 !important; color: var(--text) !important;
    font-weight: 700 !important; font-size: 14px !important;
    cursor: pointer;
}

/* 안내 문구 (상단) — [adam] G-483: skin/member/basic/style.css `#fregister p{background:#f2838f 핑크;
   color:#fff; height:50px; line-height:50px}` 가 specificity(#fregister p=101) 로 site.css 를 이겨
   핑크 배경 + 세로정렬 깨짐. `#fregister` 포함 셀렉터(112) 로 도메인 스타일 강제 + 좌측 빨강 바 제거. */
body .register #fregister > p,
body .register > form > p {
    font-size: 13px !important; color: var(--text-sec) !important; line-height: 1.7 !important;
    background: var(--surface-2) !important; padding: 14px 18px !important;
    border-radius: 10px !important; border-left: 4px solid var(--primary) !important;
    margin: 0 0 24px !important; height: auto !important; text-align: left !important;
    font-weight: 400 !important;
}
body .register #fregister > p:before { display: none !important; } /* style.css 의 좌측 #da4453 빨강 바 제거 */
body .register #fregister > p i,
body .register > form > p i.fa-check-circle { color: var(--primary) !important; margin-right: 6px; font-size: 16px; }

/* [adam] G-483: 약관 동의 체크박스 정상화 — style.css `.fregister_agree{position:absolute;top:0;right:0}`
   + `label span{position:absolute;top:20px;right:15px}` 가 동의 체크박스를 우상단으로 보내고 커스텀
   span 이 실제 input(site.css 가 20px 노출) 과 중복. 커스텀 span 숨김 + 모두동의 박스 position 정상화. */
body .register .fregister_agree label span,
body .register #fregister_chkall label span,
body .register .chk_all label span { display: none !important; }
body .register #fregister_chkall,
body .register .chk_all { position: static !important; top: auto !important; right: auto !important; }
body .register .fregister_agree { position: static !important; top: auto !important; right: auto !important; }

/* [adam] G-483: 자동등록방지(캡차) — 중복 라벨 겹침을 제거하고 이미지/입력/버튼을 compact grid 로 정렬. */
body .register .is_captcha_use {
    display: block !important;
    align-items: flex-start !important;
    padding: 16px 20px !important;
    list-style: none !important;
}
body .register #captcha, body .register .captcha {
    display: grid !important;
    grid-template-columns: 150px minmax(160px, 240px) 44px 44px !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 560px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    vertical-align: top !important;
}
body .register #captcha legend {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
body .register #captcha legend label {
    font-size: 0 !important;
    line-height: 0 !important;
}
body .register #captcha_img {
    order: 1;
    display: block !important;
    width: 150px !important;
    height: 44px !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--border) !important;
    border-radius: 8px;
}
body .register #captcha_audio {
    order: 0;
    grid-column: 1 / -1;
    width: min(100%, 320px) !important;
    height: 38px !important;
    margin: 0 !important;
}
body .register #captcha_key,
body .register .is_captcha_use input[type=text] {
    order: 2;
    width: 100% !important;
    max-width: 240px !important;
    height: 44px !important;
    margin: 0 !important;
    text-align: center;
}
body .register #captcha_mp3,
body .register #captcha_reload {
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    background-color: #eef2f1 !important;
    border-radius: 8px !important;
}
body .register #captcha_mp3 { order: 3; }
body .register #captcha_reload { order: 4; }
body .register #captcha_info {
    order: 5;
    grid-column: 1 / -1;
    margin: 0 !important;
    color: var(--muted) !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    letter-spacing: 0 !important;
    word-break: keep-all;
}
body .register #captcha .captcha_box { margin: 0 !important; }

@media (max-width: 600px) {
    body .register #captcha,
    body .register .captcha {
        grid-template-columns: minmax(96px, 120px) minmax(70px, 1fr) 44px 44px !important;
        max-width: 100% !important;
        gap: 6px !important;
    }
    body .register #captcha_img {
        width: 100% !important;
        min-width: 96px;
    }
    body .register #captcha_key,
    body .register .is_captcha_use input[type=text] {
        max-width: none !important;
        min-width: 0 !important;
    }
}
@media (max-width: 360px) {
    body .register #captcha,
    body .register .captcha {
        grid-template-columns: minmax(110px, 140px) minmax(0, 1fr) !important;
        gap: 8px !important;
    }
}

/* 가입 폼 — 필드 그룹 카드 변환 */
body .register .register_form_inner {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0;
    margin-bottom: 16px;
    overflow: hidden;
}
body .register .register_form_inner h2 {
    margin: 0 !important;
    background: var(--surface-2) !important;
    padding: 14px 20px !important;
    border-bottom: 1px solid var(--border) !important;
    border-radius: 0 !important;
    font-family: 'Noto Serif KR', serif !important;
    font-size: 15px !important;
}
body .register .register_form_inner > ul, body .register .register_form_inner > div { padding: 16px 20px; }
body .register .form_01 li, body .register .tbl_frm01 li {
    list-style: none !important; padding: 10px 0 !important;
    border-bottom: 1px dashed var(--border) !important;
}
body .register .form_01 li:last-child, body .register .tbl_frm01 li:last-child { border-bottom: none !important; }
body .register .chk_box {
    padding: 8px 0 !important; border-bottom: 1px dashed var(--border) !important;
    align-items: center !important;
}
body .register .chk_box label b { font-weight: 500 !important; }

/* 본인확인 버튼 그룹 정렬 */
body .register .cert_req {
    display: inline-block; padding: 2px 8px; margin-left: 6px;
    background: var(--danger); color: white; border-radius: 12px; font-size: 10px;
    font-weight: 600; vertical-align: middle;
}
body .register .cert_desc {
    color: var(--muted); font-size: 12px; margin-left: 4px;
    display: inline-block; vertical-align: middle;
}
body .register #msg_certify {
    background: #C6F0D4; color: #205A38;
    padding: 6px 12px; border-radius: 6px;
    display: inline-block; font-size: 12px;
    margin: 8px 0 0;
}

/* 자동등록방지 캡차 영역 */
body .register .is_captcha_use { border-bottom: none !important; }
body .register #captcha {
    vertical-align: top; margin-top: 0 !important;
}

/* =============================================================
 * G-268: 모바일 그리드 최종 강제 (file 최하단 위치 — cascade 최고 우선)
 * outer 룰의 minmax(min(280px,100%),1fr) 이 작동 안 할 가능성 대비
 * body selector + repeat(2, minmax(0,1fr)) 으로 강제
 * ============================================================= */
@media (max-width: 900px) {
    body #featuredGrid,
    body .c-result-grid,
    body #relatedGrid,
    body main #resultGrid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    body .c-collection-list {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px !important;
    }
    body .c-story-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }
    /* 카드 자체 — viewport overflow 절대 금지 */
    body .c-record-card,
    body .c-collection-card,
    body .c-story-card {
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }
    body .c-record-card *,
    body .c-collection-card *,
    body .c-story-card * {
        max-width: 100% !important;
        min-width: 0 !important;
    }
    /* hero 도 모바일 컴팩트 */
    body .adam-hero {
        padding: 32px 16px 28px !important;
        max-width: 100% !important;
        text-align: center !important;
    }
    body .adam-hero__title {
        font-size: clamp(20px, 6vw, 28px) !important;
        line-height: 1.3 !important;
    }
    body .adam-hero__lead { font-size: 13px !important; line-height: 1.6 !important; }
    body .adam-hero__cta { justify-content: center !important; flex-wrap: wrap !important; gap: 8px !important; }
    body .adam-hero__cta .btn { min-width: 120px; }
    /* 검색 패널 모바일 */
    body .c-search-panel { padding: 16px !important; max-width: 100% !important; }
    body .c-search-panel__form { flex-direction: row !important; gap: 6px !important; }
    body .c-search-panel__input { flex: 1 1 auto !important; min-width: 0 !important; max-width: 100% !important; }
    body .c-search-panel__btn { flex: 0 0 auto !important; }
    body .c-search-panel__quick { flex-wrap: wrap !important; gap: 6px !important; justify-content: center; max-width: 100%; }
    /* 섹션 타이틀 */
    body .c-section-title { padding: 0 16px; }
    body .c-section-title h2 { font-size: 18px !important; }
    /* container 패딩 축소 */
    body main, body main.container-wide, body main.container, body section.container, body .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}
@media (max-width: 480px) {
    body .c-story-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    body .c-record-card__body { padding: 8px !important; }
    body .c-record-card__title { font-size: 12px !important; line-height: 1.3 !important; }
    body .c-record-card__summary { display: none !important; }
    body .c-record-card__chips { display: none !important; }
    body .c-record-card__badges .c-record-badge--sm,
    body .c-record-card__badges .c-record-group-badge,
    body .c-record-card__badges .c-availability-badge {
        height: 18px !important;
        min-height: 18px !important;
        font-size: 9px !important;
        padding: 0 4px !important;
    }
}

/* =============================================================
 * G-269: 모든 컨테이너 viewport 강제 fit
 * vw 414 인데 grid 583*2 = 1166px overflow 원인 차단
 * ============================================================= */
@media (max-width: 900px) {
    html, body {
        width: 100vw !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        margin: 0 !important;
    }
    body #wrapper,
    body #container_wr,
    body #container,
    body main,
    body main.container,
    body main.container-wide,
    body section,
    body section.container,
    body .container,
    body .container-wide {
        width: 100% !important;
        max-width: 100vw !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }
    body section.container, body .container, body .container-wide {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    /* site-header 강제 wrap + 풀폭 */
    body .site-header {
        display: flex !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        max-width: 100vw !important;
        padding: 10px 12px !important;
        gap: 8px !important;
        box-sizing: border-box !important;
        height: auto !important;
    }
    body .site-header .logo { flex: 0 1 auto; max-width: 60%; font-size: 15px !important; }
    body .site-header .logo small { display: none !important; }
    body .site-header .hd_login_actions { flex: 0 0 auto; gap: 4px !important; }
    body .site-header .hd_login_actions .btn { font-size: 11px !important; height: 26px !important; padding: 0 8px !important; }
    body .site-header .hd_login_msg { display: none !important; }
    body .site-header .site-nav {
        order: 3; flex: 1 1 100%; max-width: 100%;
        overflow-x: auto; white-space: nowrap;
        scrollbar-width: thin;
    }
    body .site-header .site-nav a { font-size: 13px !important; padding: 6px 8px !important; }
    body .site-header .search-box {
        order: 4; flex: 1 1 100%; max-width: 100% !important;
    }
    body .site-header .search-box input {
        width: 100% !important; max-width: 100% !important;
        box-sizing: border-box !important;
    }
    /* footer 풀폭 */
    body .site-footer {
        width: 100% !important; max-width: 100vw !important;
        padding: 20px 16px !important; box-sizing: border-box !important;
    }
    /* hero 풀폭 */
    body .adam-hero, body .c-index-search {
        width: 100% !important; max-width: 100vw !important;
        box-sizing: border-box !important;
        padding-left: 16px !important; padding-right: 16px !important;
    }
    /* c-page-header 풀폭 */
    body .c-page-header {
        width: 100% !important; max-width: 100vw !important;
        padding: 18px 12px !important; box-sizing: border-box !important;
    }
    body .c-page-header > .container,
    body .c-page-header > .container-wide {
        max-width: 100% !important; padding: 0 !important;
    }
    /* photo detail grid 풀폭 + 1단 */
    body .photo-detail {
        width: 100% !important; max-width: 100vw !important; box-sizing: border-box !important;
    }
}

/* =============================================================
 * G-270: 사용자 피드백 fix — 검색 버튼/소식 padding/게시판 테이블
 * ============================================================= */
@media (max-width: 768px) {
    /* 1. 메인 검색 버튼 너무 큼 — 작게 강제 */
    body .c-search-panel__btn {
        padding: 0 14px !important;
        height: 40px !important;
        min-width: 56px !important;
        max-width: 80px !important;
        font-size: 13px !important;
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
    }
    body .c-search-panel__form {
        align-items: stretch !important;
        gap: 6px !important;
    }
    body .c-search-panel__input {
        height: 40px !important;
        padding: 0 12px !important;
        box-sizing: border-box !important;
    }

    /* 2. 소식 섹션 inline style padding 모바일 강제 */
    body section[style*="padding: 48px 24px"],
    body section[style*="padding:48px 24px"] {
        padding: 32px 16px !important;
        margin-top: 24px !important;
        box-sizing: border-box !important;
    }
    body section[style*="padding"] {
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    /* c-notice-list 좌우 패딩 */
    body .c-notice-list__link {
        padding: 12px 14px !important; gap: 10px !important;
    }
    body .c-notice-list__title { font-size: 13px !important; line-height: 1.4 !important; }
    body .c-notice-list__date { font-size: 11px !important; min-width: 0 !important; }

    /* 3. 게시판 (notice/donation) list 테이블 모바일 — 작성자/일/조회 숨김 */
    body main.container-wide table.tbl thead th:nth-child(3),
    body main.container-wide table.tbl thead th:nth-child(4),
    body main.container-wide table.tbl thead th:nth-child(5),
    body main.container-wide table.tbl tbody td:nth-child(3),
    body main.container-wide table.tbl tbody td:nth-child(4),
    body main.container-wide table.tbl tbody td:nth-child(5),
    body main.container-wide table.tbl thead th[style*="120px"],
    body main.container-wide table.tbl thead th[style*="70px"] {
        display: none !important;
    }
    /* 번호 컬럼 작게 */
    body main.container-wide table.tbl thead th:nth-child(1),
    body main.container-wide table.tbl tbody td:nth-child(1) {
        width: 50px !important;
        font-size: 11px !important;
        padding: 8px 4px !important;
    }
    /* 제목 컬럼 풀폭 */
    body main.container-wide table.tbl thead th:nth-child(2),
    body main.container-wide table.tbl tbody td:nth-child(2) {
        width: auto !important;
        padding: 10px 8px !important;
    }
    body main.container-wide table.tbl tbody td:nth-child(2) a {
        word-break: keep-all;
        font-size: 13px !important;
    }
    body main.container-wide table.tbl {
        font-size: 13px !important; table-layout: auto !important;
    }
    /* 페이지 헤더 게시판 — 검색바 + 타이틀 적층 */
    body main.container-wide article > .flex.items-center {
        flex-direction: column; align-items: flex-start !important; gap: 12px;
    }
    body main.container-wide article .search-box {
        flex: 1 1 100% !important;
        width: 100% !important;
    }
    body main.container-wide article .search-box input {
        width: 100% !important; box-sizing: border-box;
    }
    body main.container-wide article h1 { font-size: 20px !important; }
}

/* G-271: 소식 섹션 명시적 클래스 — inline style 보다 우선 적용 */
@media (max-width: 768px) {
    body section.adam-news-section {
        padding: 32px 16px !important;
        margin-top: 24px !important;
        box-sizing: border-box !important;
    }
    body section.adam-news-section > .container {
        padding: 0 !important; max-width: 100% !important;
    }
}

/* G-271: 모바일에서 .btn / .btn-accent 작게 — "+ 새 문의 작성" 등 게시판 액션 버튼 */
@media (max-width: 768px) {
    body .btn:not(.btn-lg) {
        height: 36px !important;
        padding: 0 14px !important;
        font-size: 13px !important;
        line-height: 1 !important;
    }
    body .btn-sm, body a.btn-sm, body button.btn-sm {
        height: 30px !important;
        padding: 0 10px !important;
        font-size: 12px !important;
    }
    body .btn-lg {
        height: 40px !important;
        padding: 0 16px !important;
        font-size: 14px !important;
    }
    body .btn-accent, body a.btn-accent {
        font-size: 13px !important;
        font-weight: 500 !important;
    }
}

/* 480px 이하 — 게시판 테이블 더 컴팩트 */
@media (max-width: 480px) {
    body main.container-wide table.tbl tbody td:nth-child(2) a {
        font-size: 12px !important;
    }
    body main.container-wide article h1 { font-size: 18px !important; }
}

/* G-268: 사진 상세 모바일 layout - 1단 + 메타 카드 사진 위 */
@media (max-width: 900px) {
    body .photo-detail {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 14px !important;
    }
    body .photo-detail .photo-meta-card {
        position: static !important;
        order: 0 !important;
        max-width: 100% !important;
        padding: 14px !important;
    }
    body .photo-meta-card h1 { font-size: 18px !important; }
    body .photo-figure {
        max-width: 100% !important;
        aspect-ratio: 4/3;
        overflow: hidden;
    }
    body .photo-figure svg,
    body .photo-figure img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    /* 같은 마을 다른 사진 - 2단 */
    body #relatedGrid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
}


/* 메인 c-notice-list — 소식 항목 */
.c-notice-list { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius, 10px); overflow: hidden; }
.c-notice-list__item { border-bottom: 1px solid var(--border); }
.c-notice-list__item:last-child { border-bottom: none; }
.c-notice-list__link { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; gap: 16px; color: var(--text); text-decoration: none; transition: background 0.12s; }
.c-notice-list__link:hover { background: var(--surface-2); }
.c-notice-list__title { flex: 1; font-weight: 500; }
.c-notice-list__date { font-size: 12px; color: var(--muted); font-family: monospace; flex: 0 0 auto; }

/* =============================================================
 * [adam] G-220: notice/donation write.skin.php — demo 톤 폼
 * 기존 .form-row(grid 2col)와 충돌 방지를 위해 .adam-form 스코프 사용
 * ============================================================= */

.adam-form .form-row {
    display: block !important;
    margin-bottom: 18px !important;
}
.adam-form .form-row + .form-row { margin-top: 0; }

.adam-form .form-label {
    display: block !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text-sec) !important;
    margin-bottom: 6px !important;
}
.adam-form .form-label .req { color: var(--danger); margin-left: 2px; }

.adam-form .form-control {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text);
    background: var(--surface);
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.5;
}
.adam-form .form-control:focus {
    outline: 2px solid var(--primary);
    outline-offset: 0;
    border-color: var(--primary);
}
.adam-form select.form-control { appearance: auto; }
.adam-form textarea.form-control { resize: vertical; min-height: 120px; }

/* [adam] G-670: notice/donation write captcha compact alignment. */
.adam-form #captcha {
    display: grid !important;
    grid-template-columns: auto minmax(72px, 96px) 38px 38px;
    align-items: center;
    gap: 6px;
    width: max-content;
    max-width: 100%;
}
.adam-form #captcha legend {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
}
.adam-form #captcha #captcha_img {
    grid-column: 1;
    width: 104px !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: cover;
    border: 1px solid var(--border) !important;
    border-radius: 4px;
}
.adam-form #captcha #captcha_key {
    grid-column: 2;
    width: 100% !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    background: #fff !important;
    font-size: 16px !important;
    line-height: 40px !important;
    text-align: center;
}
.adam-form #captcha #captcha_mp3,
.adam-form #captcha #captcha_reload {
    width: 38px !important;
    height: 38px !important;
    margin: 0 !important;
    border-radius: 6px !important;
    background-color: var(--surface-2) !important;
    border: 1px solid var(--border) !important;
    box-sizing: border-box !important;
}
.adam-form #captcha #captcha_info {
    grid-column: 1 / -1;
    margin: 2px 0 0 !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    letter-spacing: 0 !important;
    color: var(--text-sec);
}
@media (max-width: 420px) {
    .adam-form #captcha {
        grid-template-columns: 104px minmax(64px, 1fr) 38px 38px;
        width: 100%;
    }
}

.adam-form .adam-subject-row {
    position: relative;
    overflow: visible;
}
.adam-form .adam-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}
.adam-form .adam-field-head .form-label {
    margin-bottom: 0 !important;
}
.adam-form .adam-autosave {
    position: relative;
    flex: 0 0 auto;
}
.adam-form #btn_autosave.adam-autosave__trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    height: 30px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-sec);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
}
.adam-form #btn_autosave.adam-autosave__trigger:hover,
.adam-form #btn_autosave.adam-autosave__trigger:focus-visible {
    border-color: rgba(44,95,111,.28);
    background: var(--primary-soft);
    color: var(--primary);
    text-decoration: none;
}
.adam-form .adam-autosave__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
}
.adam-form #autosave_pop.adam-autosave__panel {
    display: none;
    position: absolute !important;
    top: calc(100% + 8px);
    right: 0;
    z-index: 40;
    width: 360px;
    max-width: calc(100vw - 48px) !important;
    max-height: 320px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 18px 48px rgba(31,27,22,.16);
    overflow: hidden;
}
.adam-form .adam-autosave__panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}
.adam-form .adam-autosave__panel-head strong {
    font-size: 13px;
    color: var(--text);
}
.adam-form .adam-autosave__close {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.adam-form .adam-autosave__close:hover,
.adam-form .adam-autosave__close:focus-visible {
    color: var(--primary);
}
.adam-form #autosave_pop ul {
    max-height: 256px;
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    list-style: none;
}
.adam-form #autosave_pop li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 7px;
    border-bottom: 0;
    background: transparent;
}
.adam-form #autosave_pop li + li {
    margin-top: 2px;
}
.adam-form #autosave_pop li:hover {
    background: var(--surface-2);
}
.adam-form #autosave_pop .autosave_load {
    display: block;
    min-width: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none !important;
}
.adam-form #autosave_pop li span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}
.adam-form #autosave_pop .autosave_del {
    width: auto;
    height: 24px;
    padding: 0 8px;
    border: 1px solid rgba(178,58,58,.22);
    border-radius: 999px;
    background: rgba(178,58,58,.08);
    color: var(--danger);
    font-size: 11px;
    font-weight: 700;
    text-indent: 0;
    overflow: visible;
    cursor: pointer;
}
.adam-form #autosave_pop .autosave_del:hover,
.adam-form #autosave_pop .autosave_del:focus-visible {
    background: var(--danger);
    color: #fff;
}
.adam-form #autosave_pop .autosave_empty {
    display: block;
    padding: 18px 14px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.adam-form .form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}
.adam-form .form-grid-2 .form-row { margin-bottom: 0 !important; }
@media (max-width: 720px) {
    .adam-form .form-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .adam-form .adam-field-head {
        align-items: flex-start;
        gap: 8px;
    }
    .adam-form #btn_autosave.adam-autosave__trigger {
        height: 28px;
        padding: 0 8px;
    }
    .adam-form #autosave_pop.adam-autosave__panel {
        right: 0;
        width: 100%;
        max-width: 100% !important;
    }
}

.adam-form .adam-options {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.adam-form .adam-options li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}
.adam-form .adam-options input[type=checkbox] { width: 16px; height: 16px; margin: 0; }
.adam-form .adam-options label { font-size: 14px !important; font-weight: 500 !important; color: var(--text) !important; cursor: pointer; }
.adam-form .adam-options label span { display: none; }

.adam-form .adam-file-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 10px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    margin-bottom: 8px;
}
.adam-form .adam-file-row input[type=file] { padding: 4px; font-size: 13px; }
.adam-form .adam-file-row input[type=text] { flex: 1 1 200px; }
.adam-form .adam-file-del {
    font-size: 12px;
    color: var(--danger);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.adam-form .adam-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}
.adam-form .adam-form-actions .btn {
    height: 40px;
    padding: 0 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
}

/* 에디터(textarea / DHTML editor) 컨테이너 보정 */
.adam-form .wr_content { margin-top: 4px; }
.adam-form .wr_content .cke_sc {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    margin: 0 0 8px;
    text-align: left;
}
.adam-form .wr_content .btn_cke_sc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-sec);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(31,27,22,.04);
    transition: background .12s, border-color .12s, color .12s;
}
.adam-form .wr_content .btn_cke_sc::before {
    content: "?";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
}
.adam-form .wr_content .btn_cke_sc:hover,
.adam-form .wr_content .btn_cke_sc:focus-visible {
    border-color: rgba(44,95,111,.28);
    background: var(--primary-soft);
    color: var(--primary);
}
.adam-form .wr_content .cke_sc_def {
    position: relative;
    width: 1040px;
    max-width: 100% !important;
    max-height: 180px;
    margin: 0;
    padding: 34px 10px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 36px rgba(31,27,22,.10);
    text-align: left;
    overflow-y: auto;
}
.adam-form .wr_content .cke_sc_def dl {
    display: grid;
    grid-template-columns: repeat(4, minmax(70px, auto) minmax(0, 1fr));
    gap: 4px 6px;
    margin: 0;
    padding: 0;
}
.adam-form .wr_content .cke_sc_def dl::after {
    display: none;
}
.adam-form .wr_content .cke_sc_def dt,
.adam-form .wr_content .cke_sc_def dd {
    float: none;
    width: auto;
    min-height: 22px;
    margin: 0;
    padding: 3px 6px;
    border: 0;
    display: flex;
    align-items: center;
}
.adam-form .wr_content .cke_sc_def dt {
    justify-content: center;
    border-radius: 5px;
    background: var(--surface-2);
    color: var(--primary-dark);
    font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', monospace;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    white-space: nowrap;
}
.adam-form .wr_content .cke_sc_def dd {
    color: var(--text-sec);
    font-size: 11px;
}
.adam-form .wr_content .btn_cke_sc_close {
    position: absolute;
    top: 8px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    margin-top: 0;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-sec);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}
.adam-form .wr_content .btn_cke_sc_close:hover,
.adam-form .wr_content .btn_cke_sc_close:focus-visible {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: rgba(44,95,111,.28);
}
@media (max-width: 1100px) {
    .adam-form .wr_content .cke_sc_def {
        width: 100%;
    }
    .adam-form .wr_content .cke_sc_def dl {
        grid-template-columns: repeat(2, minmax(76px, auto) minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    .adam-form .wr_content .cke_sc { align-items: stretch; }
    .adam-form .wr_content .btn_cke_sc { align-self: flex-end; }
    .adam-form .wr_content .cke_sc_def {
        width: 100%;
        max-height: 300px;
        padding: 34px 10px 10px;
    }
    .adam-form .wr_content .cke_sc_def dl {
        grid-template-columns: minmax(82px, auto) minmax(0, 1fr);
    }
}
.adam-form .wr_content textarea {
    width: 100%;
    min-height: 240px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.7;
    box-sizing: border-box;
    background: var(--surface);
    color: var(--text);
}
.adam-form .wr_content textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 0;
    border-color: var(--primary);
}

/* =============================================================
 * [adam] G-221: notice/donation view.skin.php — 폰트/간격 통일
 * ============================================================= */

/* 상세 본문 일관성 */
.view-content {
    font-size: 15px !important;
    line-height: 1.85 !important;
    color: var(--text) !important;
}
.view-content p { margin: 0 0 14px !important; font-size: 15px !important; }
.view-content h1, .view-content h2, .view-content h3, .view-content h4 {
    font-family: 'Noto Serif KR', serif !important;
    color: var(--text) !important;
    margin: 24px 0 12px !important;
}
.view-content h1 { font-size: 22px !important; }
.view-content h2 { font-size: 19px !important; }
.view-content h3 { font-size: 17px !important; }
.view-content h4 { font-size: 15px !important; }
.view-content ul, .view-content ol { margin: 0 0 14px 24px !important; padding: 0 !important; }
.view-content li { font-size: 15px !important; margin-bottom: 6px !important; }
.view-content img { max-width: 100%; height: auto; border-radius: 6px; margin: 8px 0; }
.view-content blockquote {
    border-left: 3px solid var(--primary);
    padding: 8px 14px;
    background: var(--surface-2);
    margin: 12px 0;
    color: var(--text-sec);
    font-size: 14px;
}
.view-content table { border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.view-content table td, .view-content table th {
    border: 1px solid var(--border);
    padding: 8px 10px;
}

/* 상세 헤더(타이틀·메타) 톤 */
.card-header h1.font-display {
    font-size: 24px !important;
    line-height: 1.4 !important;
    font-weight: 700 !important;
}
.card-header .text-muted { font-size: 13px !important; }


/* =============================================================
 * G-297: 접근성 보강
 * - Tab 키로 .sound_only skip link 포커스 시 화면에 노출
 * - 모든 인터랙티브 요소의 :focus-visible 에 명확한 outline
 * - 버튼/링크 outline 은 디자인 톤(브론즈)로 통일
 * ============================================================= */

/* skip link — 평소엔 보이지 않지만 Tab 포커스 시 좌측 상단에 노출 */
#skip_to_container.sound_only:focus,
#skip_to_container.sound_only:focus-visible {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    width: auto !important;
    height: auto !important;
    padding: 8px 16px !important;
    background: var(--accent, #B07D3A) !important;
    color: #fff !important;
    z-index: 9999 !important;
    clip: auto !important;
    overflow: visible !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
}

/* 글로벌 focus-visible — 키보드 사용자가 현재 어디 있는지 명확히 */
:focus-visible {
    outline: 2px solid var(--accent, #B07D3A) !important;
    outline-offset: 2px !important;
    border-radius: 2px;
}

/* 버튼·링크는 outline-offset 조금 더 — 박스가 짧으니 */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
    outline: 2px solid var(--accent, #B07D3A) !important;
    outline-offset: 3px !important;
}

/* 폼 입력 요소 focus 도 동일 톤 */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent, #B07D3A) !important;
    outline-offset: 1px !important;
    box-shadow: 0 0 0 3px rgba(176, 125, 58, 0.18) !important;
}

/* 마우스 클릭 시에는 outline 안 보이게 (:focus 만으로는 X) */
*:focus:not(:focus-visible) {
    outline: none !important;
}

/* 카드 같은 큰 클릭 영역도 키보드 focus 명확하게 */
.c-collection-card:focus-visible,
.c-story-card__link:focus-visible,
.c-result-card:focus-visible {
    outline: 3px solid var(--accent, #B07D3A) !important;
    outline-offset: 2px !important;
}


/* =============================================================
 * G-304: 헤더 우측 사용자 영역 그룹화
 * - 회원: 닉네임(아바타+이름) + 즐겨찾기 + 관리자 + 로그아웃 단일 카드 그룹
 * - 비회원: 로그인 + 회원가입 한 쌍
 * - 한 컨테이너 안에 가는 분리선으로 묶어 시각 일관성
 * ============================================================= */

.adam-user-bar { display: inline-flex; align-items: center; }

.adam-user-bar__group {
    display: inline-flex;
    align-items: stretch;
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 999px;
    padding: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    overflow: hidden;
}

.adam-user-bar__nick,
.adam-user-bar__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--text, #1F1B16);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    transition: background 0.12s, color 0.12s;
    white-space: nowrap;
}

.adam-user-bar__nick:hover,
.adam-user-bar__item:hover {
    background: rgba(176,125,58,0.10);
    color: #1F1B16;
}

.adam-user-bar__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent, #B07D3A);
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Noto Serif KR', serif;
}

.adam-user-bar__name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.adam-user-bar__item--primary {
    background: var(--primary, #2C5F6F);
    color: #FFFFFF;
}
.adam-user-bar__item--primary:hover {
    background: #1A3F4A;
    color: #FFFFFF;
}

.adam-user-bar__item--logout {
    color: #888;
}
.adam-user-bar__item--logout:hover {
    background: rgba(178,58,58,0.10);
    color: #B23A3A;
}

/* 분리선 — 각 item 사이에 1px 점선 */
.adam-user-bar__group > * + * {
    border-left: 1px solid rgba(0,0,0,0.06);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.adam-user-bar__group > *:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* 좁은 viewport 에서 닉네임 이름은 숨기고 아바타만 */
@media (max-width: 768px) {
    .adam-user-bar__name { display: none; }
    .adam-user-bar__nick { padding: 4px 8px; }
    .adam-user-bar__item { padding: 4px 10px; font-size: 12px; }
}

/* 더 좁으면 즐겨찾기·로그아웃 텍스트는 숨기고 아이콘만 */
@media (max-width: 480px) {
    .adam-user-bar__item--logout { font-size: 0; }
    .adam-user-bar__item--logout::before { content: '↪'; font-size: 14px; }
}


/* =============================================================
 * G-292L4: 헤더 사용자 드롭다운 (셀렉트바 패턴)
 * - 트리거 클릭 → 메뉴 펼침, 외부 클릭/ESC → 닫힘
 * - 비회원: 단순 두 버튼 (드롭다운 없음)
 * ============================================================= */

.adam-userbar { position: relative; display: inline-flex; }
.adam-userbar__wrap { position: relative; }

/* =============================================================
 * [adam] G-477: 헤더 사람 아이콘 크기·간격 통일
 *  (1) site.css `.site-header .hd_login_actions a { height:30px; line-height:28px }`
 *      (그누보드 기본 로그인 액션용) 가 .adam-userbar(겸 .hd_login_actions) 안의 사람
 *      아이콘(.adam-util-icon)에도 적용 → 즐겨찾기/알림(36px) 보다 작아짐(30px). 36 으로 복원.
 *  (2) .adam-util-icons(즐겨찾기·알림, 내부 gap 4px) ↔ .adam-userbar(사람) 간격이
 *      .site-header__inner flex gap(24px) 라 사람만 떨어져 보임 → 그룹 내 간격(4px)과 통일.
 * ============================================================= */
.site-header .adam-userbar .adam-util-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    line-height: normal !important;
}
.site-header .adam-userbar .adam-util-icon svg {
    flex: 0 0 18px !important;
    width: 18px !important;
    height: 18px !important;
    display: block !important;
}
.site-header__inner .adam-userbar {
    margin-left: -20px;  /* flex gap 24px → 알림 아이콘과 4px 간격 통일 */
}
/* [adam] G-482: 알림 미열람 배지 — box-sizing:border-box 로 크기 고정(이전엔 사람 아이콘 배지가
   36×30 으로 비대화되어 인접 영역 침범). 벨 아이콘 우상단 작은 원형 배지로 통일. */
.adam-util-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    box-sizing: border-box;
    padding: 0 3px;
    background: #B23A3A;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 9px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    pointer-events: none;
}

.adam-userbar__trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 6px;
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    color: var(--text, #1F1B16);
    transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
    line-height: 1;
}
.adam-userbar__trigger:hover {
    background: rgba(255,255,255,0.85);
    border-color: rgba(176,125,58,0.45);
}
.adam-userbar__wrap.is-open .adam-userbar__trigger {
    background: #FFFFFF;
    border-color: var(--accent, #B07D3A);
    box-shadow: 0 4px 12px rgba(176,125,58,0.18);
}

.adam-userbar__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent, #B07D3A);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Noto Serif KR', serif;
    flex: 0 0 auto;
}
.adam-userbar__name {
    font-size: 13px;
    font-weight: 500;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.adam-userbar__chevron {
    font-size: 10px;
    color: #888;
    transition: transform 0.15s;
}
.adam-userbar__wrap.is-open .adam-userbar__chevron {
    transform: rotate(180deg);
    color: var(--accent, #B07D3A);
}

.adam-userbar__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: #FFFFFF;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(31,27,22,0.18);
    padding: 6px;
    z-index: 1000;
    animation: adamUserbarOpen 0.14s ease-out;
}
@keyframes adamUserbarOpen {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.adam-userbar__menuitem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: var(--text, #1F1B16);
    text-decoration: none;
    font-size: 13px;
    border-radius: 6px;
    transition: background 0.12s, color 0.12s;
}
.adam-userbar__menuitem:hover {
    background: rgba(176,125,58,0.10);
    color: #1F1B16;
    text-decoration: none; /* [adam] G-485: 메뉴 항목 hover 시 전역 a:hover 밑줄 차단 (사용자 지적). */
}
/* [adam] G-485: 사람 아이콘(드롭다운 트리거) 링크/버튼 hover 밑줄 차단. */
.adam-userbar__icon-trigger,
.adam-userbar__icon-trigger:hover { text-decoration: none; }
.adam-userbar__menuitem--primary {
    color: var(--primary, #2C5F6F);
    font-weight: 600;
}
.adam-userbar__menuitem--primary:hover {
    background: rgba(44,95,111,0.10);
    color: var(--primary, #2C5F6F);
}
.adam-userbar__menuitem--logout {
    color: #888;
}
.adam-userbar__menuitem--logout:hover {
    background: rgba(178,58,58,0.10);
    color: #B23A3A;
}
.adam-userbar__icon {
    width: 18px;
    text-align: center;
    flex: 0 0 auto;
}
.adam-userbar__divider {
    height: 1px;
    background: rgba(0,0,0,0.08);
    margin: 4px 6px;
}

/* 비회원 영역 */
.adam-userbar__guest { display: inline-flex; gap: 6px; }
.adam-userbar__guest-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text, #1F1B16);
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(0,0,0,0.08);
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.adam-userbar__guest-link:hover {
    background: #FFFFFF;
    border-color: rgba(176,125,58,0.45);
}
.adam-userbar__guest-link--primary {
    background: var(--primary, #2C5F6F);
    color: #FFFFFF;
    border-color: var(--primary, #2C5F6F);
}
.adam-userbar__guest-link--primary:hover {
    background: #1A3F4A;
    color: #FFFFFF;
}

/* 반응형 */
@media (max-width: 768px) {
    .adam-userbar__name { display: none; }
    .adam-userbar__trigger { padding: 4px 8px 4px 4px; gap: 4px; }
    .adam-userbar__menu { min-width: 180px; }
}


/* =============================================================
 * G-313: 이모지 폰트 fallback
 * Noto Serif KR / Pretendard 가 컬러 이모지를 지원하지 않아 "?" 로 깨지는 문제.
 * 모든 텍스트 컨텐츠가 사용하는 폰트 stack 끝에 컬러 이모지 폰트 추가.
 * ============================================================= */
.adam-emoji,
body,
.font-display {
    /* OS 별 컬러 이모지 폰트가 stack 끝에서 fallback 으로 작동. */
    font-family-fallback: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'EmojiOne Color';
}
/* 명시적 이모지 wrapper — 인라인으로 쓸 때 */
.adam-emoji {
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'EmojiOne Color', sans-serif !important;
    font-style: normal;
    font-weight: 400;
    line-height: 1;
    vertical-align: -0.1em;
}

/* =============================================================
 * G-435: 컨텐츠 페이지(bbs/content.php) 관리자 "내용 수정" 버튼 위치 통일.
 * 그누보드 코어가 스킨 include 전에 root level 로 echo 하는 .ctt_admin 을
 * 콘텐츠 너비(1440) 우상단으로 정렬. 스킨/코어 수정 없이 CSS 만으로 통일.
 * - 기존엔 default.css 의 float 동작에 좌우되어 greeting(좌) vs basic(우) 으로 어긋남.
 * - sound_only 텍스트를 ::after content 로 시각화하여 아이콘만 보이던 가독성 보강.
 * ============================================================= */
.ctt_admin {
    max-width: 1440px;
    margin: 0 auto;
    padding: 12px 24px 0;
    text-align: right;
    display: block;
    box-sizing: border-box;
}
.ctt_admin .btn_admin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--muted);
    font-size: 12px;
    line-height: 1;
}
.ctt_admin .btn_admin::after { content: '내용 수정'; }
.ctt_admin .btn_admin:hover { background: var(--surface); color: var(--text); border-color: var(--primary); }

/* [adam] G-513: Public links keep color/background hover only; avoid default underline flicker. */
body a:hover {
    text-decoration: none !important;
}
body a:focus-visible {
    text-decoration: underline !important;
}
body .adam-content-page__card a:not(.btn):not(.tab-btn),
body #ctt a:not(.btn):not(.tab-btn),
body .greeting-text a:not(.btn):not(.tab-btn),
body .greeting-body a:not(.btn):not(.tab-btn) {
    text-decoration: underline !important;
    text-underline-offset: 2px;
}
@media (max-width: 768px) {
    .ctt_admin { padding: 8px 16px 0; }
    .ctt_admin .btn_admin { font-size: 11px; padding: 5px 10px; }
}

/* =============================================================
 * G-497: 모바일 헤더 내비게이션 잘림 보정.
 * 실제 헤더의 flex 컨테이너는 .site-header 가 아니라 .site-header__inner 이므로,
 * 모바일에서는 내부 컨테이너를 2열 grid 로 바꾸고 메뉴는 전체 폭 행으로 분리한다.
 * ============================================================= */
@media (max-width: 900px) {
    body .site-header {
        height: auto !important;
        min-height: 0 !important;
        padding: 0 !important;
    }
    body .site-header__inner {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center !important;
        gap: 8px 10px !important;
        width: 100% !important;
        max-width: 100vw !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 10px 12px 8px !important;
        box-sizing: border-box !important;
    }
    body .site-header__inner .logo {
        grid-column: 1;
        grid-row: 1;
        min-height: 36px !important;
        min-width: 0 !important;
        max-width: none !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    body .site-header__inner .adam-util-icons,
    body .site-header__inner .adam-userbar {
        justify-self: end !important;
        margin-left: 0 !important;
    }
    body .site-header__inner .adam-util-icons {
        grid-column: 2;
        grid-row: 1;
    }
    body .site-header__inner .adam-userbar {
        grid-column: 3;
        grid-row: 1;
    }
    body .site-header__inner .site-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: none !important;
        gap: 4px !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        padding: 2px 0 4px !important;
        scrollbar-width: thin;
    }
    body .site-header__inner .site-nav a {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: max-content !important;
        padding: 6px 10px !important;
    }
    body .site-header__inner .search-box {
        display: none !important;
    }
}

.adam-board-mobile-list {
    display: none;
}

/* [adam] G-524: Final mobile board-list overrides after legacy responsive rules. */
@media (max-width: 600px) {
    body main.container-wide table.adam-board-table--mobile-card {
        display: none !important;
    }
    body main.container-wide .adam-board-mobile-list {
        display: grid !important;
        gap: 8px !important;
        margin-top: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    body main.container-wide .adam-board-search {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    body main.container-wide .adam-board-search input {
        min-width: 0 !important;
    }
    body main.container-wide .adam-board-mobile-list__item,
    body main.container-wide .adam-board-mobile-list__empty {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
        column-gap: 10px;
        row-gap: 4px;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding: 12px 14px !important;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: var(--surface);
        box-sizing: border-box;
        color: var(--primary-dark);
        text-decoration: none !important;
    }
    body main.container-wide .adam-board-mobile-list__item.is-notice {
        background: rgba(199,134,26,.07);
    }
    body main.container-wide .adam-board-mobile-list__empty {
        display: block !important;
        padding: 20px 14px !important;
        text-align: center !important;
        color: var(--muted) !important;
    }
    body main.container-wide .adam-board-mobile-list__meta {
        min-width: 48px;
        padding-top: 1px;
        text-align: center;
        font-size: 12px;
    }
    body main.container-wide .adam-board-mobile-list__title {
        display: block;
        width: 100% !important;
        min-width: 0;
        max-width: 100% !important;
        font-size: 13px;
        font-weight: 600;
        line-height: 1.45;
        white-space: normal !important;
        word-break: keep-all !important;   /* [adam] G-501: 한글 어절 보존 (긴 토큰은 overflow-wrap 으로 처리) */
        overflow-wrap: anywhere !important;
    }
    body main.container-wide .adam-board-mobile-list__status {
        display: inline-flex;
        align-items: center;
        height: 20px;
        margin-left: 6px;
        padding: 0 8px;
        border-radius: 999px;
        background: var(--surface-2);
        color: var(--muted);
        font-size: 11px;
        font-weight: 600;
        vertical-align: 1px;
        white-space: nowrap;
    }
    body main.container-wide table.adam-board-table--mobile-card,
    body main.container-wide table.adam-board-table--mobile-card tbody,
    body main.container-wide table.adam-board-table--mobile-card tbody tr,
    body main.container-wide table.adam-board-table--mobile-card tbody td {
        min-width: 0 !important;
        max-width: 100% !important;
    }
    body main.container-wide table.adam-board-table--mobile-card {
        width: 100% !important;
        max-width: 100% !important;
    }
    body main.container-wide table.adam-board-table--mobile-card tbody td:nth-child(2),
    body main.container-wide table.adam-board-table--mobile-card tbody td:nth-child(2) a {
        width: 100% !important;
        min-width: 0 !important;
        max-width: calc(100vw - 110px) !important;
    }
    body main.container-wide table.adam-board-table--mobile-card tbody td:nth-child(2) a {
        display: block !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: anywhere !important;
    }
    body main.container-wide table.adam-board-table--mobile-card tbody td[colspan] {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        padding: 16px 12px !important;
        text-align: center !important;
        white-space: normal !important;
    }
    body main.container-wide .alert {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: keep-all !important;   /* [adam] G-501: 한글 어절 보존 */
    }
    body .c-page-header__desc,
    body main.container-wide article p {
        max-width: calc(100vw - 24px) !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: keep-all !important;   /* [adam] G-501: 콘텐츠 본문 한글 어절 보존 */
    }
}

@media (max-width: 360px) {
    body main.container-wide .adam-board-mobile-list,
    body main.container-wide .adam-board-mobile-list__item,
    body main.container-wide .adam-board-mobile-list__empty,
    body main.container-wide .alert {
        width: 100% !important;
        max-width: 100% !important;
    }
    body main.container-wide .adam-board-mobile-list__title {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* [adam] G-529: Main hero banner uses up to five admin images, with a CSS-only placeholder when empty. */
.adam-main-banner {
    position: relative;
    margin: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
}
.adam-hero-a__inner > * {
    min-width: 0;
}
.adam-hero-a__copy {
    align-self: center;
}
.adam-hero-a__media {
    min-width: 0;
}
.adam-main-banner__viewport,
.adam-main-banner__media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--surface-2);
    overflow: hidden;
}
.adam-main-banner__viewport::after,
.adam-main-banner__media::after {
    content: '';
    display: block;
    padding-top: 75%;
}
@supports (aspect-ratio: 4 / 3) {
    .adam-main-banner__viewport::after,
    .adam-main-banner__media::after {
        display: none;
    }
}
.adam-main-banner__slide {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity .85s ease;
}
.adam-main-banner__slide.is-active {
    opacity: 1;
    pointer-events: auto;
}
.adam-main-banner__slide img,
.adam-main-banner__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.adam-main-banner__placeholder {
    aspect-ratio: 4 / 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 28px;
    background: #EEE8DC;
    color: var(--text-sec);
    text-align: center;
}
.adam-main-banner__placeholder strong {
    color: var(--primary-dark);
    font-size: 22px;
    line-height: 1.25;
}
.adam-main-banner__placeholder span {
    font-size: 13px;
    line-height: 1.5;
}
.adam-main-banner__placeholder-label {
    color: var(--accent);
    font-family: var(--font-display, inherit);
    font-size: 11px !important;
    font-weight: 700;
    letter-spacing: .18em;
}
.adam-main-banner__caption {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-family: monospace;
    font-size: 11px;
    line-height: 1.4;
}
.adam-main-banner__caption strong {
    color: var(--accent);
}
.adam-main-banner__dots {
    position: absolute;
    right: 14px;
    bottom: 46px;
    display: flex;
    gap: 6px;
    padding: 5px 6px;
    border-radius: 999px;
    background: rgba(31,27,22,.42);
    backdrop-filter: blur(4px);
    z-index: 5;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.adam-main-banner__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.62);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}
.adam-main-banner__dot.is-active {
    width: 18px;
    background: #fff;
}
@media (max-width: 600px) {
    .adam-main-banner__caption {
        flex-direction: column;
        gap: 4px;
    }
    .adam-main-banner__placeholder {
        padding: 22px 18px;
    }
    .adam-main-banner__dots {
        bottom: 64px;
    }
}
@media (max-width: 899px) {
    .adam-hero-a__copy {
        align-self: start;
    }
}

/* ============================================================
   [adam] G-500 반응형 개선 — 검수 결과 반영
   1) 한/영 줄바꿈: 어절·단어 중간 끊김 방지
   2) 모바일 헤더: 햄버거 토글 도입
   3) Top 버튼: 푸터/콘텐츠와 겹침 방지
   4) 메인 배너: 스켈레톤 로딩 표시
   ============================================================ */

/* 1) 본문 한글/영문 줄바꿈 — 어절 단위 보존 */
.site-main,
.site-main p,
.site-main h1,
.site-main h2,
.site-main h3,
.site-main h4,
.site-main li,
.adam-hero-a,
.adam-hero,
.adam-hero-a__inner,
.adam-hero-a p,
.site-footer,
.c-page-header h1,
.c-page-header__desc {
    word-break: keep-all;
    overflow-wrap: anywhere;
}
/* 영문 부제 — 어절 단위 줄바꿈 (ARCHIVE 같은 한 단어가 끊기지 않도록) */
.adam-hero-a p.text-accent,
.adam-hero-a .font-display.text-accent {
    word-break: keep-all;
    overflow-wrap: normal;
    white-space: normal;
}
/* 인용구 — 자연스러운 줄바꿈 */
.site-main blockquote,
.site-main blockquote p,
.adam-quote,
.adam-quote p {
    word-break: keep-all;
    overflow-wrap: break-word;
    line-break: strict;
}

/* ── 메인 인용 섹션 ────────────────────────────── */
.c-main-quote {
    position: relative;
    margin-top: 24px;
    padding: 8px 0;
    background: transparent;
    overflow: hidden;
}
.c-main-quote::after {
    content: none;
}
.c-main-quote__inner {
    position: relative;
    z-index: 1;
    max-width: 1440px;
    margin: 0 auto;
    min-height: auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
}
.c-main-quote__panel {
    width: 100%;
    min-height: 170px;
    padding: 28px 56% 26px 52px;
    border-radius: 14px;
    background:
        linear-gradient(90deg, rgba(252, 249, 243, 0.97) 0%, rgba(252, 249, 243, 0.95) 36%, rgba(252, 249, 243, 0.68) 52%, rgba(252, 249, 243, 0.12) 70%, rgba(252, 249, 243, 0) 100%),
        url("../img/main-quote-river-bg.png") right center / cover no-repeat,
        linear-gradient(180deg, rgba(255, 251, 244, 0.92), rgba(247, 239, 224, 0.86));
    box-shadow: 0 10px 28px rgba(76, 56, 36, 0.08);
    border: 1px solid rgba(119, 89, 55, 0.1);
}
.c-main-quote__mark {
    display: block;
    margin-bottom: 10px;
    font-family: 'Noto Serif KR', serif;
    font-size: 34px;
    line-height: 1;
    color: rgba(160, 110, 48, 0.92);
    text-align: center;
}
.c-main-quote__text {
    margin: 0;
    font-family: 'Noto Serif KR', serif;
    max-width: 540px;
    font-size: clamp(17px, 1.35vw, 20px);
    font-weight: 500;
    line-height: 1.75;
    letter-spacing: -0.02em;
    color: #2f241b;
    text-wrap: pretty;
}
.c-main-quote__cite {
    display: block;
    margin-top: 14px;
    font-style: normal;
    font-size: 11px;
    line-height: 1.6;
    color: rgba(76, 60, 46, 0.84);
    letter-spacing: 0;
}
.c-main-quote__cite span {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.c-main-quote__mobile-break {
    display: none;
}
@media (max-width: 1023px) {
    .c-main-quote {
        background: transparent;
    }
    .c-main-quote__inner {
        min-height: auto;
        justify-content: center;
    }
    .c-main-quote__panel {
        padding: 26px 44% 24px 32px;
    }
}
@media (max-width: 767px) {
    .c-main-quote__inner {
        padding: 0 16px;
    }
    .c-main-quote__panel {
        min-height: 0;
        padding: 20px 18px;
        border-radius: 18px;
        background:
            linear-gradient(180deg, rgba(252, 249, 243, 0.95) 0%, rgba(252, 249, 243, 0.9) 48%, rgba(252, 249, 243, 0.78) 100%),
            url("../img/main-quote-river-bg.png") center center / cover no-repeat;
    }
    .c-main-quote__mark {
        margin-bottom: 8px;
        font-size: 30px;
    }
    .c-main-quote__text {
        max-width: none;
        font-size: clamp(15px, 4vw, 17px);
        line-height: 1.62;
    }
    .c-main-quote__cite {
        margin-top: 18px;
        font-size: 12px;
        letter-spacing: 0;
    }
    .c-main-quote__mobile-break {
        display: inline;
    }
}

/* 2) 모바일 헤더 햄버거 토글 (≤768px) — 로고 왼쪽에 배치 */
.site-nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 44px;   /* [adam] G-501: 터치 타겟 44px 확보 */
    height: 44px;
    align-items: center;
    justify-content: center;
    color: var(--text);
    cursor: pointer;
    flex: 0 0 auto;
    padding: 0;
}
.site-nav-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.site-nav-toggle svg { width: 22px; height: 22px; }
.site-nav-toggle .icon-close { display: none; }
.site-nav-toggle.is-open .icon-open { display: none; }
.site-nav-toggle.is-open .icon-close { display: block; }

/* 메뉴 내부 검색 폼 — 데스크톱에서는 숨김(헤더 .search-box 사용) */
.site-nav__search { display: none; }

/* ── 모바일 헤더: 햄버거 + 드롭다운 (G-497 그리드 시스템 위에 재정의) ──
   레거시(G-253/G-497)가 .site-header__inner 를 grid 로 !important 배치하므로
   동일/상위 specificity + !important 로 통합한다.
   그리드 4열: [☰ toggle] [logo] [util] [userbar], 네비는 2행 풀폭 드롭다운. */
@media (max-width: 1023px) {
    /* [adam] G-502: 햄버거 적용 범위를 1023px 까지 확장 — 901~1023px 에서 풀 네비가
       한 줄에 안 맞아 메뉴 글자가 세로로 깨지던 문제 해결. 1024px+ 는 풀 네비 정상.
       이 구간은 레거시 grid(≤900)가 적용 안 되므로 display:grid 를 직접 강제한다. */
    body .site-header__inner {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr) auto auto !important;
        align-items: center !important;
        column-gap: 8px !important;
    }
    /* 데스크톱 헤더 검색창은 숨기고 햄버거 메뉴 내부 검색으로 대체 */
    body .site-header__inner .search-box { display: none !important; }
    body .site-header__inner .site-nav-toggle {
        display: inline-flex !important;
        grid-column: 1 !important;
        grid-row: 1 !important;
        align-self: center !important;
    }
    body .site-header__inner .logo {
        grid-column: 2 !important;
        grid-row: 1 !important;
        font-size: 16px !important;
    }
    body .site-header__inner .adam-util-icons {
        grid-column: 3 !important;
        grid-row: 1 !important;
    }
    body .site-header__inner .adam-userbar,
    body .site-header__inner .hd_login_actions {
        grid-column: 4 !important;
        grid-row: 1 !important;
    }
    /* 네비 = 풀폭 접이식 드롭다운 (레거시 가로 스크롤 무력화) */
    body .site-header__inner .site-nav {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 2px !important;
        overflow: hidden !important;
        white-space: normal !important;
        max-height: 0 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        padding: 0 12px !important;
        margin: 0 -12px !important;
        border-top: 0 solid var(--border);
        background: var(--surface);
        transition: max-height .28s ease, opacity .2s ease;
    }
    body .site-header__inner .site-nav.is-open {
        max-height: 620px !important;
        opacity: 1 !important;
        visibility: visible !important;
        padding: 8px 12px 14px !important;
        border-top-width: 1px;
    }
    body .site-header__inner .site-nav a {
        flex: 0 0 auto !important;
        width: 100% !important;
        min-width: 0 !important;
        padding: 12px !important;   /* 터치 타겟 ≥44px */
        font-size: 15px !important;
        border-radius: 6px;
        white-space: normal !important;
    }
    /* 메뉴 내부 검색 폼 노출 */
    body .site-header__inner .site-nav .site-nav__search {
        display: flex !important;
        align-items: center;
        gap: 8px;
        width: 100%;
        margin-top: 8px;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }
    body .site-header__inner .site-nav__search input[type="search"] {
        flex: 1 1 auto;
        min-width: 0;
        height: 44px;
        padding: 0 12px;
        border: 1px solid var(--border);
        border-radius: 8px;
        font-size: 15px;
        background: var(--bg);
        color: var(--text);
    }
    body .site-header__inner .site-nav__search input[type="search"]:focus-visible {
        outline: 2px solid var(--primary);
        outline-offset: 1px;
    }
    body .site-header__inner .site-nav__search button {
        flex: 0 0 auto;
        width: 44px;
        height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--primary);
        color: #fff;
        border: none;
        border-radius: 8px;
        cursor: pointer;
    }
    body .site-header__inner .site-nav__search button svg { width: 20px; height: 20px; }
    /* 우측 유틸 아이콘 터치 타겟 — 충분히 크게 */
    body .site-header__inner .adam-util-icon,
    body .site-header__inner .adam-userbar__icon-trigger {
        width: 44px !important;
        height: 44px !important;
    }
}
/* 좁은 화면(≤420px): 로고를 살짝 줄여 햄버거+아이콘과 한 줄에 브랜드명 전체 표시 */
@media (max-width: 420px) {
    body .site-header__inner .logo {
        font-size: 14px !important;
        letter-spacing: -.03em !important;
    }
}
/* 초소형 화면(≤360px): 아이콘 풋프린트를 줄여 브랜드명이 잘리지 않도록 */
@media (max-width: 360px) {
    body .site-header__inner { column-gap: 4px !important; }
    body .site-header__inner .adam-util-icons { gap: 0 !important; }
    body .site-header__inner .adam-util-icon,
    body .site-header__inner .adam-userbar__icon-trigger {
        width: 38px !important;
        height: 38px !important;
    }
    body .site-header__inner .logo {
        font-size: 13px !important;
        letter-spacing: -.04em !important;
    }
}

/* [adam] G-503: 상세 게시글 제목(.card-header h1.font-display)이 전 폭 24px 고정이라
   모바일에서 3줄을 차지하며 과도하게 큼 → 단계적 축소 (동일 specificity·후순위로 24px override). */
@media (max-width: 768px) {
    .card-header h1.font-display { font-size: 20px !important; line-height: 1.4 !important; }
}
@media (max-width: 480px) {
    .card-header h1.font-display { font-size: 18px !important; }
}

/* 3) Top 버튼 — 푸터/플로팅 영역과 겹침 방지, 모바일에서 충분한 안전여백 */
#top_btn {
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 768px) {
    #top_btn {
        right: 16px;
        bottom: calc(20px + env(safe-area-inset-bottom, 0px));
        width: 42px;
        height: 42px;
    }
}
@media (max-width: 480px) {
    #top_btn {
        right: 12px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        width: 40px;
        height: 40px;
    }
}

/* 4) 메인 배너 — 이미지 로딩 전 스켈레톤 표시 */
.adam-main-banner__viewport {
    position: relative;
}
.adam-main-banner__viewport::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, var(--surface-2, #f0e8d8) 25%, var(--surface, #f7f1e3) 50%, var(--surface-2, #f0e8d8) 75%);
    background-size: 200% 100%;
    animation: adamSkeleton 1.4s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}
.adam-main-banner__viewport.is-loaded::before {
    opacity: 0;
}
.adam-main-banner__slide { position: absolute; inset: 0; z-index: 1; }
@keyframes adamSkeleton {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
    .adam-main-banner__viewport::before { animation: none; }
}

/* 모바일에서는 강제 줄바꿈(br.hide-on-mobile) 제거하고 자연스러운 흐름 줄바꿈으로 */
@media (max-width: 768px) {
    .hide-on-mobile { display: none !important; }
}

/* 2026-10-15 phones: the two hero buttons shrank to their padding (32px) and the labels overlapped */
@media (max-width: 900px) {
  .flex.gap-2 > .btn { display: inline-flex; align-items: center; flex: 0 0 auto; width: auto; max-width: none; }
}
