/* ==========================================================================
   CU Boulder KSAG — Korean Student Association Graduate
   흰 바탕 + CU 골드 마스트헤드 + 캠퍼스 배너 + 검정 내비게이션.
   ========================================================================== */

/* --- 1. Tokens ----------------------------------------------------------- */
:root {
  /* CU Boulder 공식 색 */
  --cu-gold: #cfb87c;
  --cu-gold-deep: #b89f57;   /* 골드 호버 · 테두리 */
  --cu-gold-ink: #6f5a1f;    /* 흰 바탕 위 골드 계열 텍스트 */
  --cu-black: #000000;
  --cu-blue: #096fae;
  --cu-dark-blue: #0a3758;

  /* 표면 */
  --bg: #ffffff;
  --bg-band: #f5f2e8;        /* 옅은 골드 띠 */
  --bg-head: #f7f3e6;        /* 옅은 틴트 — 호버 · 칩 */
  --card-head: #e7dcbb;      /* 카드 머리띠 (중간) */
  --card-head-lead: #c9ad5f; /* 벼룩시장 머리띠 (진하게) */
  --nav-bg: #111111;

  /* 텍스트 — 대비를 높였습니다 */
  --ink: #14161a;
  --ink-muted: #494e51;
  --ink-faint: #6e7376;

  /* 선 */
  --line: #dbd5c5;
  --line-strong: #bcb5a1;

  /* 링크 */
  --link: #085a8c;
  --link-hover: #06405f;

  /* 타이포 */
  --font-sans: "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", Arial, "Malgun Gothic", sans-serif;

  /* 형태 */
  --radius: 3px;
  --maxw: 1180px;
  --nav-h: 48px;
}

/* --- 2. Reset ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 14px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; display: block; }
/* display 를 지정한 요소에도 hidden 속성이 먹도록 (form.form-grid 등) */
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.24; letter-spacing: -0.012em; font-weight: 700; }
p { margin: 0; }

:focus-visible { outline: 2px solid var(--cu-blue); outline-offset: 2px; border-radius: 2px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 9px 16px;
  border-radius: 0 0 var(--radius) var(--radius); font-size: 0.88rem;
}
.skip-link:focus { top: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- 3. Layout helpers --------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: 30px; }
.section--tight { padding-block: 24px; }
.section--band { background: var(--bg-band); border-block: 1px solid var(--line); }

.section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: 10px;
  border-bottom: 1px solid var(--line-strong); margin-bottom: 13px;
}
.section-title {
  font-size: 1.18rem; color: var(--ink);
  padding-bottom: 9px; border-bottom: 3px solid var(--cu-gold); margin-bottom: -2px;
}
.section-head .link-more, .section-head .note { padding-bottom: 10px; }
.section-sub { color: var(--ink-muted); font-size: 0.9rem; margin-top: 6px; }

.eyebrow {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--cu-gold-ink);
}

.link-more { font-size: 0.83rem; font-weight: 600; color: var(--ink-muted); }
.link-more:hover { color: var(--ink); text-decoration: underline; }

.note { font-size: 0.82rem; color: var(--ink-faint); }
.note a, .form-note a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.note a:hover, .form-note a:hover { color: var(--link-hover); }

