/* ==========================================================================
   책나무 상인 독서학원 — 디자인 시스템
   톤: 차분한 딥그린 + 아이보리/베이지 "정돈된 교육기관 안내 데스크"
   ========================================================================== */

:root {
  /* 메인 그린 계열 */
  --green: #2E6B4F;
  --green-dark: #215640;
  --green-mid: #3A7D5D;
  --green-soft: #C6DCCE;
  --green-pale: #DFEDE4;
  --green-mist: #F0F6F2;

  /* 배경 계열 */
  --paper: #FCFBF8;
  --ivory: #F6F2E9;
  --beige: #EFE8DA;

  /* 텍스트 */
  --ink: #1F2A24;
  --body: #3C4842;
  --muted: #68756E;
  --line: #E3E8E3;

  /* 강조 */
  --amber: #B98A2F;
  --danger: #B34A3C;

  /* 형태 */
  --radius-lg: 14px;
  --radius: 10px;
  --radius-pill: 999px;
  --maxw: 1120px;
  --maxw-narrow: 860px;

  /* 그림자 */
  --shadow: 0 1px 2px rgba(33, 86, 64, .04), 0 8px 24px rgba(33, 86, 64, .07);
  --shadow-lg: 0 2px 4px rgba(33, 86, 64, .05), 0 18px 44px rgba(33, 86, 64, .12);

  /* 폰트 — 전체 SUIT 단일 서체(가변 굵기로 위계 표현) */
  --sans: 'SUIT Variable', SUIT, -apple-system, BlinkMacSystemFont,
    system-ui, 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
  --serif: 'SUIT Variable', SUIT, -apple-system, BlinkMacSystemFont,
    system-ui, 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.4;
  margin: 0 0 .6em;
  font-weight: 600;
  letter-spacing: -.01em;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 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;
}

