/*
 * 사이트 공통 스타일 (2026-10-30). 지금 사이트의 구성(상단 메뉴, 메인 바로가기 4개, 게시판)을 따르고 색은 InnoQuartz 주황.
 * 로고·메인 슬라이드 이미지는 확보 후 교체 (docs/README.md 4장). 외부 글꼴·CDN 을 쓰지 않는다
 */
:root {
  --brand: #f99808;
  --brand-dark: #d97f00;
  --brand-soft: #fff4e2;
  --ink: #1f2328;
  --ink-soft: #57606a;
  --line: #e3e6ea;
  --surface: #ffffff;
  --surface-alt: #f6f7f9;
  --danger: #c0392b;
  --ok: #1a7f37;
  --radius: 6px;
  --shadow: 0 2px 10px rgba(16, 24, 40, .08);
  --font: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); font-family: var(--font); font-size: 15px; color: var(--ink); line-height: 1.6; 
  /* 한글은 낱말 중간에서 줄을 바꾸지 않는다 (긴 주소·영문은 넘치면 끊음) */
  word-break: keep-all; overflow-wrap: break-word; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; height: auto; }
h1 { font-size: 26px; line-height: 1.3; margin: 0 0 16px; }
h2 { font-size: 19px; margin: 32px 0 12px; }
h3 { font-size: 16px; margin: 20px 0 8px; }
[hidden] { display: none !important; }