/* --- 4. Buttons — 절제된 형태, 호버 시 움직이지 않습니다 ------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border: 1px solid transparent; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 700; line-height: 1.3; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn--primary { background: var(--cu-gold); border-color: var(--cu-gold-deep); color: #12130f; }
.btn--primary:hover { background: var(--cu-gold-deep); border-color: #9b8443; }

.btn--outline { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.btn--outline:hover { background: var(--bg-band); border-color: #a29a85; }

.btn--dark { background: var(--nav-bg); border-color: var(--nav-bg); color: #fff; }
.btn--dark:hover { background: #000; border-color: #000; }

.btn--sm { padding: 6px 13px; font-size: 0.82rem; }

/* 이전 클래스 호환 */
.btn--gold { background: var(--cu-gold); border-color: var(--cu-gold-deep); color: #12130f; }
.btn--gold:hover { background: var(--cu-gold-deep); border-color: #9b8443; }
.btn--ghost { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { background: var(--bg-band); border-color: #a29a85; }

/* --- 5. 상단 유틸 바 (검정) ---------------------------------------------- */
.utilbar { background: var(--cu-black); color: #b8b4a6; font-size: 0.76rem; }
.utilbar .wrap {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; min-height: 30px;
}
.utilbar a { color: #d8d4c7; }
.utilbar a:hover { color: var(--cu-gold); }
.utilbar__links { display: flex; gap: 14px; align-items: center; }
.auth-slot { display: flex; gap: 12px; align-items: center; }
.auth-name { color: var(--cu-gold); font-weight: 700; }
.auth-admin { color: var(--cu-gold) !important; font-weight: 700; }
.linklike {
  background: none; border: 0; padding: 0; color: #d8d4c7;
  font-size: inherit; font-family: inherit; cursor: pointer;
}
.linklike:hover { color: var(--cu-gold); text-decoration: underline; }

/* --- 6. 골드 마스트헤드 -------------------------------------------------- */
.masthead { background: var(--cu-gold); }
.masthead .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 74px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; min-width: 0; }
.brand-mark {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 50%; object-fit: cover;
  background: #f7f4ee; border: 1px solid rgba(0, 0, 0, .12);
}
.brand-name {
  font-size: 1.95rem; font-weight: 800; letter-spacing: 0.04em;
  color: var(--cu-black); line-height: 1;
}
.brand-tag {
  font-size: 1.02rem; font-weight: 700; color: #3f350f; line-height: 1.2;
  letter-spacing: -0.01em; white-space: nowrap;
  padding-left: 12px; margin-left: 2px; border-left: 2px solid rgba(0, 0, 0, .32);
}
.masthead__en {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: #55491f;
}

/* --- 7. 캠퍼스 배너 (얇게 잘라 넣기) ------------------------------------- */
.bannerstrip {
  position: relative; height: 86px; overflow: hidden;
  background: var(--cu-dark-blue);
  border-top: 2px solid var(--cu-gold-deep);
}
.bannerstrip img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 24%;
}
/* 홈에서는 배너를 조금 더 크게 */
body[data-page="index.html"] .bannerstrip { height: 148px; }

/* --- 8. 검정 내비게이션 (스티키) ----------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg); border-bottom: 3px solid var(--cu-gold);
}
.site-header > .wrap { position: relative; }
.site-header > .wrap {
  display: flex; align-items: center; justify-content: flex-start;
  gap: 10px; min-height: var(--nav-h);
}
.site-header .header-actions { margin-left: auto; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav > li { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 5px;
  padding: 12px 14px; font-size: 0.94rem; font-weight: 700; color: #ded9cc;
  transition: background-color .15s ease, color .15s ease;
}
.nav-link:hover, .nav > li:hover > .nav-link { background: rgba(255, 255, 255, .11); color: #fff; }
.nav-link.is-active { color: #fff; }
.nav-link.is-active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 0;
  height: 3px; background: var(--cu-gold);
}
.caret { width: 9px; height: 9px; opacity: .65; }

.dropdown {
  position: absolute; top: 100%; left: 0; min-width: 214px;
  background: #1b1b1b; border: 1px solid #333; border-top: 3px solid var(--cu-gold);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .38);
  padding: 6px; opacity: 0; visibility: hidden;
  transition: opacity .14s ease, visibility .14s;
}
.nav > li:hover .dropdown, .nav > li:focus-within .dropdown { opacity: 1; visibility: visible; }
.dropdown a {
  display: block; padding: 8px 12px; font-size: 0.88rem;
  font-weight: 600; color: #dbd6c8; border-radius: 2px;
}
.dropdown a:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* 전체메뉴 — 미시간 KSAG 방식으로 모든 메뉴를 한 번에 */
.allmenu-toggle {
  display: flex; align-items: center; gap: 7px; flex-shrink: 0;
  padding: 7px 13px 7px 11px; margin-right: 4px;
  background: transparent; border: 1px solid rgba(255, 255, 255, .32);
  border-radius: var(--radius); color: #efece3;
  font-size: 0.85rem; font-weight: 700;
  transition: background-color .15s ease, border-color .15s ease;
}
.allmenu-toggle:hover { background: rgba(255, 255, 255, .13); }
.allmenu-toggle.is-open { background: var(--cu-gold); border-color: var(--cu-gold); color: #12130f; }

.allmenu {
  position: absolute; left: 0; right: 0; top: calc(100% + 3px); z-index: 99;
  background: #1b1b1b; border-top: 1px solid #333;
  border-bottom: 3px solid var(--cu-gold);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .38);
}
.allmenu[hidden] { display: none; }
.allmenu__grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px; padding-block: 20px 22px;
}
.allmenu__col h3 {
  font-size: 0.86rem; letter-spacing: 0.06em; color: var(--cu-gold);
  padding-bottom: 7px; margin-bottom: 8px; border-bottom: 1px solid #3a3a3a;
}
.allmenu__col h3 a:hover { text-decoration: underline; }
.allmenu__col li { margin-bottom: 1px; }
.allmenu__col h3 a { color: var(--cu-gold); }
.allmenu__col ul a {
  display: block; padding: 5px 8px; margin-left: -8px; border-radius: 2px;
  font-size: 0.87rem; color: #cdc8ba;
}
.allmenu__col ul a:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.brand--mini { display: none; }
.site-header.is-stuck { box-shadow: 0 2px 8px rgba(0, 0, 0, .22); }
.brand--mini .brand-name { font-size: 1.15rem; color: #fff; }
.brand--mini .brand-mark { width: 30px; height: 30px; }

.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: transparent; border: 1px solid rgba(255, 255, 255, .35);
  border-radius: var(--radius); color: #efece3;
  transition: background-color .15s ease;
}
.icon-btn:hover { background: rgba(255, 255, 255, .14); }
.nav-toggle { display: none; }

/* 모바일 서랍 */
.mobile-nav {
  display: none; position: fixed; inset: 0; z-index: 150;
  background: #fff; overflow-y: auto;
}
.mobile-nav.is-open { display: block; }
.mobile-nav__top {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--cu-gold); padding: 12px 20px; position: sticky; top: 0;
}
.mobile-nav__top .brand-name { font-size: 1.4rem; }
.mobile-nav__top .brand-mark { width: 34px; height: 34px; }
.mobile-nav__close {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: transparent; border: 1px solid rgba(0, 0, 0, .3);
  border-radius: var(--radius); color: #000; font-size: 1.2rem; line-height: 1;
}
.mobile-nav__body { padding: 6px 20px 50px; }
.mobile-nav details { border-bottom: 1px solid var(--line); }
.mobile-nav summary {
  padding: 13px 2px; font-weight: 700; font-size: 0.98rem;
  cursor: pointer; list-style: none; display: flex;
  justify-content: space-between; align-items: center;
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav summary::after { content: "+"; color: var(--cu-gold-ink); font-size: 1.2rem; }
.mobile-nav details[open] summary::after { content: "−"; }
.mobile-nav .sub { padding: 0 2px 10px; display: grid; gap: 1px; }
.mobile-nav .sub a { padding: 8px 10px; color: var(--ink-muted); font-size: 0.92rem; }
.mobile-nav .sub a:hover { background: var(--bg-head); }
.mobile-nav .flat { display: block; padding: 13px 2px; font-weight: 700; border-bottom: 1px solid var(--line); }
.mobile-cta { display: grid; gap: 8px; margin-top: 18px; }
.mobile-cta .btn { justify-content: center; width: 100%; }

/* 콘텐츠 로드 실패 경고 */
.data-error { background: #fdf3f3; border-bottom: 3px solid #b4262a; color: #7d1f22; }
.data-error .wrap { padding-block: 14px; display: grid; gap: 4px; }
.data-error strong { font-size: 0.95rem; }
.data-error span { font-size: 0.85rem; line-height: 1.5; color: #8d3a3c; }

/* --- 9. 하위 페이지 머리말 ----------------------------------------------- */
.page-hero {
  background: var(--bg-band); border-bottom: 1px solid var(--line);
  padding-block: 16px 20px;
}
.page-hero h1 { font-size: clamp(1.4rem, 1.15rem + 1.2vw, 1.9rem); margin-top: 6px; }
.page-hero p { color: var(--ink-muted); margin-top: 8px; max-width: 68ch; font-size: 0.93rem; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 7px; font-size: 0.78rem; color: var(--ink-faint); }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.page-hero p a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.page-hero p a:hover { color: var(--link-hover); }

/* --- 10. 홈 레이아웃 ----------------------------------------------------- */
.home-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 296px;
  gap: 22px; align-items: start; padding-block: 20px 30px;
}
.home-main { display: grid; gap: 22px; min-width: 0; }

.rail { display: grid; gap: 14px; position: sticky; top: calc(var(--nav-h) + 14px); }
.rail-box { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.rail-box > h2 {
  font-size: 0.88rem; padding: 7px 13px;
  background: var(--card-head); border-bottom: 1px solid rgba(0, 0, 0, .14);
  border-left: 4px solid #12130f;
}
.rail-box__body { padding: 4px 13px 9px; }

.rail-links li { border-bottom: 1px dotted var(--line); }
.rail-links li:last-child { border-bottom: 0; }
.rail-links a {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 5px 0; font-size: 0.86rem; font-weight: 600; color: var(--ink);
}
.rail-links a::after { content: "›"; color: var(--cu-gold-deep); font-weight: 700; }
.rail-links a:hover { color: var(--link); }
.rail-links a:hover span { text-decoration: underline; }

/* --- 11. 게시판 카드 ----------------------------------------------------- */
.board-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.board-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; min-width: 0;
  transition: border-color .15s ease;
}
.board-card:hover { border-color: var(--line-strong); }
.board-card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 14px; background: var(--card-head);
  border-bottom: 1px solid rgba(0, 0, 0, .14);
}
.board-card__head h3 { font-size: 0.98rem; display: flex; align-items: center; gap: 8px; }
.board-card__head h3::before {
  content: ""; width: 4px; height: 15px; background: #12130f; border-radius: 1px;
}
.board-card__more { font-size: 0.78rem; font-weight: 700; color: var(--ink-muted); }
.board-card__more:hover { color: var(--ink); text-decoration: underline; }

/* 벼룩시장 — 전체 폭 2단 */
.board-card--wide { grid-column: 1 / -1; }
.board-card--wide .board-card__head { background: var(--card-head-lead); border-bottom-color: rgba(0, 0, 0, .22); }
.board-card--wide .board-card__head h3::before { background: #12130f; }
.board-card--wide .board-card__more { color: #3b3208; }
.board-card--wide .post-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px;
}

.post-list { padding: 3px 5px 5px; }
.post-list a {
  display: flex; align-items: center; gap: 9px; padding: 3px 9px;
  border-radius: 2px; transition: background-color .13s ease;
}
.post-list a::before {
  content: ""; flex-shrink: 0; width: 3px; height: 3px;
  border-radius: 50%; background: var(--cu-gold-deep);
}
.post-list a:hover { background: var(--bg-head); }
.post-list a:hover .post-title { text-decoration: underline; }
.post-title {
  flex: 1; min-width: 0; font-size: 0.87rem; line-height: 1.5; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.post-date {
  font-size: 0.76rem; color: var(--ink-faint);
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.post-list li.is-pinned .post-title { font-weight: 700; }

/* 배지 — 선명한 단색 */
.tag {
  flex-shrink: 0; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.03em;
  padding: 1px 5px; border-radius: 2px; line-height: 1.4;
}
.tag--pin { background: var(--cu-black); color: var(--cu-gold); }
.tag--new { background: var(--cu-blue); color: #fff; }
.tag--hot { background: #b4262a; color: #fff; }

/* --- 12. 행사 ------------------------------------------------------------ */
.event-list { display: grid; }
.event {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 11px;
  padding: 7px 0; border-bottom: 1px dotted var(--line);
}
.event:last-child { border-bottom: 0; }
.event__date {
  text-align: center; border-radius: var(--radius); padding: 3px 0; height: fit-content;
  background: var(--cu-black); color: #fff;
}
.event__date .m {
  display: block; font-size: 0.6rem; font-weight: 800;
  letter-spacing: 0.07em; color: var(--cu-gold);
}
.event__date .d { display: block; font-size: 1.05rem; font-weight: 800; line-height: 1.15; }
.event__body h3 { font-size: 0.89rem; }
.event__body p { font-size: 0.8rem; color: var(--ink-muted); margin-top: 2px; }
.event__meta { grid-column: 2; font-size: 0.76rem; color: var(--ink-faint); margin-top: 3px; }

.event-list--wide .event { grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; }
.event-list--wide .event__meta { grid-column: auto; margin-top: 0; text-align: right; }

/* --- 13. 후원업체 -------------------------------------------------------- */
.sponsor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.sponsor-grid--strip { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.sponsor {
  display: flex; flex-direction: column; gap: 2px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  border-left: 3px solid var(--cu-gold);
  padding: 12px 14px; transition: border-color .15s ease, background-color .15s ease;
}
.sponsor:hover { background: var(--bg-head); border-left-color: var(--cu-gold-deep); }
.sponsor__logo { display: block; margin-bottom: 6px; }
.sponsor__logo img { max-height: 40px; width: auto; }
.sponsor__name { font-size: 0.93rem; font-weight: 700; color: var(--ink); }
.sponsor__cat  { font-size: 0.81rem; color: var(--ink-muted); }
.sponsor__meta {
  font-size: 0.76rem; color: var(--ink-faint); margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.rail .sponsor-grid { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.rail .sponsor { padding: 8px 10px; }
.rail .sponsor__name { font-size: 0.84rem; }
.rail .sponsor__cat { font-size: 0.75rem; }
.rail .sponsor__meta { display: none; }

/* --- 14. 가입 안내 띠 ---------------------------------------------------- */
.joinband { background: var(--bg-band); border-block: 1px solid var(--line); padding-block: 24px; }
.joinband .wrap {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 20px;
}
.joinband h2 { font-size: 1.2rem; }
.joinband p { color: var(--ink-muted); font-size: 0.9rem; margin-top: 5px; max-width: 62ch; }
.joinband-actions { display: flex; flex-wrap: wrap; gap: 9px; }

/* --- 15. 푸터 ------------------------------------------------------------ */
.site-footer { background: var(--bg-band); border-top: 4px solid var(--cu-gold); color: var(--ink-muted); }
.footer-main { padding-block: 26px 22px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 26px; }
.footer-brand .brand-name { font-size: 1.35rem; }
.footer-brand .brand-tag { color: var(--ink-muted); border-left-color: var(--line-strong); }
.footer-brand p { font-size: 0.83rem; margin-top: 10px; max-width: 42ch; }
.footer-col h4 {
  font-size: 0.73rem; letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--ink); margin-bottom: 10px;
  padding-bottom: 6px; border-bottom: 2px solid var(--cu-gold);
}
.footer-col li { margin-bottom: 4px; font-size: 0.84rem; line-height: 1.4; }
.footer-col a:hover { color: var(--link); text-decoration: underline; }
.social { display: flex; gap: 7px; margin-top: 14px; }
.social a {
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  color: var(--ink-muted); background: #fff;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}
.social a:hover { background: var(--cu-gold); border-color: var(--cu-gold-deep); color: #12130f; }

.footer-legal { background: var(--cu-black); color: #99958a; }
.footer-legal .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  padding-block: 13px; font-size: 0.77rem;
}

/* --- 16. 본문 · 사이드 --------------------------------------------------- */
.prose { max-width: 74ch; }
.prose h2 { font-size: 1.28rem; margin: 24px 0 9px; padding-bottom: 7px; border-bottom: 2px solid var(--cu-gold); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.02rem; margin: 17px 0 6px; }
.prose p { margin-bottom: 8px; color: var(--ink-muted); font-size: 0.94rem; }
.prose ul { list-style: none; padding-left: 0; margin-bottom: 14px; color: var(--ink-muted); }
.prose ul li { margin-bottom: 4px; padding-left: 14px; position: relative; font-size: 0.94rem; }
.prose ul li::before {
  content: ""; position: absolute; left: 0; top: 0.6em;
  width: 6px; height: 2px; background: var(--cu-gold-deep);
}
.prose strong { color: var(--ink); font-weight: 700; }
.prose a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--link-hover); }
.prose a.btn { color: inherit; text-decoration: none; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 296px; gap: 32px; align-items: start; }
.sidebar { position: sticky; top: calc(var(--nav-h) + 14px); display: grid; gap: 14px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px; }
.panel h3 {
  font-size: 0.94rem; margin-bottom: 10px;
  padding-bottom: 8px; border-bottom: 2px solid var(--cu-gold);
}
.panel li {
  font-size: 0.85rem; padding: 4px 0; color: var(--ink-muted);
  display: flex; justify-content: space-between; gap: 10px;
  border-bottom: 1px dotted var(--line);
}
.panel li:last-child { border-bottom: 0; }
.panel li > span:only-child { display: block; }
.panel li > span:first-child { flex-shrink: 0; white-space: nowrap; }
.panel li > a { text-align: right; word-break: break-all; }
.panel a { color: var(--ink); font-weight: 600; }
.panel a:hover { color: var(--link); text-decoration: underline; }

/* 임원진 */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.person { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 15px; text-align: center; }
.avatar {
  width: 112px; height: 112px; border-radius: 50%; margin: 0 auto 12px;
  display: grid; place-items: center; font-size: 2.2rem; font-weight: 800;
  background: var(--cu-gold); color: #12130f; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.person h3 { font-size: 1.02rem; }
.person .role { font-size: 0.82rem; color: var(--cu-gold-ink); font-weight: 700; margin-top: 3px; }
.person .dept { font-size: 0.78rem; color: var(--ink-faint); margin-top: 5px; }

/* --- 17. 게시판 페이지 --------------------------------------------------- */
.board-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  justify-content: space-between; margin-bottom: 14px;
}
.tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.tab {
  padding: 6px 14px; border-radius: var(--radius); font-size: 0.85rem; font-weight: 700;
  background: #fff; color: var(--ink-muted); border: 1px solid var(--line);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.tab:hover { border-color: var(--cu-gold-deep); color: var(--ink); }
.tab.is-active { background: var(--cu-black); color: var(--cu-gold); border-color: var(--cu-black); }

.search-box { position: relative; }
.search-box input {
  font: inherit; font-size: 0.87rem; padding: 7px 12px 7px 33px; width: 240px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: #fff; color: var(--ink);
}
.search-box svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); opacity: .5; }

.table-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.post-table { width: 100%; border-collapse: collapse; font-size: 0.89rem; }
.post-table thead th {
  background: var(--cu-black); text-align: left; padding: 9px 15px;
  font-size: 0.75rem; letter-spacing: 0.06em; color: var(--cu-gold); font-weight: 700;
}
.post-table td { padding: 9px 15px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.post-table tbody tr:last-child td { border-bottom: 0; }
.post-table tbody tr:hover { background: var(--bg-head); }
.post-table .post-cell { display: flex; align-items: center; gap: 8px; }
.post-table .post-cell .is-pinned-title { font-weight: 700; }
.post-table tbody a:hover span { text-decoration: underline; }
.post-table .c-cat { width: 118px; }
.post-table .c-date { width: 105px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.post-table .c-author { width: 116px; color: var(--ink-muted); }
.cat-chip {
  display: inline-block; font-size: 0.73rem; font-weight: 700; padding: 2px 9px;
  border-radius: 2px; background: var(--bg-head); color: var(--cu-gold-ink);
  border: 1px solid var(--line);
}
.empty-state { padding: 46px 20px; text-align: center; color: var(--ink-muted); font-size: 0.92rem; }

.pager { display: flex; justify-content: center; gap: 5px; margin-top: 20px; }
.pager button {
  min-width: 34px; height: 34px; padding: 0 11px; border-radius: var(--radius);
  border: 1px solid var(--line); background: #fff; color: var(--ink-muted);
  font-size: 0.85rem; font-weight: 600;
  transition: border-color .15s ease, color .15s ease;
}
.pager button:hover:not(:disabled) { border-color: var(--cu-gold-deep); color: var(--ink); }
.pager button.is-active { background: var(--cu-black); color: var(--cu-gold); border-color: var(--cu-black); }
.pager button:disabled { opacity: .4; cursor: not-allowed; }

/* --- 18. 정보 카드 · 링크 · 주제 ----------------------------------------- */
.topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.topic {
  display: block; border: 1px solid var(--line); border-left: 4px solid var(--cu-gold);
  border-radius: var(--radius); padding: 11px 16px; background: #fff;
  transition: border-color .15s ease, background-color .15s ease;
}
.topic:hover { background: var(--bg-head); border-left-color: var(--cu-gold-deep); }
.topic h3 { font-size: 0.95rem; }
.topic p { font-size: 0.84rem; color: var(--ink-muted); margin-top: 4px; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 14px; }
.info-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  border-top: 3px solid var(--cu-gold); padding: 15px 17px;
}
.info-card .step {
  display: block; font-size: 0.69rem; font-weight: 800; letter-spacing: 0.12em;
  color: var(--cu-gold-ink); margin-bottom: 4px;
}
.info-card h3 { font-size: 1rem; margin-bottom: 9px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.info-card p { font-size: 0.87rem; color: var(--ink-muted); }
.info-card ul { display: grid; gap: 3px; }
.info-card ul li {
  font-size: 0.85rem; color: var(--ink-muted);
  padding-left: 13px; position: relative; line-height: 1.5;
}
.info-card ul li::before {
  content: ""; position: absolute; left: 0; top: 0.6em;
  width: 6px; height: 2px; background: var(--cu-gold-deep);
}
.info-card a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }

.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 9px; }
.link-item {
  display: block; padding: 11px 14px; background: #fff;
  border: 1px solid var(--line); border-left: 3px solid var(--cu-gold);
  border-radius: var(--radius);
  transition: border-color .15s ease, background-color .15s ease;
}
.link-item:hover { background: var(--bg-head); border-left-color: var(--cu-gold-deep); }
.link-item h3 { font-size: 0.91rem; }
.link-item p { font-size: 0.79rem; color: var(--ink-muted); margin-top: 2px; }

/* FAQ */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 7px; }
.faq summary {
  padding: 12px 16px; font-weight: 700; font-size: 0.93rem; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--cu-gold-ink); font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq .answer { padding: 13px 16px; color: var(--ink-muted); font-size: 0.89rem; }
.faq .answer a { color: var(--link); text-decoration: underline; }

/* 폼 */
.form-grid { display: grid; gap: 12px; }
.field label { display: block; font-size: 0.83rem; font-weight: 700; margin-bottom: 4px; }
.field .req { color: #b4262a; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: 0.9rem; padding: 8px 11px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--cu-blue); box-shadow: 0 0 0 2px rgba(9, 111, 174, .15);
}
.field textarea { min-height: 120px; resize: vertical; }
.field .check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: 0.84rem; }
.field .check input { width: auto; margin-top: 3px; }

/* 임원진 사진 업로드 */
.photo-field { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.photo-field__preview {
  width: 48px; height: 48px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  border: 1px solid var(--line-strong); background: var(--bg-band);
}
.photo-field__preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-field input[type="file"] { width: auto; flex: 1; min-width: 160px; padding: 6px; font-size: 0.82rem; }
.form-note { font-size: 0.8rem; color: var(--ink-faint); }

/* --- 게시판 글쓰기 · 상세 · 댓글 ----------------------------------------- */
.write-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.thumb-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumb { position: relative; display: block; }
.thumb img {
  width: 92px; height: 92px; object-fit: cover;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.thumb-x {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px;
  border-radius: 50%; border: 1px solid var(--line-strong);
  background: #fff; color: var(--ink); font-size: 0.7rem; line-height: 1;
}
.thumb-x:hover { background: #b4262a; border-color: #b4262a; color: #fff; }

.post-body { font-size: 0.95rem; line-height: 1.7; color: var(--ink); }
.post-body a {
  color: var(--link); text-decoration: underline; text-underline-offset: 2px;
  word-break: break-all;
}
.post-body a:hover { color: var(--link-hover); }
.comment__body a { color: var(--link); text-decoration: underline; word-break: break-all; }
.post-images { display: grid; gap: 10px; margin-top: 16px; }
.post-images img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); }
.post-tools {
  display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px;
  padding-top: 14px; border-top: 1px solid var(--line);
}

.comment-list { display: grid; }
.comment { padding: 12px 2px; border-bottom: 1px dotted var(--line); }
.comment:last-child { border-bottom: 0; }
.comment__head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-size: 0.8rem; color: var(--ink-faint); margin-bottom: 5px;
}
.comment__head b { font-size: 0.87rem; color: var(--ink); }
.comment__tools { margin-left: auto; display: flex; gap: 9px; }
.comment__body { font-size: 0.9rem; line-height: 1.6; color: var(--ink); }
.linklike-d {
  background: none; border: 0; padding: 0; color: var(--ink-faint);
  font-size: 0.8rem; font-family: inherit; cursor: pointer;
}
.linklike-d:hover { color: var(--link); text-decoration: underline; }

.board-toolbar #board-write { margin-left: auto; }

/* 홈 오른쪽 로그인 박스 */
.rail-login > h2 { background: var(--cu-black); color: var(--cu-gold); border-left-color: var(--cu-gold); }
.rail-login__msg { font-size: 0.82rem; color: var(--ink-muted); margin: 8px 0 10px; line-height: 1.5; }
.rail-login__btn { width: 100%; margin-bottom: 6px; }
.rail-login__sub {
  font-size: 0.79rem; color: var(--ink-faint);
  margin-top: 8px; padding-top: 8px; border-top: 1px dotted var(--line); text-align: center;
}
.rail-login__sub a { color: var(--link); font-weight: 600; }
.rail-login__sub a:hover { text-decoration: underline; }

/* 로그인 박스 — umksag 배치 */
.loginbox { display: block; }
.loginbox__grid { display: grid; grid-template-columns: minmax(0, 1fr) 62px; gap: 5px; }
.loginbox__grid--signup { grid-template-columns: minmax(0, 1fr); }
.loginbox__fields { display: grid; gap: 5px; }
.loginbox input {
  width: 100%; font: inherit; font-size: 0.84rem; padding: 7px 9px;
  border: 1px solid var(--line-strong); border-radius: 2px; background: #fff; color: var(--ink);
}
.loginbox input:focus { outline: none; border-color: var(--cu-blue); box-shadow: 0 0 0 2px rgba(9,111,174,.15); }
.loginbox__submit {
  border: 1px solid var(--cu-gold-deep); border-radius: 2px;
  background: var(--cu-gold); color: #12130f; font-weight: 700; font-size: 0.85rem;
  transition: background-color .15s ease;
}
.loginbox__submit:hover { background: var(--cu-gold-deep); }
.loginbox__wide { width: 100%; margin-top: 6px; }
.loginbox__links {
  display: flex; justify-content: flex-end; gap: 12px;
  margin-top: 7px; font-size: 0.78rem;
}
.loginbox__or {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 0 8px; font-size: 0.74rem; color: var(--ink-faint);
}
.loginbox__or::before, .loginbox__or::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.loginbox__msg { font-size: 0.78rem; color: #b4262a; margin-top: 8px; line-height: 1.45; }

/* 게시판 카드 하단 글쓰기 */
/* 게시판 페이지 하단 — 페이지 번호는 가운데, 글쓰기는 오른쪽 (같은 줄) */
.board-bottom { position: relative; margin-top: 20px; min-height: 34px; }
.board-bottom .pager { margin-top: 0; }
.board-bottom__write {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
}

/* 연결 확인 페이지 */
.chk {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px;
  padding: 14px 16px; background: #fff; border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong); border-radius: var(--radius); margin-bottom: 8px;
}
.chk--ok   { border-left-color: #2e7d4f; }
.chk--no   { border-left-color: #b4262a; background: #fdf6f6; }
.chk--wait { border-left-color: var(--cu-gold); background: var(--bg-head); }
.chk__mark {
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 50%; font-weight: 800; font-size: 0.9rem; color: #fff;
}
.chk--ok   .chk__mark { background: #2e7d4f; }
.chk--no   .chk__mark { background: #b4262a; }
.chk--wait .chk__mark { background: var(--cu-gold-deep); }
.chk__body h3 { font-size: 0.96rem; }
.chk__body p { font-size: 0.86rem; color: var(--ink-muted); margin-top: 4px; word-break: break-word; }
.chk__how { color: var(--ink) !important; }
.chk__how code {
  display: inline-block; background: var(--bg-head); border: 1px solid var(--line);
  border-radius: 2px; padding: 2px 6px; font-size: 0.82rem; margin-top: 4px;
}
.chk__how a { color: var(--link); text-decoration: underline; }
.chk .btn { margin-top: 8px; }

/* 운영 화면 — 행사 · 후원업체 · 임원 편집 카드 */
.ed-card { margin-bottom: 12px; }
.ed-card h3 {
  font-size: 0.95rem; margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 2px solid var(--cu-gold);
}
.ed-card .form-grid { gap: 10px; }
.ed-card .field label { font-size: 0.78rem; }

/* --- 19. 반응형 ---------------------------------------------------------- */
@media (max-width: 1040px) {
  .allmenu__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-grid, .split { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .rail, .sidebar { position: static; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
}

@media (max-width: 900px) {
  .nav, .desktop-only, .masthead__en, .allmenu-toggle, .allmenu { display: none; }
  .nav-toggle { display: flex; }
  .site-header.is-stuck .brand--mini { display: flex; }
  .site-header .wrap { justify-content: space-between; }
  .board-grid, .topic-grid, .board-card--wide .post-list { grid-template-columns: minmax(0, 1fr); }
  .post-table .c-author, .post-table thead .c-author { display: none; }
  .bannerstrip { height: 72px; }
  body[data-page="index.html"] .bannerstrip { height: 104px; }
}

@media (max-width: 620px) {
  .wrap { padding-inline: 16px; }
  .section { padding-block: 26px; }
  .brand-tag { display: none; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 1.5rem; }
  .utilbar__org { display: none; }
  .utilbar .wrap { justify-content: flex-end; }
  .masthead .wrap { min-height: 60px; }
  .bannerstrip { height: 60px; }
  body[data-page="index.html"] .bannerstrip { height: 84px; }
  .search-box, .search-box input { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .post-table .c-cat { display: none; }
  .event-list--wide .event { grid-template-columns: 44px minmax(0, 1fr); }
  .event-list--wide .event__meta { grid-column: 2; text-align: left; margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .utilbar, .masthead, .bannerstrip, .site-header, .site-footer, .mobile-nav, .joinband { display: none; }
  body { font-size: 12pt; }
}