/* ---------- 레이아웃 ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: var(--maxw-narrow); }

.section { padding: 72px 0; }
.section--ivory { background: var(--ivory); }
.section--beige { background: var(--beige); }
.section--mist { background: var(--green-mist); }
.section--white { background: #fff; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head .eyebrow {
  display: inline-block; font-family: var(--sans); font-size: .8rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--green-mid);
  margin-bottom: 12px;
}
.section-head h2 { margin-bottom: 12px; }
.section-head p { color: var(--muted); }

.lead { font-size: 1.05rem; color: var(--body); }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-pill);
  font-size: .95rem; font-weight: 700; font-family: var(--sans);
  border: 1px solid transparent; transition: .18s ease; white-space: nowrap;
  line-height: 1.2;
}
/* 버튼 아이콘은 고정 크기 — viewBox만 있는 SVG가 버튼 폭까지 확대되는 것을 차단 */
.btn > svg {
  width: 18px; height: 18px; min-width: 18px;
  flex: 0 0 auto; display: block;
}
.btn--sm > svg { width: 16px; height: 16px; min-width: 16px; }
.btn--primary { background: var(--green); color: #fff; box-shadow: var(--shadow); }
.btn--primary:hover { background: var(--green-dark); transform: translateY(-1px); }
.btn--outline { background: #fff; color: var(--green); border-color: var(--green-soft); }
.btn--outline:hover { border-color: var(--green); background: var(--green-mist); }
.btn--ghost { background: transparent; color: var(--green); border-color: transparent; }
.btn--ghost:hover { background: var(--green-mist); }
.btn--amber { background: var(--amber); color: #fff; }
.btn--amber:hover { filter: brightness(.94); }
.btn--sm { padding: 8px 16px; font-size: .85rem; }
.btn--lg { padding: 16px 30px; font-size: 1.02rem; }
.btn--block { width: 100%; }
.btn--danger { background: var(--danger); color: #fff; }

/* 상담 CTA 버튼 (네이버 예약 / 전화 상담) — 가로형 사각형, 고정 아이콘 */
.btn--cta { border-radius: 14px; text-align: center; font-size: 16px; }
.btn--cta > svg {
  width: 24px; height: 24px; min-width: 24px;
  flex: 0 0 auto;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row--center { justify-content: center; }

/* ---------- 배지/칩 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: var(--radius-pill);
  background: var(--green-pale); color: var(--green-dark);
  font-size: .78rem; font-weight: 700; line-height: 1.6;
}
.badge--amber { background: #F6EBD2; color: #8a6520; }
.badge--muted { background: #EFF1EF; color: var(--muted); }
.badge--solid { background: var(--green); color: #fff; }

.chip {
  display: inline-flex; align-items: center;
  padding: 8px 14px; border-radius: var(--radius-pill);
  background: #fff; border: 1px solid var(--green-soft);
  color: var(--green-dark); font-size: .85rem; font-weight: 600;
}

.tag {
  display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill);
  background: var(--green-mist); color: var(--green-mid); font-size: .75rem; font-weight: 600;
}

/* ---------- 헤더 / GNB ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60; background: rgba(252, 251, 248, .94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
  height: 72px; display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
/* 헤더 좌측 로고: 별도 배경 없이 헤더 배경과 동일하게(투명) 표시 */
.brand__logo {
  width: auto; height: auto; border-radius: 0;
  background: transparent; color: var(--green);
  display: grid; place-items: center; flex-shrink: 0; overflow: visible;
}
.brand__logo img { height: 40px; width: auto; object-fit: contain; }
.brand__logo svg { width: 30px; height: 30px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-family: var(--sans); font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; color: var(--ink); }
.brand__sub { font-size: .68rem; font-weight: 500; color: var(--muted); letter-spacing: .06em; }

/* 큰 섹션 제목도 같은 서체의 굵기로 위계 표현 */
.section-head h2, .hero h2, h2 { font-weight: 800; letter-spacing: -.02em; }
.section-head p, .lead { font-weight: 400; }

.gnb { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.gnb a {
  padding: 9px 13px; border-radius: var(--radius-pill); font-size: .92rem; font-weight: 600;
  color: var(--body); transition: .15s;
}
.gnb a:hover { background: var(--green-mist); color: var(--green-dark); }
.gnb a.is-active { color: var(--green-dark); background: var(--green-pale); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--body); display: grid; place-items: center; transition: .15s;
}
.icon-btn:hover { border-color: var(--green-soft); color: var(--green-dark); background: var(--green-mist); }
.icon-btn svg { width: 19px; height: 19px; }

.hamburger { display: none; }

/* ---------- 모바일 드로어 ---------- */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(31, 42, 36, .45); z-index: 90;
  opacity: 0; visibility: hidden; transition: .2s;
}
.drawer-mask.is-open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(86vw, 360px);
  background: var(--paper); z-index: 95; transform: translateX(100%);
  transition: transform .25s ease; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.drawer.is-open { transform: translateX(0); }
.drawer__top { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer__search { padding: 14px 18px; }
.drawer__search form { display: flex; gap: 8px; }
.drawer__search input {
  flex: 1; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: #fff; font: inherit; font-size: .9rem; color: var(--ink);
}
.drawer__nav { flex: 1; overflow-y: auto; padding: 6px 10px 20px; }
.drawer__nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 14px; border-radius: var(--radius); font-weight: 600; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.drawer__nav a:last-child { border-bottom: 0; }
.drawer__nav a.is-active { color: var(--green-dark); background: var(--green-mist); }
.drawer__nav a svg { width: 16px; height: 16px; color: var(--muted); }
.drawer__bottom { padding: 16px 18px 22px; border-top: 1px solid var(--line); display: grid; gap: 10px; }

/* ---------- 모바일 하단 고정 CTA (고정 바 전용 규격) ---------- */
.mobile-cta {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  /* 본문을 가리지 않도록 불투명 배경 */
  background: var(--paper); border-top: 1px solid var(--line);
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  gap: 10px; box-shadow: 0 -6px 18px rgba(33, 86, 64, .10);
}
/* 두 버튼을 한 줄에 동일 너비로, 높이는 48~52px 로 제한 */
.mobile-cta .btn {
  flex: 1 1 0; width: 50%; min-width: 0;
  height: 50px; padding: 0 12px;
  border-radius: 14px; font-size: 15px;
}
.mobile-cta .btn > svg { width: 20px; height: 20px; min-width: 20px; }
/* 전화 상담: 흰 배경 + 초록 테두리·아이콘·글자 */
.mobile-cta .btn--outline { border-color: var(--green); }

/* ---------- HERO ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 420px at 82% -10%, rgba(198, 220, 206, .55), transparent 62%),
    linear-gradient(180deg, var(--green-mist), var(--paper) 78%);
}
.hero__inner { padding: 84px 0 64px; max-width: 760px; }
.hero__badge { margin-bottom: 20px; }
/* 헤드카피: 아주 굵게 / 서브카피: 보통 굵기 — 같은 서체에서 굵기로만 위계 구분 */
.hero h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.32; margin-bottom: 18px; }
.hero__sub { font-size: 1.06rem; font-weight: 400; color: var(--body); max-width: 620px; margin-bottom: 14px; }
.hero__line { color: var(--muted); font-size: .95rem; font-weight: 400; margin-bottom: 30px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; }

.notice-ribbon {
  margin-top: 34px; display: inline-flex; align-items: center; gap: 12px; max-width: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 9px 10px 9px 18px; box-shadow: var(--shadow); color: var(--body); font-size: .9rem;
}
.notice-ribbon:hover { border-color: var(--green-soft); }
.notice-ribbon__label { flex-shrink: 0; font-weight: 700; color: var(--green); font-size: .8rem; }
.notice-ribbon__text {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.notice-ribbon__arrow {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--green);
  color: #fff; display: grid; place-items: center;
}
.notice-ribbon__arrow svg { width: 14px; height: 14px; }

/* ---------- 3단계 흐름 ---------- */
.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 34px; }
.flow__step {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 24px 22px; box-shadow: var(--shadow);
}
.flow__num {
  width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: .9rem; margin-bottom: 14px;
}
.flow__step h3 { font-size: 1.08rem; margin-bottom: 8px; }
.flow__step p { color: var(--muted); font-size: .92rem; margin: 0; }
.flow__arrow {
  position: absolute; right: -11px; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 22px; height: 22px; border-radius: 50%; background: var(--green-soft); color: var(--green-dark);
  display: grid; place-items: center;
}
.flow__arrow svg { width: 12px; height: 12px; }
.flow__step:last-child .flow__arrow { display: none; }

/* ---------- 카드 그리드 ---------- */
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.card__body { padding: 24px 22px; }
.card__title { font-family: var(--serif); font-size: 1.1rem; color: var(--ink); margin-bottom: 8px; }
.card__desc { color: var(--muted); font-size: .93rem; margin: 0; }

.feature-card { display: flex; flex-direction: column; height: 100%; }
.feature-card__icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--green-mist); color: var(--green);
  display: grid; place-items: center; margin-bottom: 16px;
}
.feature-card__icon svg { width: 26px; height: 26px; }
.feature-card .card__body { display: flex; flex-direction: column; flex: 1; }
.accordion { margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line); }
.accordion__toggle {
  background: none; border: 0; padding: 0; color: var(--green); font-weight: 700; font-size: .88rem;
  display: inline-flex; align-items: center; gap: 6px;
}
.accordion__toggle svg { width: 14px; height: 14px; transition: transform .2s; }
.accordion__panel { display: none; padding-top: 12px; color: var(--muted); font-size: .9rem; }
.accordion.is-open .accordion__panel { display: block; }
.accordion.is-open .accordion__toggle svg { transform: rotate(180deg); }