.container { max-width: 1200px; margin: 0 auto; padding: 32px 16px; }
.narrow { max-width: 460px; }
.muted { color: var(--ink-soft); font-size: 13px; }
.inline { display: inline; }
.empty { padding: 48px 16px; text-align: center; color: var(--ink-soft); }
.message, .error { margin: 0 0 16px; padding: 10px 14px; border-radius: var(--radius); font-size: 14px; }
.message { background: #e9f6ec; color: var(--ok); }
.error { background: #fdecea; color: var(--danger); }

/* ---------- 버튼 · 입력 ---------- */
button, .button {
  display: inline-flex; align-items: center; gap: 4px; padding: 8px 16px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px;
  cursor: pointer; line-height: 1.4;
}
button:hover, .button:hover { border-color: var(--brand); color: var(--brand-dark); }
button[type=submit], .button.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
button[type=submit]:hover, .button.primary:hover { background: var(--brand-dark); color: #fff; }
button.danger { background: var(--surface); border-color: var(--danger); color: var(--danger); }
button.link { padding: 0; border: 0; background: none; color: var(--ink-soft); }
button.link:hover { color: var(--brand-dark); }
input, select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #cfd4da; border-radius: var(--radius); background: #fff;
  font: inherit; font-size: 14px; color: var(--ink);
}
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--brand); }
input[type=file] { padding: 6px; }
.form { display: flex; flex-direction: column; gap: 6px; }
.form > label:not(.checkbox) { margin-top: 10px; font-size: 14px; font-weight: 600; }
.form > button[type=submit] { align-self: flex-start; margin-top: 16px; padding: 10px 28px; }
.narrow .form > button[type=submit] { align-self: stretch; justify-content: center; }
.checkbox { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.choices { display: flex; flex-wrap: wrap; gap: 12px; }
.links { margin-top: 20px; font-size: 14px; color: var(--ink-soft); text-align: center; }

/* ---------- 머리글 ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 28px; height: 68px; padding-top: 0; padding-bottom: 0; }
.logo { flex-shrink: 0; font-size: 19px; font-weight: 800; color: var(--ink); letter-spacing: -.3px; }
.logo::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 2px; background: var(--brand); }
.gnb { flex: 1; height: 100%; }
.gnb > ul { display: flex; gap: 4px; height: 100%; margin: 0; padding: 0; list-style: none; }
.gnb > ul > li { position: relative; display: flex; align-items: center; }
.gnb > ul > li > a, .gnb > ul > li > span { position: relative; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 15px; white-space: nowrap; color: var(--ink); transition: background .15s, color .15s; }
.gnb > ul > li:hover > a, .gnb > ul > li:hover > span { background: var(--surface-alt); color: var(--brand-dark); }
.gnb ul ul {
  position: absolute; top: 100%; left: 0; min-width: 200px; margin: 0; padding: 8px 0; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(4px); transition: .15s;
}
/* 3단계 목록: 부모(2단계)가 숨겨져 있으면 같이 숨는다 (visible 로 두면 투명한 채로 클릭·마우스를 가로챔) */
.gnb ul ul ul { position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; opacity: 1; visibility: inherit; transform: none; }
/* 하위 메뉴: 마우스를 올렸을 때, 또는 키보드로 안에 들어왔을 때만 (마우스로 누른 뒤 남는 포커스로는 열지 않음) */
.gnb li:hover > ul, .gnb li.touch-open > ul { opacity: 1; visibility: visible; transform: none; }
.gnb li:has(:focus-visible) > ul { opacity: 1; visibility: visible; transform: none; }
.gnb ul ul a, .gnb ul ul span { display: block; padding: 7px 16px; font-size: 14px; white-space: nowrap; }
.gnb ul ul a:hover { background: var(--brand-soft); }
/* 머리글 오른쪽 도구: 아이콘 버튼·언어·로그인/회원 메뉴 */
.header-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }
.header-tools .icon { flex-shrink: 0; }
.tool-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; color: var(--ink-soft); transition: background .15s, color .15s; }
.tool-btn:hover { background: var(--surface-alt); color: var(--ink); }
.tool-btn .icon { width: 20px; height: 20px; }
.tool-btn .badge { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #e5484d; color: #fff; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.lang-switch { display: inline-flex; margin: 0 4px; padding: 3px; border-radius: 999px; background: var(--surface-alt); }
.lang-switch a { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .3px; color: var(--ink-soft); transition: .15s; }
.lang-switch a:hover { color: var(--ink); }
.lang-switch a.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .14); }
.btn-ghost, .btn-solid { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 10px; font-size: 14px; font-weight: 600; white-space: nowrap; transition: .15s; }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--surface-alt); color: var(--ink); }
.btn-solid { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(217, 127, 0, .35); }
.btn-solid:hover { background: var(--brand-dark); color: #fff; }
.user-menu { position: relative; margin-left: 4px; }
.header-tools button.user-toggle { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; transition: .15s; }
.header-tools button.user-toggle:hover, .user-menu.open button.user-toggle { border-color: #cdd3da; box-shadow: var(--shadow); color: var(--ink); }
.user-toggle .icon { width: 14px; height: 14px; color: var(--ink-soft); transition: transform .15s; }
.user-menu.open .user-toggle .icon { transform: rotate(180deg); }
.user-toggle .nick { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #fbbf5c); color: #fff; font-size: 13px; font-weight: 700; }
.user-dropdown { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 230px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 36px rgba(15, 23, 42, .16); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .15s; }
.user-menu.open .user-dropdown { opacity: 1; visibility: visible; transform: none; }
.user-dropdown .who { display: flex; flex-direction: column; margin-bottom: 6px; padding: 10px 12px 12px; border-bottom: 1px solid var(--line); }
.user-dropdown .who strong { font-size: 15px; }
.user-dropdown .who span { font-size: 12px; color: var(--ink-soft); }
.user-dropdown a, .user-dropdown button[type=submit] { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 8px; background: none; color: var(--ink); font-size: 14px; font-weight: 500; text-align: left; box-shadow: none; }
.user-dropdown a:hover, .user-dropdown button[type=submit]:hover { background: var(--surface-alt); color: var(--ink); }
.user-dropdown .icon { width: 17px; height: 17px; color: var(--ink-soft); }
.user-dropdown a.to-admin, .user-dropdown a.to-admin .icon { color: var(--brand-dark); }
.user-dropdown form { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid var(--line); }
.user-dropdown button[type=submit], .user-dropdown button[type=submit] .icon { color: var(--danger); }
.nav-toggle { display: none; width: 40px; height: 40px; padding: 10px 9px; border: 0; background: none; flex-direction: column; justify-content: space-between; align-items: stretch; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 1px; }

.logo.image::before { display: none; }
.logo img { display: block; max-height: 44px; width: auto; }
/* 바닥글은 어두운 바탕이라, 흰 바탕용 로고(어두운 글자)도 보이도록 흰 칸 위에 둔다 */
.footer-logo { display: block; box-sizing: content-box; max-height: 36px; width: auto; margin-bottom: 12px; padding: 6px 10px; border-radius: 6px; background: #fff; }

/* ---------- 메인 ---------- */
.slides { position: relative; background: #fff; }
.slide-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slide-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; display: flex; justify-content: center; margin: 0; scroll-snap-align: start; }
/* 슬라이드 그림에 글자가 들어 있어 자르지 않고 비율대로 줄인다. 1920px 보다 넓은 화면에서는 늘리지 않는다 */
.slide img { display: block; width: 100%; max-width: 1920px; height: auto; }
.slide-dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 8px; }
.slide-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: rgba(36, 41, 47, .25); }
.slide-dots button.active { background: var(--brand); }
.hero { background: linear-gradient(120deg, #24292f 0%, #3a3f46 60%, #59422a 100%); color: #fff; }
.hero .container { padding-top: 72px; padding-bottom: 72px; }
.hero h1 { font-size: 34px; margin-bottom: 8px; }
.hero p { margin: 0; color: #d0d7de; font-size: 17px; }
.service h2 { margin-top: 0; font-size: 22px; }
.shortcuts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.shortcuts a { display: block; height: 100%; padding: 28px 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); transition: .15s; }
.shortcuts a:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); color: inherit; }
.shortcuts strong { display: block; margin-bottom: 6px; font-size: 18px; }
/* 메인 게시판별 최신글 카드 */
.latest h2 { margin-top: 0; font-size: 22px; }
.latest-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.latest-card { padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.latest-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.latest-card h3 { margin: 0; font-size: 17px; }
.latest-card .more { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.latest-card ul { list-style: none; margin: 0; padding: 0; }
.latest-card li { display: flex; align-items: center; gap: 6px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.latest-card li:last-child { border-bottom: 0; }
.latest-card li a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.latest-card li .count { color: var(--brand); font-size: 12px; }
.latest-card li time { color: var(--ink-soft); font-size: 13px; }
.latest-card .empty { margin: 0; padding: 20px 0; text-align: center; color: var(--ink-soft); font-size: 14px; }
.shortcuts strong::after { content: " →"; color: var(--brand); }
.shortcuts span { color: var(--ink-soft); font-size: 14px; }

/* ---------- 게시판 목록 ---------- */
.board > h1 { padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.board-header { margin-bottom: 16px; color: var(--ink-soft); }
.categories { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.categories a { padding: 5px 14px; border: 1px solid var(--line); border-radius: 16px; font-size: 13px; }
.categories a.sub { border-style: dashed; }
.categories a.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.post-list { width: 100%; border-collapse: collapse; font-size: 14px; }
.post-list th { padding: 10px 8px; border-bottom: 1px solid var(--ink); font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.post-list td { padding: 12px 8px; border-bottom: 1px solid var(--line); text-align: center; color: var(--ink-soft); white-space: nowrap; }
.post-list td.col-title { width: 100%; text-align: left; color: var(--ink); white-space: normal; }
.post-list td.col-thumbnail { width: 96px; padding: 8px; }
.post-list .thumb img { display: block; width: 80px; height: 56px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.post-list tr.notice td { background: var(--brand-soft); }
.post-list tr.notice td:first-child { color: var(--brand-dark); font-weight: 700; }
.post-list .category { margin-right: 6px; color: var(--brand-dark); font-size: 13px; }
.post-list .bold { font-weight: 700; }
.post-list .count { margin-left: 4px; color: var(--brand-dark); font-size: 12px; font-weight: 700; }
.post-list .lock, .done { margin-left: 6px; padding: 1px 6px; border-radius: 3px; background: var(--surface-alt); color: var(--ink-soft); font-size: 11px; }
.done { background: #e9f6ec; color: var(--ok); }
.pagination { display: flex; justify-content: center; gap: 4px; margin: 24px 0; }
.pagination a { min-width: 34px; padding: 6px 10px; border: 1px solid transparent; border-radius: var(--radius); text-align: center; font-size: 14px; }
.pagination a:hover { border-color: var(--line); }
.pagination a.active, .pagination a.current { background: var(--ink); color: #fff; }
.board-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin-top: 16px; }
.board-actions .search, .search-form, .filters { display: flex; flex-wrap: wrap; gap: 6px; }
.board-actions .search select, .search-form select { width: auto; }
.board-actions .search input, .search-form input { width: 220px; }

/* ---------- 글 보기 ---------- */
.post .board-name { margin: 0 0 6px; font-size: 14px; color: var(--brand-dark); font-weight: 600; }
.post > h1 { margin-bottom: 8px; }
.post > .meta { margin: 0 0 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: 13px; }
.extra { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0 0 24px; padding: 16px 20px; background: var(--surface-alt); border-radius: var(--radius); font-size: 14px; }
.extra dt { font-weight: 600; color: var(--ink-soft); }
.extra dd { margin: 0; }
.page-view > h1 { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.page-admin-bar { display: flex; gap: 12px; align-items: center; margin: 0 0 12px; padding: 8px 12px; border-radius: 6px; background: #fff8ec; font-size: 13px; }
.page-admin-bar strong { color: #b45309; }
.post-content { min-height: 120px; font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.post-content table { border-collapse: collapse; margin: 12px 0; }
.post-content th, .post-content td { padding: 6px 10px; border: 1px solid var(--line); }
.post-content pre { padding: 14px 16px; overflow-x: auto; background: #24292f; color: #e6edf3; border-radius: var(--radius); font-size: 13px; line-height: 1.5; }
.post-content code { padding: 1px 5px; background: var(--surface-alt); border-radius: 3px; font-size: .9em; }
.post-content pre code { padding: 0; background: none; }
.post-content blockquote { margin: 12px 0; padding: 4px 16px; border-left: 4px solid var(--brand); color: var(--ink-soft); }
.post-content iframe { max-width: 100%; }
.post-content .task-list-item { list-style: none; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 24px 0 0; }
.tags a { padding: 2px 10px; background: var(--surface-alt); border-radius: 12px; font-size: 13px; color: var(--ink-soft); }
.attachments { margin: 20px 0 0; padding: 12px 16px; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; }
.attachments li + li { margin-top: 4px; }
.attachments li::before { content: "📎 "; }
.attachments:empty, .write .attachments:not(:has(li)) { display: none; }
.post-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 28px 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; }
.post-actions a { padding: 8px 12px; color: var(--ink-soft); }
.neighbors p { display: flex; gap: 16px; margin: 0; padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.neighbors span { flex-shrink: 0; width: 60px; color: var(--ink-soft); }

/* ---------- 댓글 ---------- */
.comments { margin-top: 40px; }
.comment { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.comment.reply { padding-left: 16px; border-left: 2px solid var(--line); }
.comment.depth-1 { margin-left: 16px; } .comment.depth-2 { margin-left: 32px; } .comment.depth-3 { margin-left: 48px; }
.comment.depth-4, .comment.depth-5 { margin-left: 64px; }
.comment .meta { margin: 0 0 6px; color: var(--ink-soft); font-size: 13px; }
.comment .meta strong { margin-right: 8px; color: var(--ink); }
.comment details { margin-top: 6px; }
.comment summary { cursor: pointer; color: var(--ink-soft); font-size: 13px; }
#comment-form { margin-top: 20px; padding: 16px; background: var(--surface-alt); border-radius: var(--radius); }

/* ---------- 글쓰기 ---------- */
.write .options { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-top: 12px; padding: 12px 16px; background: var(--surface-alt); border-radius: var(--radius); }
.write .options input:not([type=checkbox]), .write .options select { width: auto; }
.write .options label.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: normal; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 20px; }
.editor { margin-top: 4px; }
.editor .toastui-editor-defaultUI { border-color: #cfd4da; border-radius: var(--radius); }

/* ---------- 회원 · 내 정보 ---------- */
.terms { margin: 12px 0 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.terms legend { padding: 0 6px; font-weight: 600; font-size: 14px; }
.terms-body { max-height: 160px; overflow-y: auto; margin-bottom: 8px; padding: 10px; background: var(--surface-alt); font-size: 13px; color: var(--ink-soft); }
.terms-body.full { max-height: none; padding: 16px 20px; font-size: 14px; color: var(--ink); line-height: 1.8; }
.terms-body h3 { margin: 18px 0 6px; font-size: 15px; color: var(--ink); }
.terms-body h3:first-child { margin-top: 0; }
.terms-body ol, .terms-body ul { margin: 4px 0 8px; padding-left: 22px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 20px; border-bottom: 1px solid var(--line); }
.tabs a { margin-bottom: -1px; padding: 8px 14px; border-bottom: 2px solid transparent; font-size: 14px; color: var(--ink-soft); }
.tabs a.current, .tabs a:hover { border-bottom-color: var(--brand); color: var(--ink); }
.profile { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0 0 24px; font-size: 14px; }
.profile dt { color: var(--ink-soft); }
.profile dd { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions a { padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; }
.images { padding: 0; list-style: none; }
.images li { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.images img { max-height: 48px; }
.images input[type=file] { width: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list td { padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.list td.date { width: 110px; color: var(--ink-soft); text-align: right; }
.notifications, .comments-list, .search-results { padding: 0; list-style: none; }
.notifications li, .search-results li, ul.comments li { display: flex; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.notifications li.unread a { font-weight: 700; }
.notifications .date, .search-results .date, ul.comments .date { margin-left: auto; flex-shrink: 0; color: var(--ink-soft); font-size: 13px; }
.search-results .board { flex-shrink: 0; min-width: 90px; color: var(--brand-dark); font-size: 13px; }
ul.comments { padding: 0; list-style: none; }

/* ---------- 바닥글 ---------- */
.site-footer { margin-top: 64px; background: #24292f; color: #b9c1ca; font-size: 13px; }
.site-footer .container { padding-top: 32px; padding-bottom: 32px; }
.site-footer p { margin: 2px 0; }
.site-footer strong { color: #fff; }
.footer-links { margin-top: 10px !important; }
.footer-links a { color: #d6dce3; }
.footer-links a.privacy { color: #fff; font-weight: 700; }
.copyright { margin-top: 12px !important; color: #8b949e; }

/* ---------- 인쇄 ---------- */
@media print {
  .site-header, .site-footer, .post-actions, .comments, .neighbors { display: none; }
}

/* ---------- 좁은 화면 ---------- */
/* 상단 메뉴 5개 + 오른쪽 도구가 한 줄에 들어가지 않는 너비부터 햄버거 메뉴 (도구는 그대로 오른쪽에) */
@media (max-width: 1080px) {
  .header-inner { flex-wrap: wrap; height: auto; min-height: 64px; gap: 8px 12px; }
  .header-tools { order: 2; }
  .nav-toggle { display: flex; order: 3; }
  .gnb { order: 4; display: none; width: 100%; flex: none; height: auto; padding-bottom: 12px; }
  .nav-open .gnb { display: block; }
  .gnb > ul { flex-direction: column; gap: 0; }
  .gnb > ul > li { display: block; border-top: 1px solid var(--line); }
  .gnb > ul > li > a, .gnb > ul > li > span { display: block; padding: 12px 4px; }
  .gnb ul ul { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 8px 12px; }
}
@media (max-width: 720px) {
  /* 휴대폰: 1줄 = 로고 + 메뉴 버튼, 2줄 = 검색·언어·로그인 (한 줄에 다 넣으면 화면보다 넓어짐) */
  .header-inner { padding-top: 8px; padding-bottom: 8px; gap: 6px 12px; }
  .logo { font-size: 17px; }
  .nav-toggle { order: 2; margin-left: auto; }
  .header-tools { order: 3; width: 100%; margin-left: 0; justify-content: flex-end; }
  .user-toggle .nick { display: none; }
  .header-tools { gap: 2px; }
  .header-tools button.user-toggle { padding: 4px 8px 4px 4px; }
  .btn-ghost, .btn-solid { height: 34px; padding: 0 10px; font-size: 13px; }
  .lang-switch { margin: 0 2px; }
  .lang-switch a { padding: 3px 7px; }
  .latest-grid { grid-template-columns: 1fr; }
  .container { padding-top: 20px; padding-bottom: 20px; }
  h1 { font-size: 22px; }
  .hero .container { padding-top: 40px; padding-bottom: 40px; }
  .hero h1 { font-size: 26px; }
  /* 목록: 번호·조회 칸을 숨기고 제목을 넓게 */
  /* 좁은 화면: 제목·썸네일·날짜만 */
  .post-list .col-no, .post-list .col-author, .post-list .col-updated, .post-list .col-views,
  .post-list .col-likes, .post-list .col-dislikes { display: none; }
  .post-list td.col-thumbnail { width: 64px; padding: 8px 4px; }
  .post-list .thumb img { width: 56px; height: 40px; }
  .board-actions .search input, .search-form input { width: 100%; }
  .extra, .profile { grid-template-columns: 1fr; }
  .notifications li, .search-results li { flex-wrap: wrap; }
}

/* 본문 속 링크는 링크로 보이게 (첨부 내려받기·외부 주소 등) */
.post-content a { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 2px; }
.post-content a:hover { color: var(--ink); }

/* 태그로 거르는 중 표시, 수정 이력 (2026-11-06) */
.tag-filter { display: flex; gap: 12px; align-items: center; margin: 0 0 12px; font-size: 14px; color: var(--ink-soft); }
.history-list { display: grid; gap: 10px; margin-top: 16px; }
.history-item { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.history-item summary { cursor: pointer; font-size: 14px; }
.history-item .post-content { min-height: 0; margin: 12px 0; padding-top: 12px; border-top: 1px dashed var(--line); }

/* 화면 디자인 점검 (2026-11-06) */
/* 내용이 짧아도 바닥글이 화면 아래에 붙게 */
.site-body { min-height: 100vh; display: flex; flex-direction: column; }
.site-body > main { flex: 1 0 auto; }
/* 오류 화면 (404·403·500) */
.error-page { max-width: 640px; padding-top: 72px; padding-bottom: 88px; text-align: center; }
.error-page .error-code { margin: 0 0 4px; font-size: 64px; font-weight: 800; line-height: 1; color: var(--brand); letter-spacing: -1px; }
.error-page h1 { margin: 12px 0 10px; font-size: 22px; }
.error-page .error-hint { margin: 0 0 28px; color: var(--ink-soft); line-height: 1.7; }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.error-actions .btn-ghost { border: 1px solid var(--line); }
/* 비회원 댓글 안내 */
.comment-login { display: flex; gap: 12px; align-items: center; margin: 16px 0 0; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 10px; color: var(--ink-soft); font-size: 14px; }
.comment-login a { color: var(--brand-dark); font-weight: 600; }
/* 내 정보: 탭이 한 줄에 들어가게 넓게, 좁은 화면은 옆으로 밀어 보기. 회원 탈퇴는 따로 */
.my-page { max-width: 760px; }
.my-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.my-tabs a { white-space: nowrap; }
.my-tabs a.current { font-weight: 700; }
.my-withdraw { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; }
.my-withdraw a { color: var(--ink-soft); text-decoration: underline; }

/* 조작 점검 (2026-11-06) */
/* 주소 #댓글 로 이동할 때 고정 머리글에 가리지 않게 (휴대폰은 머리글이 두 줄) */
html { scroll-padding-top: 84px; }
@media (max-width: 720px) { html { scroll-padding-top: 140px; } }
/* 본문의 넓은 표는 표 안에서만 옆으로 밀어 보기 (화면 전체가 넓어지지 않게) */
.post-content table { display: block; max-width: 100%; overflow-x: auto; }
/* 보내는 중인 버튼 */
button.is-submitting { opacity: .6; cursor: progress; }

/* 사용자 화면 가독성 (2026-11-06) */
.search-summary { margin: 16px 0 4px; font-size: 14px; color: var(--ink-soft); }
.field-help { margin: -2px 0 6px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }
.my-help { margin: 0 0 16px; }
/* 인쇄 화면 */
.print-page { max-width: 760px; margin: 32px auto; padding: 0 24px; }
.print-page .print-board { margin: 0 0 4px; font-size: 13px; color: var(--ink-soft); }
.print-page h1 { margin: 0 0 6px; }
.print-page .meta { margin: 0 0 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); }

/* ---------- 사이트 팝업 (관리자 → 팝업, templates/fragments/popup.html) ---------- */
.site-popups { position: fixed; top: 88px; left: 24px; right: 24px; z-index: 900; display: flex; flex-wrap: wrap;
  gap: 16px; align-items: flex-start; pointer-events: none; }
.site-popup { pointer-events: auto; max-width: 100%; max-height: calc(100vh - 112px); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 40px rgba(16, 24, 40, .22); overflow: hidden; }
.site-popup[hidden] { display: none; }
.site-popup-title { margin: 0; padding: 12px 16px; font-size: 16px; border-bottom: 1px solid var(--line); }
.site-popup-body { padding: 16px; overflow: auto; }
.site-popup-body img { max-width: 100%; height: auto; }
.site-popup-actions { display: flex; justify-content: space-between; gap: 12px; padding: 8px 16px; background: #24292f; }
.site-popup-actions .link { color: #fff; font-size: 13px; }
.site-popup-actions [data-popup-close] { margin-left: auto; }

/* 글쓰기 첨부 올리기: 진행률·실패 (static/js/site.js) */
.upload-state { color: var(--ink-soft); font-size: 13px; }
.upload-error .upload-state { color: var(--danger); }
.voters { margin: 8px 0 0; padding: 10px 14px; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; max-height: 240px; overflow-y: auto; }
.voters li { padding: 2px 0; }