/* ---------- 프로그램 카드 ---------- */
.program-card { display: flex; flex-direction: column; height: 100%; transition: .18s; }
.program-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--green-soft); }
.program-card__thumb {
  aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--green-pale), var(--green-mist));
  display: grid; place-items: center; color: var(--green); overflow: hidden;
}
.program-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.program-card__thumb svg { width: 42px; height: 42px; }
.program-card .card__body { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.program-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; color: var(--green); font-weight: 700; font-size: .88rem; }
.program-card__empty { color: var(--muted); font-size: .92rem; }

/* ---------- 학년 탭 ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 28px; }
.tabs__btn {
  padding: 10px 20px; border-radius: var(--radius-pill); border: 1px solid var(--line);
  background: #fff; color: var(--body); font-weight: 600; font-size: .9rem; transition: .15s;
}
.tabs__btn:hover { border-color: var(--green-soft); color: var(--green-dark); }
.tabs__btn.is-active { background: var(--green); border-color: var(--green); color: #fff; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.grade-panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px; box-shadow: var(--shadow);
}
.grade-panel__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 20px; }
.grade-panel__col h4 { font-family: var(--sans); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--green-mid); margin-bottom: 10px; }
.grade-panel__col ul { display: grid; gap: 8px; }
.grade-panel__col li { position: relative; padding-left: 20px; font-size: .92rem; color: var(--body); }
.grade-panel__col li::before {
  content: ''; position: absolute; left: 4px; top: .62em; width: 7px; height: 7px;
  border-radius: 50%; background: var(--green-soft);
}

/* ---------- 소식 미니 카드 ---------- */
.news-col { display: flex; flex-direction: column; gap: 12px; }
.news-col__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.news-col__head h3 { font-size: 1.02rem; margin: 0; }
.news-col__more { font-size: .82rem; color: var(--green); font-weight: 700; }
.mini-item { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; transition: .15s; }
.mini-item:hover { border-color: var(--green-soft); background: var(--green-mist); }
.mini-item__thumb { width: 56px; height: 56px; border-radius: 10px; flex-shrink: 0; overflow: hidden; background: var(--green-pale); display: grid; place-items: center; color: var(--green); }
.mini-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.mini-item__thumb svg { width: 22px; height: 22px; }
.mini-item__body { min-width: 0; }
.mini-item__title { font-size: .9rem; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mini-item__date { font-size: .76rem; color: var(--muted); margin-top: 2px; }
.news-empty { font-size: .86rem; color: var(--muted); padding: 14px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; }

/* ---------- 신문·시사 ---------- */
.steps-flow { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 26px 0; }
.steps-flow .chip { font-size: .82rem; padding: 7px 13px; }
.steps-flow .chip__num { color: var(--green-mid); font-weight: 800; margin-right: 4px; }
.steps-flow__sep { display: grid; place-items: center; color: var(--green-soft); }
.steps-flow__sep svg { width: 14px; height: 14px; }

/* ---------- CTA 밴드 ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  color: #fff; border-radius: var(--radius-lg); padding: 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { color: rgba(255, 255, 255, .85); margin: 0; }
.cta-band .btn--outline { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .5); }
.cta-band .btn--outline:hover { background: rgba(255, 255, 255, .24); }

/* ---------- 상담 큰 사각형 카드 ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.contact-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 14px; padding: 46px 26px; border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: #fff; box-shadow: var(--shadow); transition: .18s; min-height: 210px;
}
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--green-soft); }
.contact-card__icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--green-mist); color: var(--green); }
.contact-card__icon svg { width: 30px; height: 30px; }
.contact-card__title { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); margin: 0; }
.contact-card__desc { color: var(--muted); font-size: .94rem; margin: 0; }
.contact-card__hint { font-size: .8rem; color: var(--amber); }
.contact-card--kakao .contact-card__icon { background: #FDF3D8; color: #8a6520; }

/* ---------- 오시는 길 ---------- */
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); display: flex; gap: 14px; }
.info-card__icon { width: 42px; height: 42px; border-radius: 12px; background: var(--green-mist); color: var(--green); display: grid; place-items: center; flex-shrink: 0; }
.info-card__icon svg { width: 20px; height: 20px; }
.info-card__label { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--green-mid); font-weight: 700; margin-bottom: 4px; }
.info-card__value { color: var(--ink); font-weight: 600; font-size: .98rem; }
.map-embed { margin-top: 22px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
.map-embed iframe { width: 100%; height: 400px; border: 0; display: block; }
.map-placeholder { padding: 48px 24px; text-align: center; color: var(--muted); }

/* ---------- 게시판 ---------- */
.breadcrumb { padding: 22px 0 0; font-size: .84rem; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb svg { width: 12px; height: 12px; }

.page-head { padding: 26px 0 34px; }
.page-head h1 { margin-bottom: 12px; }
.page-head p { color: var(--muted); max-width: 720px; }

.board-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.board-search { display: flex; gap: 8px; }
.board-search input {
  padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: #fff; font: inherit; font-size: .9rem; min-width: 200px; color: var(--ink);
}
.board-count { font-size: .86rem; color: var(--muted); }

.board-list { display: grid; gap: 12px; }
.board-item {
  display: flex; gap: 16px; padding: 18px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); transition: .15s; align-items: center;
}
.board-item:hover { border-color: var(--green-soft); box-shadow: var(--shadow); }
.board-item__thumb { width: 92px; height: 92px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--green-pale); display: grid; place-items: center; color: var(--green); }
.board-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.board-item__thumb svg { width: 28px; height: 28px; }
.board-item__body { min-width: 0; flex: 1; }
.board-item__title { font-family: var(--serif); font-size: 1.05rem; color: var(--ink); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.board-item__title.is-pinned::before { content: '고정'; font-family: var(--sans); font-size: .68rem; font-weight: 800; background: var(--green); color: #fff; padding: 2px 8px; border-radius: var(--radius-pill); }
.board-item__excerpt { font-size: .9rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: 8px; }
.board-item__meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); align-items: center; }
.board-item--private { opacity: .6; }

.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 30px; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px; padding: 0 10px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: .88rem; color: var(--body);
}
.pagination a:hover { border-color: var(--green-soft); color: var(--green-dark); }
.pagination .is-current { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }
.pagination .is-disabled { opacity: .4; pointer-events: none; }

/* ---------- 게시글 상세 ---------- */
.post { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow); }
.post__head { border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 26px; }
.post__title { font-size: 1.6rem; margin-bottom: 12px; }
.post__meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); align-items: center; }
.post__content { font-size: 1rem; color: var(--body); }
.post__content img { border-radius: var(--radius); margin: 18px 0; }
.post__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; }
.post__gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 26px; }
.post__gallery img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; }
.attachments { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.attachments h3 { font-size: .95rem; font-family: var(--sans); margin-bottom: 12px; }
.attachment {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 8px; font-size: .9rem;
}
.attachment:hover { border-color: var(--green-soft); background: var(--green-mist); }
.attachment svg { width: 18px; height: 18px; color: var(--green); flex-shrink: 0; }
.attachment__size { margin-left: auto; font-size: .78rem; color: var(--muted); }
.related { margin-top: 34px; }
.related h3 { font-size: 1rem; font-family: var(--sans); margin-bottom: 12px; }

/* ---------- 프로그램 상단 이동 바 ---------- */
.pnav { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 30px; }
.pnav a {
  padding: 9px 16px; border-radius: var(--radius-pill); border: 1px solid var(--line);
  background: #fff; font-size: .86rem; font-weight: 600; color: var(--body); transition: .15s;
}
.pnav a:hover { border-color: var(--green-soft); color: var(--green-dark); }
.pnav a.is-current { background: var(--green); border-color: var(--green); color: #fff; }

/* ---------- 도서 카드 ---------- */
.book-card { display: flex; flex-direction: column; height: 100%; }
.book-card__cover { aspect-ratio: 3 / 4; background: linear-gradient(135deg, var(--green-pale), var(--green-mist)); display: grid; place-items: center; color: var(--green); overflow: hidden; }
.book-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.book-card__cover svg { width: 40px; height: 40px; }
.book-card .card__body { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.book-card__meta { display: flex; gap: 8px; flex-wrap: wrap; }
.book-card__reason { font-size: .88rem; color: var(--muted); }

/* ---------- 푸터 ---------- */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .72); margin-top: 0; padding: 54px 0 30px; }
.site-footer a { color: rgba(255, 255, 255, .72); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 34px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
/* 어두운 푸터에서는 로고가 묻히지 않도록 밝은 원형 칩 위에 표시 */
.footer-brand .brand__logo {
  height: 40px; padding: 5px; border-radius: 50%; background: var(--ivory);
  display: grid; place-items: center;
}
.footer-brand .brand__logo img { height: 30px; width: auto; }
.footer-brand .brand__name { color: #fff; }
.footer-brand .brand__sub { color: rgba(255, 255, 255, .55); }
.footer-col h4 { font-family: var(--sans); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--green-soft); margin-bottom: 14px; }
.footer-col ul { display: grid; gap: 9px; font-size: .9rem; }
.footer-socials { display: flex; gap: 10px; margin-top: 16px; }
.footer-socials a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .1); display: grid; place-items: center; }
.footer-socials a:hover { background: var(--green-mid); }
.footer-socials svg { width: 18px; height: 18px; }
.footer-info { font-size: .88rem; display: grid; gap: 8px; }
.footer-info strong { color: rgba(255, 255, 255, .9); font-weight: 600; }
.footer-bottom {
  margin-top: 34px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: .8rem; color: rgba(255, 255, 255, .5);
}
.footer-bottom a { color: rgba(255, 255, 255, .5); }
.footer-bottom a:hover { color: #fff; }
.footer-links { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.footer-links a { color: rgba(255, 255, 255, .72); }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-links__sep { color: rgba(255, 255, 255, .3); }

/* 문서 갤러리 (운영등록증·교습비 안내 이미지) */
.doc-gallery { display: grid; grid-template-columns: 1fr; gap: 18px; max-width: 820px; margin: 0 auto; }
.doc-gallery__item {
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  background: #fff; box-shadow: var(--shadow);
}
.doc-gallery__item img { width: 100%; height: auto; display: block; }

/* 문서 섹션 (이미지 갤러리 / 첨부 문서) */
.doc-section { max-width: 820px; margin: 34px auto 0; }
.doc-section__title {
  display: flex; align-items: center; gap: 8px;
  font-size: 1.12rem; font-weight: 800; color: var(--ink);
  padding-bottom: 10px; margin-bottom: 18px; border-bottom: 2px solid var(--line);
}
.doc-section__title svg { color: var(--brand); }
.doc-section .empty-state { max-width: 820px; }

/* 첨부 문서 목록 */
.doc-files { display: grid; gap: 12px; }
.doc-file {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); text-decoration: none; color: inherit;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.doc-file:hover { border-color: var(--brand); transform: translateY(-2px); }
.doc-file__icon {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--brand-soft, rgba(46, 107, 79, .1)); color: var(--brand);
}
.doc-file__body { display: grid; gap: 3px; min-width: 0; flex: 1 1 auto; }
.doc-file__name {
  font-weight: 600; font-size: .98rem; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.doc-file__meta { font-size: .82rem; color: var(--muted); }
.doc-file__cta {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  font-size: .86rem; font-weight: 600; color: var(--brand);
}
@media (max-width: 640px) {
  .doc-file__cta span { display: none; }
  .doc-file__name { white-space: normal; }
}

/* ---------- 폼 ---------- */
.form-grid { display: grid; gap: 18px; }
.form-row { display: grid; gap: 6px; }
.form-row label { font-size: .86rem; font-weight: 600; color: var(--ink); }
.form-row .hint { font-size: .78rem; color: var(--muted); font-weight: 400; }
.input, .textarea, .select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; font: inherit; font-size: .94rem; color: var(--ink); transition: .15s;
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--green-mid); box-shadow: 0 0 0 3px var(--green-mist); }
.textarea { min-height: 140px; resize: vertical; line-height: 1.7; }
.form-2col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

/* ---------- 관리자 ---------- */
.admin-body { background: var(--ivory); }
.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.admin-side { background: var(--ink); color: rgba(255, 255, 255, .8); padding: 22px 14px; }
.admin-side__brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 20px; border-bottom: 1px solid rgba(255, 255, 255, .12); margin-bottom: 16px; }
.admin-side__brand .brand__logo { height: 38px; width: 38px; border-radius: 50%; background: var(--ivory); color: var(--green); }
.admin-side__brand .brand__logo svg { width: 20px; height: 20px; }
.admin-side__brand .brand__name { color: #fff; font-size: .96rem; }
.admin-side__brand .brand__sub { color: rgba(255, 255, 255, .5); }
.admin-nav { display: grid; gap: 3px; }
.admin-nav a { padding: 10px 12px; border-radius: var(--radius); font-size: .89rem; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.admin-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.admin-nav a.is-active { background: var(--green); color: #fff; font-weight: 700; }
.admin-nav svg { width: 17px; height: 17px; flex-shrink: 0; }
.admin-main { padding: 30px; max-width: 1100px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.admin-head h1 { font-size: 1.5rem; margin: 0; }
.admin-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow); margin-bottom: 22px; }
.admin-panel h2 { font-size: 1.1rem; font-family: var(--sans); margin-bottom: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }
.stat__num { font-family: var(--serif); font-size: 1.9rem; color: var(--green-dark); line-height: 1.1; }
.stat__label { font-size: .82rem; color: var(--muted); margin-top: 6px; }

.table { width: 100%; border-collapse: collapse; font-size: .89rem; }
.table th, .table td { padding: 12px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.table tr:hover td { background: var(--green-mist); }
.table__actions { display: flex; gap: 6px; justify-content: flex-end; }
.table-wrap { overflow-x: auto; }

.admin-login { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, var(--green-mist), var(--ivory)); padding: 24px; }
.admin-login__card { width: 100%; max-width: 400px; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 36px 30px; }
.admin-login__logo { width: 54px; height: 54px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; margin: 0 auto 18px; }
.admin-login__logo svg { width: 26px; height: 26px; }

.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.image-thumb { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1; background: var(--green-mist); }
.image-thumb img { width: 100%; height: 100%; object-fit: cover; }
.image-thumb__del { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(31, 42, 36, .78); color: #fff; border: 0; display: grid; place-items: center; }
.image-thumb__badge { position: absolute; left: 6px; bottom: 6px; font-size: .68rem; background: var(--green); color: #fff; padding: 2px 7px; border-radius: var(--radius-pill); }
.upload-progress { height: 6px; border-radius: 999px; background: var(--green-pale); overflow: hidden; margin-top: 8px; }
.upload-progress__bar { height: 100%; background: var(--green); width: 0; transition: width .2s; }

/* ---------- 토스트 ---------- */
.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: grid; gap: 10px; }
.toast {
  background: var(--ink); color: #fff; padding: 13px 18px; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); font-size: .9rem; max-width: 340px; animation: toastin .2s ease;
}
.toast--error { background: var(--danger); }
.toast--ok { background: var(--green); }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 유틸 ---------- */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.empty-state { text-align: center; padding: 60px 24px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius-lg); background: #fff; }
.empty-state svg { width: 42px; height: 42px; color: var(--green-soft); margin: 0 auto 14px; }

/* ---------- 반응형 ---------- */
@media (max-width: 1024px) {
  .gnb { display: none; }
  .hamburger { display: grid; }
  .header-actions .btn { display: none; }
  .mobile-cta { display: flex; }
  /* 고정 바 실제 높이(50 + 패딩16 + 안전영역)만큼 본문 여백 확보 — 본문 가림 방지 */
  body { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  /* 모바일에서는 CTA 아이콘을 20px로 고정 (PC 24px) */
  .btn--cta > svg { width: 20px; height: 20px; min-width: 20px; }
  .btn--cta.btn--lg { font-size: 15px; }
  .section { padding: 60px 0; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1000px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { padding: 16px; }
  .admin-nav { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); display: grid; }
  .flow { grid-template-columns: 1fr; }
  .flow__arrow { display: none !important; }
  .grade-panel__cols { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.35rem; }
  .section { padding: 48px 0; }
  .wrap { padding: 0 16px; }
  .hero__inner { padding: 56px 0 46px; }
  .grid--3, .grid--2, .grid--4 { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr !important; }
  .contact-cards { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .post { padding: 24px 20px; }
  .post__gallery { grid-template-columns: 1fr; }
  .grade-panel { padding: 22px; }
  .cta-band { padding: 28px 22px; }
  .form-2col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .board-item { flex-direction: column; align-items: stretch; }
  .board-item__thumb { width: 100%; height: 160px; }
  .map-embed iframe { height: 300px; }

  /* 프로그램 상단 이동 바 → 사각형 칸 2열 그리드 */
  .pnav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; justify-content: stretch; }
  .pnav a {
    border-radius: var(--radius); text-align: center; padding: 16px 10px;
    font-size: .88rem; font-weight: 700; display: grid; place-items: center; min-height: 62px;
    border: 1.5px solid var(--line);
  }
  .pnav a.is-current { border-color: var(--green-dark); }
}

@media (max-width: 640px) {
  .header-inner { height: 64px; }
  .brand__sub { display: none; }
  .btn-row .btn { flex: 1; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .table th, .table td { padding: 10px 8px; }
  .admin-main { padding: 18px 14px; }
}

/* 모션 최소화 */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
