/* ============================================================
   정승윤 부산교육감 선거 공약집 - 공통 스타일
   ============================================================ */

:root {
  --red: #E60012;
  --red-dark: #B8000E;
  --red-soft: #FFE8EA;
  --black: #111111;
  --gray-900: #1a1a1a;
  --gray-700: #444;
  --gray-500: #888;
  --gray-300: #ddd;
  --gray-100: #f5f5f5;
  --gray-50: #fafafa;
  --bg: #ffffff;

  --c-1: #E60012; /* 공약 1 — AI */
  --c-2: #1E5FB0; /* 공약 2 — 진로·경제 */
  --c-3: #F39200; /* 공약 3 — 인성 */
  --c-4: #E83E8C; /* 공약 4 — 학습 */
  --c-5: #2BAE66; /* 공약 5 — 교육공동체 */
  --c-6: #7A4FB7; /* 공약 6 — 체험 */

  --shadow-sm: 0 2px 6px rgba(0,0,0,.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,.10);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.15);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;

  --max-w: 1100px;
}

@font-face {
  font-family: 'Pretendard Variable';
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/woff2/PretendardVariable.woff2') format('woff2-variations');
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;             /* 페이지 전체 가로 스크롤 차단 */
}

body {
  margin: 0;
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  color: var(--black);
  background: var(--bg);
  font-size: 18px;              /* 어른 대상 — 기본 폰트 키움 */
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss02";
  word-break: keep-all;
  overflow-wrap: break-word;
  overflow-x: hidden;             /* 페이지 전체 가로 스크롤 차단 */
  max-width: 100vw;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; }

/* ============================================================
   Layout
   ============================================================ */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

section { padding: 64px 0; }

@media (max-width: 640px) {
  section { padding: 48px 0; }
}

/* ============================================================
   Header
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--gray-300);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  flex: 0 0 auto;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 19px;
  white-space: nowrap;        /* '정승윤 · 부산교육감' 줄바꿈 방지 */
}

.brand .brand-red { color: var(--red); }

.nav {
  flex: 1 1 auto;
  display: flex;
  gap: 20px;
  font-size: 16px;
  font-weight: 600;
  justify-content: flex-end;
}

.nav a {
  color: var(--gray-700);
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}

.nav a:hover { color: var(--red); border-bottom-color: var(--red); }

/* 태블릿 — 네비 폰트 약간 줄임 */
@media (max-width: 880px) {
  .nav { gap: 14px; font-size: 15px; }
}

/* 모바일 — 네비를 별도 줄로, 가로 스크롤 (페이지 전체 스크롤 X) */
@media (max-width: 720px) {
  .site-header .container {
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
    padding-bottom: 8px;
    max-width: 100%;
    overflow: hidden;        /* nav 외부로 항목 누출 차단 */
  }
  .brand {
    order: 1;
    font-size: 17px;
    min-width: 0;            /* flex 자식 폭 제한 풀기 */
  }
  .admin-slot {
    order: 2;
    margin-left: auto;
    flex: 0 0 auto;
  }
  .nav {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 8px;
    font-size: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-top: 1px solid var(--gray-300);
    padding-top: 10px;
    padding-bottom: 2px;
    margin: 0;               /* 음수 마진 제거 — 부모 침범 차단 */
    padding-left: 0;
    padding-right: 0;
    justify-content: flex-start;
    flex-wrap: nowrap;       /* 한 줄로 강제 (스크롤되도록) */
    /* 끝까지 스크롤됐을 때 마지막 칩 잘 보이도록 약간 여백 */
    scroll-padding: 0 8px;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a {
    flex: 0 0 auto;
    padding: 8px 14px;
    background: var(--gray-50);
    border-radius: 999px;
    font-weight: 700;
    border-bottom: none;       /* 모바일에선 하단 라인 제거 */
  }
  .nav a:hover,
  .nav a:active {
    background: var(--red-soft);
    border-bottom-color: transparent;
    color: var(--red-dark);
  }
  /* 마지막 항목 뒤 약간의 여백 */
  .nav::after {
    content: '';
    flex: 0 0 4px;
  }
}

@media (max-width: 380px) {
  .brand { font-size: 15px; }
  .nav { font-size: 13px; }
  .nav a { padding: 6px 9px; }
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  background: linear-gradient(180deg, #fff7f8 0%, #fff 100%);
  padding: 56px 0 40px;
  overflow: hidden;
}

@media (max-width: 720px) {
  .hero { padding: 36px 0 32px; }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 32px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  background: var(--red);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-title {
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 20px 0 18px;
  color: var(--red);
}

.hero-sub {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  color: var(--black);
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.hero-meta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-700);
}

.chip-red { background: var(--red); color: #fff; border-color: var(--red); }

/* 메달 뱃지 (히어로 영역) */
.hero-badge {
  display: block;
  width: clamp(96px, 12vw, 120px);
  height: auto;
  margin: 4px 0;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.12));
}

/* 이미지 정렬 클래스 (관리자가 편집 시 적용) */
[data-edit-img].img-align-left   { margin-left: 0;    margin-right: auto; }
[data-edit-img].img-align-center { margin-left: auto; margin-right: auto; }
[data-edit-img].img-align-right  { margin-left: auto; margin-right: 0;    }

/* ============================================================
   득표율 메달 카드 (이미지 대신 HTML)
   ============================================================ */

.award-card {
  position: relative;
  width: clamp(260px, 30vw, 320px);
  background: linear-gradient(145deg, #fff4d4 0%, #f7d878 38%, #e8b94c 68%, #c89530 100%);
  border-radius: 20px;
  padding: 16px 22px 20px;
  box-shadow:
    0 8px 22px rgba(176, 122, 24, 0.28),
    inset 0 0 0 2px rgba(255,255,255,0.45),
    inset 0 0 0 3px rgba(176, 122, 24, 0.25);
  margin: 8px 0 8px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.08));
}

/* 상단 텍스트 영역 (추진위) */
.award-card-ribbon-top {
  font-size: 12px;
  font-weight: 800;
  color: #6e4a0a;
  text-align: center;
  letter-spacing: -0.01em;
  line-height: 1.4;
  padding: 4px 4px 10px;
  border-bottom: 1px dashed rgba(110, 74, 10, 0.3);
  margin-bottom: 12px;
}

.award-card-body {
  text-align: center;
  position: relative;
}

.award-card-label {
  font-size: 18px;
  font-weight: 900;
  color: #2a1b00;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 6px;
}

.award-card-title {
  font-size: 23px;
  font-weight: 900;
  color: #2a1b00;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 8px;
}

.award-card-title strong {
  color: var(--red);
  font-weight: 900;
}

.award-card-names {
  font-size: 13px;
  font-weight: 700;
  color: #5a3e00;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  line-height: 1.4;
}

.award-card-divider {
  height: 2px;
  background: linear-gradient(to right, transparent 0%, rgba(110, 74, 10, 0.4) 20%, rgba(110, 74, 10, 0.4) 80%, transparent 100%);
  margin: 10px 0;
}

.award-card-result-label {
  font-size: 14px;
  font-weight: 800;
  color: #3a2400;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 6px;
}

.award-card-percent {
  font-size: 40px;
  font-weight: 900;
  color: var(--red);
  letter-spacing: -0.04em;
  line-height: 1;
}

.award-card-percent small {
  font-size: 26px;
  font-weight: 900;
  margin-left: 2px;
}

@media (max-width: 480px) {
  .award-card { width: clamp(240px, 70vw, 280px); padding: 14px 18px 16px; }
  .award-card-ribbon-top { font-size: 11px; }
  .award-card-label { font-size: 16px; }
  .award-card-title { font-size: 20px; }
  .award-card-names { font-size: 12px; }
  .award-card-result-label { font-size: 13px; }
  .award-card-percent { font-size: 34px; }
  .award-card-percent small { font-size: 22px; }
}

.hero-name {
  margin-top: 28px;
  font-size: clamp(56px, 13vw, 110px);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: .9;
  color: var(--red);
}

.hero-name small {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: 0;
  margin-bottom: 10px;
}

.hero-cta {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-img-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-img-wrap img {
  width: 100%;
  display: block;
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-img-wrap { order: -1; max-width: 380px; margin: 0 auto; }
}

@media (max-width: 480px) {
  .hero-img-wrap { max-width: 320px; }
  .hero-cta .btn { font-size: 15px; padding: 13px 20px; min-height: 48px; }
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 17px;
  border: 2px solid transparent;
  transition: transform .12s, background .15s, border-color .15s, color .15s, box-shadow .15s;
  text-decoration: none;
  min-height: 52px;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }

.btn-outline {
  background: #fff;
  color: var(--black);
  border-color: var(--black);
}

.btn-outline:hover { background: var(--black); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--gray-700);
  border-color: var(--gray-300);
}

.btn-ghost:hover { background: var(--gray-100); color: var(--black); }

/* ============================================================
   Section heading
   ============================================================ */

.section-head {
  text-align: center;
  margin-bottom: 40px;
}

.section-eyebrow {
  display: inline-block;
  color: var(--red);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(30px, 4.8vw, 46px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 10px 0 12px;
}

.section-lead {
  color: var(--gray-700);
  font-size: 18px;
  line-height: 1.7;
  max-width: 720px;
  margin: 0 auto;
}

/* ============================================================
   Vision band (p8 6 keywords)
   ============================================================ */

.vision {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-300);
  border-bottom: 1px solid var(--gray-300);
}

.vision-tag {
  background: var(--red);
  color: #fff;
  display: inline-block;
  padding: 8px 20px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 16px;
}

.vision-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 720px) {
  .vision-grid { grid-template-columns: repeat(2, 1fr); }
}

.vision-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 22px 20px;
  border: 1px solid var(--gray-300);
}

.vision-card .vk-keyword {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.vision-card h3 {
  font-size: 22px;
  font-weight: 800;
  margin: 6px 0 8px;
  letter-spacing: -0.02em;
}

.vision-card p {
  margin: 0;
  color: var(--gray-700);
  font-size: 17px;
  line-height: 1.65;
}

/* ============================================================
   Pledge grid (랜딩의 공약 6개 카드)
   ============================================================ */

.pledge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 880px) {
  .pledge-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .pledge-grid { grid-template-columns: 1fr; gap: 14px; }
}

.pledge-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 28px 24px 24px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  overflow: hidden;
  min-height: 240px;
}

.pledge-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: var(--card-color, var(--red));
}

.pledge-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--card-color, var(--red));
}

.pledge-card .pc-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--card-color, var(--red));
  color: #fff;
  font-weight: 900;
  font-size: 22px;
  margin-bottom: 16px;
}

.pledge-card h3 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--black);
}

.pledge-card .pc-sub {
  color: var(--gray-700);
  font-size: 17px;
  line-height: 1.65;
  flex: 1;
}

.pledge-card .pc-more {
  margin-top: 18px;
  font-size: 16px;
  font-weight: 700;
  color: var(--card-color, var(--red));
}

.pledge-card[data-color="1"] { --card-color: var(--c-1); }
.pledge-card[data-color="2"] { --card-color: var(--c-2); }
.pledge-card[data-color="3"] { --card-color: var(--c-3); }
.pledge-card[data-color="4"] { --card-color: var(--c-4); }
.pledge-card[data-color="5"] { --card-color: var(--c-5); }
.pledge-card[data-color="6"] { --card-color: var(--c-6); }

/* ============================================================
   About — 후보자 소개
   ============================================================ */

.about-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 24px;
}

@media (max-width: 720px) {
  .about-row { grid-template-columns: 1fr; }
}

.about-card {
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 28px;
}

.about-card .ac-num {
  display: inline-block;
  font-weight: 900;
  color: #fff;
  background: var(--red);
  padding: 5px 14px;
  border-radius: 8px;
  font-size: 15px;
  letter-spacing: 0.05em;
}

.about-card h4 {
  font-size: 26px;
  font-weight: 900;
  margin: 14px 0 16px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.about-card h4 em {
  font-style: normal;
  background: linear-gradient(180deg, transparent 60%, rgba(230,0,18,0.18) 60%);
  padding: 0 2px;
}

.about-card ul {
  margin: 0;
  padding-left: 22px;
  color: var(--gray-700);
  font-size: 17px;
  line-height: 1.75;
}

.about-card .quote {
  margin-top: 18px;
  padding: 14px 18px;
  background: var(--red-soft);
  border-radius: 12px;
  color: var(--red-dark);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.55;
}

/* ============================================================
   Disclosure (공개자료)
   ============================================================ */

.disclosure {
  background: var(--gray-50);
}

.disc-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

@media (max-width: 720px) {
  .disc-summary { grid-template-columns: repeat(2, 1fr); }
}

.disc-card {
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 18px 18px;
}

.disc-card .dc-label {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.disc-card .dc-value {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--black);
}

.disc-card .dc-note {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
}

.disc-img-wrap {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-300);
  padding: 12px;
  text-align: center;
}

.disc-img-wrap img {
  margin: 0 auto;
  max-height: 900px;
  object-fit: contain;
  border-radius: 8px;
}

/* 공개자료 — HTML 표 */
.disc-section {
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 18px;
}

@media (max-width: 600px) {
  .disc-section { padding: 22px 18px; }
}

.disc-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--black);
}

.disc-section h3::before {
  content: counter(disc-counter);
  counter-increment: disc-counter;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.disclosure-tables { counter-reset: disc-counter; }

.disc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}

.disc-table th, .disc-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-300);
  text-align: left;
  vertical-align: top;
}

.disc-table th {
  background: var(--gray-50);
  font-weight: 700;
  color: var(--gray-700);
  font-size: 13px;
  white-space: nowrap;
  width: 1%;
}

.disc-table tr:last-child th,
.disc-table tr:last-child td { border-bottom: none; }

.disc-table .num {
  font-feature-settings: "tnum";
  text-align: right;
  white-space: nowrap;
}

.disc-table .total {
  background: var(--red-soft);
  color: var(--red-dark);
  font-weight: 800;
}

.disc-table caption {
  text-align: left;
  font-size: 12px;
  color: var(--gray-500);
  padding-bottom: 8px;
  font-weight: 600;
}

/* 표 모바일 — 가로 스크롤 */
.disc-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px;
}

.disc-table-wrap .disc-table { min-width: 480px; }

/* 원본 PDF 토글 */
.disc-original {
  margin-top: 18px;
}

.disc-original summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-700);
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.disc-original summary::-webkit-details-marker { display: none; }
.disc-original summary::after { content: "▼"; font-size: 11px; color: var(--gray-500); transition: transform .15s; }
.disc-original[open] summary::after { transform: rotate(180deg); }
.disc-original summary:hover { border-color: var(--black); color: var(--black); }

.disc-original-body {
  margin-top: 12px;
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  padding: 12px;
}

.disc-original-body img { max-height: 900px; margin: 0 auto; }

.disc-original-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--gray-500);
  text-align: center;
}

.disc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  justify-content: center;
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  background: var(--black);
  color: #ccc;
  padding: 40px 0 32px;
  text-align: center;
  font-size: 15px;
  line-height: 1.7;
}

.site-footer strong { color: #fff; }

.site-footer .ft-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 12px 0;
}

.site-footer .ft-links a {
  color: #eee;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer .ft-note {
  color: #888;
  font-size: 12px;
  margin-top: 10px;
}

/* ============================================================
   Pledges page
   ============================================================ */

.pledge-page {
  background: var(--gray-50);
  min-height: 100vh;
}

.pledge-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 18px 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.pledge-tabs::-webkit-scrollbar { height: 4px; }
.pledge-tabs::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }

.pledge-tab {
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 17px;
  color: var(--gray-700);
  transition: all .15s;
  white-space: nowrap;
}

.pledge-tab:hover { color: var(--black); border-color: var(--black); }

.pledge-tab.is-active {
  background: var(--tab-color, var(--red));
  color: #fff;
  border-color: var(--tab-color, var(--red));
}

.pledge-tab[data-color="1"] { --tab-color: var(--c-1); }
.pledge-tab[data-color="2"] { --tab-color: var(--c-2); }
.pledge-tab[data-color="3"] { --tab-color: var(--c-3); }
.pledge-tab[data-color="4"] { --tab-color: var(--c-4); }
.pledge-tab[data-color="5"] { --tab-color: var(--c-5); }
.pledge-tab[data-color="6"] { --tab-color: var(--c-6); }

.pledge-detail {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.pd-head {
  padding: 36px 32px 28px;
  color: #fff;
  background: var(--pd-color, var(--red));
}

@media (max-width: 600px) {
  .pd-head { padding: 28px 22px 22px; }
}

.pd-num-pill {
  display: inline-block;
  background: rgba(255,255,255,.18);
  color: #fff;
  padding: 7px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.05em;
}

.pd-title {
  margin: 16px 0 12px;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.pd-sub {
  margin: 0;
  font-size: 19px;
  opacity: .95;
  line-height: 1.6;
}

.pd-body {
  padding: 28px 32px 32px;
}

@media (max-width: 600px) {
  .pd-body { padding: 22px 20px; }
}

.pd-policy {
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px dashed var(--gray-300);
}

.pd-policy:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.pd-policy h4 {
  margin: 0 0 12px;
  font-size: 21px;
  font-weight: 800;
  color: var(--pd-color, var(--red));
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.pd-policy h4::before {
  content: "✓";
  display: inline-block;
  margin-right: 8px;
  font-weight: 900;
}

.pd-policy ol {
  margin: 0;
  padding-left: 26px;
  color: var(--gray-700);
  font-size: 18px;
  line-height: 1.75;
}

.pd-policy ol li { margin-bottom: 8px; }

.pd-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.pd-nav .btn { flex: 1; max-width: 240px; }

.pd-detail-pages[data-color="1"] { --pd-color: var(--c-1); }
.pd-detail-pages[data-color="2"] { --pd-color: var(--c-2); }
.pd-detail-pages[data-color="3"] { --pd-color: var(--c-3); }
.pd-detail-pages[data-color="4"] { --pd-color: var(--c-4); }
.pd-detail-pages[data-color="5"] { --pd-color: var(--c-5); }
.pd-detail-pages[data-color="6"] { --pd-color: var(--c-6); }

/* 카드뉴스 슬라이드 */
.pd-cards {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 2px solid var(--gray-100);
}

.pd-cards h5 {
  font-size: 14px;
  font-weight: 800;
  color: var(--gray-500);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.pd-cards-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
}

.pd-cards-track::-webkit-scrollbar { height: 6px; }
.pd-cards-track::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }

.pd-cards-track img {
  flex: 0 0 86%;
  max-width: 480px;
  border-radius: var(--radius-md);
  scroll-snap-align: center;
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   Book page (flipbook)
   ============================================================ */

.book-page {
  background: linear-gradient(180deg, #2a2a2e 0%, #18181b 100%);
  min-height: 100vh;
  color: #eee;
  padding: 24px 12px 60px;
}

.book-bar {
  max-width: 1200px;
  margin: 0 auto 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #eee;
  font-size: 14px;
  font-weight: 600;
}

.book-bar a {
  color: #fff;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  transition: background .15s;
}

.book-bar a:hover { background: rgba(255,255,255,.22); }

.book-stage {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  /* 어르신 친화 — 화면을 가능한 많이 활용 */
  min-height: clamp(420px, calc(100vh - 140px), 1280px);
}

/* heyzine iframe 책자 — 데스크탑 전용 */
.book-iframe-wrap {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 16px auto 8px;
  height: calc(100vh - 130px);
  min-height: 480px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  background: #1a1a1a;
}

.book-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* 데스크탑/모바일 분리 */
.book-mobile-only { display: none; }
.book-desktop-only { display: block; }

@media (max-width: 720px) {
  .book-desktop-only { display: none !important; }
  .book-mobile-only { display: block; }
}

/* ============================================================
   모바일 책자 — 인스타 카루셀
   ============================================================ */

.mbook-stage {
  max-width: 100%;
  margin: 16px auto 0;
  padding: 0 8px;
}

.mbook-carousel {
  display: flex;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 0;
  border-radius: 14px;
  touch-action: pan-x;
}

.mbook-carousel::-webkit-scrollbar { display: none; }

.mbook-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-50);
  border-radius: 14px;
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  cursor: zoom-in;
}

.mbook-slide img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.mbook-page-num {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.mbook-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}

.mbook-arrow {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}

.mbook-arrow:hover { background: rgba(255,255,255,0.22); }
.mbook-arrow:disabled { opacity: 0.35; cursor: not-allowed; }

.mbook-counter {
  font-size: 14px;
  color: #ddd;
  font-weight: 700;
  min-width: 70px;
  text-align: center;
}

/* ============================================================
   모바일 라이트박스 (탭 시 확대)
   ============================================================ */

.mbook-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(15, 18, 25, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.mbook-lightbox.is-open { display: flex; }

.mbl-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 60px 20px;
}

.mbl-stage.is-zoomed {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  align-items: flex-start;
  justify-content: flex-start;
}

.mbl-stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  transform-origin: center;
  transition: transform .2s;
  user-select: none;
  -webkit-user-drag: none;
}

.mbl-stage.is-zoomed img {
  margin: auto;
}

.mbl-close,
.mbl-arrow {
  position: absolute;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.28);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, transform .12s;
  backdrop-filter: blur(6px);
  z-index: 5;
}

.mbl-close { top: 14px; right: 14px; width: 44px; height: 44px; font-size: 18px; font-weight: 700; }

.mbl-arrow {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 20px;
  font-weight: 900;
}

.mbl-prev { left: 8px; }
.mbl-next { right: 8px; }

.mbl-close:hover,
.mbl-arrow:hover { background: rgba(255,255,255,0.32); }
.mbl-arrow:active { transform: translateY(-50%) scale(0.92); }
.mbl-arrow:disabled { opacity: 0.3; cursor: not-allowed; }

.mbl-counter {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  color: #fff;
  padding: 7px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  z-index: 5;
  backdrop-filter: blur(6px);
}

/* 모바일 라이트박스 줌 컨트롤 */
.mbl-zoom-controls {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  padding: 4px;
  backdrop-filter: blur(8px);
  z-index: 5;
}

.mbl-zoom-btn {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mbl-zoom-btn:hover { background: rgba(255,255,255,0.3); }
.mbl-zoom-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.mbl-zoom-level {
  background: transparent;
  border: none;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  min-width: 52px;
  padding: 0 6px;
  cursor: pointer;
}

#flipbook {
  margin: 0 auto;
  box-shadow: 0 30px 70px rgba(0,0,0,.55);
}

#flipbook img,
.stf__item img,
.stf__block img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* StPageFlip 내부 캔버스·svg 텍스트 또렷도 향상 */
.stf__parent,
.stf__wrapper {
  -webkit-font-smoothing: subpixel-antialiased;
  text-rendering: geometricPrecision;
}

/* 책 페이지에 transform이 걸려도 흐려지지 않도록 GPU 가속 + 픽셀 정렬 */
.stf__item {
  transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* 로딩 인디케이터 */
.book-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  color: #ddd;
  z-index: 5;
  text-align: center;
  width: 90%;
  max-width: 320px;
  transition: opacity .4s;
}

.book-loader.is-done { opacity: 0; }

.bl-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255,255,255,0.18);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: bl-spin 0.9s linear infinite;
}

@keyframes bl-spin {
  to { transform: rotate(360deg); }
}

.bl-text {
  font-size: 14px;
  font-weight: 700;
  color: #eee;
  letter-spacing: 0.02em;
}

.bl-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  overflow: hidden;
}

.bl-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--red);
  border-radius: 999px;
  transition: width .2s ease;
}

.book-controls {
  max-width: 600px;
  margin: 24px auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.book-controls button {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  border-radius: 999px;
  width: 48px;
  height: 48px;
  font-size: 18px;
  transition: background .15s;
}

.book-controls button:hover { background: rgba(255,255,255,.24); }
.book-controls button:disabled { opacity: .35; cursor: not-allowed; }

/* 크게 보기 버튼 (확대) */
.book-zoom-btn {
  width: auto !important;
  padding: 0 18px;
  font-size: 14px !important;
  font-weight: 700;
  background: var(--red) !important;
  border-color: var(--red) !important;
  margin-left: 8px;
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.book-zoom-btn:hover { background: var(--red-dark) !important; border-color: var(--red-dark) !important; }

@media (max-width: 480px) {
  .book-zoom-btn { padding: 0 14px; font-size: 13px !important; }
}

/* ============================================================
   책자 페이지 확대 라이트박스
   ============================================================ */

.book-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(15, 18, 25, 0.78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 70px 20px 70px;
  animation: cl-fade-in .2s ease;
}

.book-lightbox.is-open { display: flex; }

/* 라이트박스 카루셀 — 손가락으로 좌우 슬라이드 */
.bl-carousel {
  display: flex;
  width: 100%;
  max-width: 96vw;
  height: 90vh;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x;
}

.bl-carousel::-webkit-scrollbar { display: none; }

/* 줌 모드 — 카루셀 스냅 해제 (슬라이드 안에서 패닝 우선) */
.bl-carousel.is-zoom-mode {
  scroll-snap-type: none;
  overflow: hidden;
  touch-action: none;
}

.bl-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  overflow: hidden;
}

.bl-slide img {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7);
  user-select: none;
  -webkit-user-drag: none;
  image-rendering: -webkit-optimize-contrast;
  transition: transform .2s cubic-bezier(.2,.8,.2,1);
}

/* 줌 적용 — 슬라이드가 스크롤 가능해지고 이미지가 커짐 */
.bl-slide.is-zoomed {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  align-items: flex-start;
  justify-content: flex-start;
  cursor: grab;
}

.bl-slide.is-zoomed:active { cursor: grabbing; }

.bl-slide.is-zoomed img {
  /* 줌 비율만큼 이미지 자체를 키움 → 슬라이드 안에서 자연 스크롤 */
  max-width: none;
  max-height: none;
  width: calc(var(--zoom-scale, 1) * 100%);
  height: auto;
  border-radius: 8px;
  margin: auto;       /* 작은 이미지는 가운데, 큰 이미지는 좌상단부터 */
}

/* 라이트박스 처음 열릴 때 부드러운 진입 */
.book-lightbox.is-open .bl-carousel {
  animation: cl-pop .25s cubic-bezier(.2, .8, .2, 1.2);
}

/* ===== 줌 컨트롤 (상단 중앙) ===== */
.bl-zoom-controls {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  padding: 5px;
  backdrop-filter: blur(8px);
  z-index: 2;
}

.bl-zoom-btn {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, opacity .15s;
  font-family: inherit;
}

.bl-zoom-btn:hover { background: rgba(255,255,255,0.3); }

.bl-zoom-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: rgba(255,255,255,0.08);
}

.bl-zoom-level {
  background: transparent;
  border: none;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  min-width: 60px;
  padding: 0 10px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.02em;
}

.bl-zoom-level:hover {
  color: #fff;
  text-shadow: 0 0 6px rgba(255,255,255,0.5);
}

@media (max-width: 600px) {
  .bl-zoom-controls {
    top: 12px;
    padding: 4px;
    gap: 4px;
  }
  .bl-zoom-btn { width: 36px; height: 36px; font-size: 18px; }
  .bl-zoom-level { font-size: 13px; min-width: 52px; padding: 0 6px; }
}

.bl-close,
.bl-arrow {
  position: absolute;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.28);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, transform .12s;
  backdrop-filter: blur(6px);
}

.bl-close { top: 18px; right: 18px; width: 52px; height: 52px; font-size: 20px; font-weight: 700; }

.bl-arrow {
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  font-size: 24px;
  font-weight: 900;
}

.bl-prev { left: 18px; }
.bl-next { right: 18px; }

.bl-close:hover,
.bl-arrow:hover { background: rgba(255,255,255,0.32); }
.bl-arrow:active { transform: translateY(-50%) scale(0.92); }

.bl-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: rgba(255,255,255,0.08);
}

.bl-counter {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  color: #fff;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(6px);
}

@media (max-width: 600px) {
  .book-lightbox { padding: 60px 8px; }
  .bl-arrow { width: 48px; height: 48px; font-size: 20px; }
  .bl-prev { left: 8px; }
  .bl-next { right: 8px; }
  .bl-close { top: 12px; right: 12px; width: 44px; height: 44px; }
  .bl-counter { bottom: 12px; font-size: 14px; padding: 7px 18px; }
}

.book-pageinfo {
  font-size: 14px;
  color: #ccc;
  min-width: 70px;
  text-align: center;
}

.book-hint {
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  color: #999;
}

/* ============================================================
   학력 · 주요 경력 박스
   ============================================================ */

.career-box {
  margin-top: 32px;
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: 16px;
  padding: 28px;
}

@media (max-width: 600px) {
  .career-box { padding: 22px 20px; }
}

.career-box h4 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.career-box p {
  margin: 0 0 10px;
  color: var(--gray-700);
  font-size: 17px;
  line-height: 1.75;
}

.career-box p:last-child { margin-bottom: 0; }
.career-box strong { color: var(--black); }

/* ============================================================
   위로 가기 (Back to Top)
   ============================================================ */

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  border: none;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 6px 20px rgba(230,0,18,0.35);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity .25s, transform .25s, visibility .25s, background .15s;
}

.back-to-top:hover { background: var(--red-dark); }
.back-to-top:active { transform: translateY(0) scale(0.95); }

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 600px) {
  .back-to-top {
    bottom: 18px;
    right: 18px;
    width: 50px;
    height: 50px;
    font-size: 22px;
  }
}

/* ============================================================
   카드뉴스 페이지 (cards.html)
   ============================================================ */

.cards-page {
  background: var(--gray-50);
  min-height: 100vh;
}

/* 큰 모드 토글 (정책 / 시리즈 / 신규) */
.cards-mode {
  display: flex;
  background: #fff;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--gray-300);
  max-width: 600px;
  margin: 0 auto 28px;
  box-shadow: var(--shadow-sm);
}

.cards-mode button {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 18px;
  font-weight: 800;
  font-size: 17px;
  color: var(--gray-700);
  border-radius: 999px;
  transition: all .15s;
  cursor: pointer;
}

.cards-mode button:hover { color: var(--black); }

.cards-mode button.is-active {
  background: var(--red);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* 하위 탭 (공약 1~6 / 시리즈 1~2) */
.cards-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.cards-tab {
  background: #fff;
  border: 2px solid var(--gray-300);
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 700;
  font-size: 16px;
  color: var(--gray-700);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.cards-tab:hover { color: var(--black); border-color: var(--black); }

.cards-tab.is-active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* 카드 스테이지 — 세로 스크롤 */
.cards-stage {
  margin: 0 auto;
  max-width: 760px;
}

.cards-stage-head {
  text-align: center;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px 20px 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

.cards-stage-head h3 {
  font-size: 24px;
  font-weight: 900;
  margin: 8px 0 6px;
  letter-spacing: -0.02em;
}

.cards-stage-head .cs-counter {
  font-size: 15px;
  color: var(--gray-500);
  font-weight: 700;
  margin-top: 4px;
}

/* 보기 방식 토글 (세로/가로) */
.view-toggle {
  display: inline-flex;
  margin-top: 14px;
  background: var(--gray-100);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}

.view-toggle-btn {
  background: transparent;
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  color: var(--gray-700);
  cursor: pointer;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.view-toggle-btn:hover { color: var(--black); }

.view-toggle-btn.is-active {
  background: var(--red);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.vt-icon { font-size: 16px; line-height: 1; }

/* 세로 카드 묶음 */
.cards-vertical {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* 그리드 카드 묶음 — 활동사진 스타일 */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 880px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

@media (max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr; }
}

.cards-grid .vcard {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 14px;
  cursor: zoom-in;
  margin: 0;
  background: var(--gray-100);
}

.cards-grid .vcard img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cards-grid .vcard-num {
  display: none; /* 그리드에선 번호 숨김 */
}

.cards-grid .vcard .recent-card-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 14px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  pointer-events: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 480px) {
  .cards-grid .vcard .recent-card-title { font-size: 14px; padding: 24px 12px 10px; }
}

/* 가로 카드 묶음 — 인스타 카루셀 스타일 (한 카드 = 한 화면) */
.cards-horizontal {
  display: flex;
  flex-direction: row;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-radius: 18px;
  background: transparent;
}

.cards-horizontal::-webkit-scrollbar { display: none; }

.cards-horizontal .vcard {
  flex: 0 0 100%;
  height: auto;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-50);
  border-radius: 18px;
  overflow: hidden;
  cursor: zoom-in;
  padding: 0;
  margin: 0;
  min-height: 60vh;
  position: relative;
}

.cards-horizontal .vcard img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  background: var(--gray-100);
}

.cards-horizontal .vcard-num {
  /* 가로 모드에서도 우상단에 페이지 번호 */
}

@media (max-width: 700px) {
  .cards-horizontal .vcard {
    min-height: 55vh;
    border-radius: 14px;
  }
  .cards-horizontal .vcard img { max-height: 75vh; }
}

/* 세로 모드에서도 카드 클릭 가능 표시 */
.cards-vertical .vcard {
  cursor: zoom-in;
}

/* 가로 모드 컨트롤 */
.cards-h-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.cards-h-arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  border: none;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  transition: background .15s, transform .12s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cards-h-arrow:hover { background: var(--red-dark); }
.cards-h-arrow:active { transform: scale(0.92); }

.cards-h-counter {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-700);
  min-width: 70px;
  text-align: center;
}

.vcard {
  position: relative;
  margin: 0;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform .2s;
}

.vcard:hover { transform: translateY(-2px); }

.vcard img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--gray-100);
}

.vcard-num {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  backdrop-filter: blur(4px);
}

/* 신규 카드 — 제목 오버레이 */
.vcard.recent-card { cursor: zoom-in; }

.vcard.recent-card .recent-card-title {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 32px 20px 18px;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.55) 60%, transparent 100%);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
  z-index: 1;
  pointer-events: none;
}

@media (max-width: 600px) {
  .cards-vertical { gap: 14px; }
  .vcard { border-radius: 14px; }
  .vcard-num { font-size: 12px; padding: 4px 10px; top: 10px; right: 10px; }
}

/* 하단 이전/다음 네비 */
.cards-bottom-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 32px;
}

.cards-bottom-nav .btn { white-space: nowrap; }
.cards-bottom-nav > [data-group] { justify-self: start; }
.cards-bottom-nav > [data-group]:last-child { justify-self: end; }

@media (max-width: 600px) {
  .cards-bottom-nav { grid-template-columns: 1fr 1fr; row-gap: 10px; }
  .cards-bottom-nav #cards-back-top { grid-column: 1 / -1; order: -1; }
}

.cards-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
  font-size: 17px;
  line-height: 1.7;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.cards-empty strong { color: var(--gray-700); display: block; font-size: 20px; margin-bottom: 8px; }

/* ============================================================
   카드 라이트박스 (확대 보기)
   ============================================================ */

.cards-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(15, 18, 25, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 70px 20px 70px;
  animation: cl-fade-in .2s ease;
}

@keyframes cl-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cards-lightbox.is-open { display: flex; }

.cl-stage {
  max-width: 95vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cl-stage img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  animation: cl-pop .25s cubic-bezier(.2, .8, .2, 1.2);
}

@keyframes cl-pop {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.cl-close,
.cl-arrow {
  position: absolute;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.28);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, transform .12s, opacity .15s;
  backdrop-filter: blur(6px);
}

.cl-close { top: 18px; right: 18px; width: 50px; height: 50px; font-size: 20px; font-weight: 700; }

.cl-arrow {
  top: 50%;
  transform: translateY(-50%);
  width: 58px;
  height: 58px;
  font-size: 22px;
  font-weight: 900;
}

.cl-prev { left: 18px; }
.cl-next { right: 18px; }

.cl-close:hover,
.cl-arrow:hover { background: rgba(255,255,255,0.32); }
.cl-arrow:active { transform: translateY(-50%) scale(0.92); }

.cl-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: rgba(255,255,255,0.08);
}
.cl-arrow:disabled:hover { background: rgba(255,255,255,0.08); }

.cl-counter {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  color: #fff;
  padding: 8px 20px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(6px);
}

@media (max-width: 600px) {
  .cards-lightbox { padding: 60px 12px; }
  .cl-arrow { width: 46px; height: 46px; font-size: 18px; }
  .cl-prev { left: 10px; }
  .cl-next { right: 10px; }
  .cl-close { top: 14px; right: 14px; width: 44px; height: 44px; }
  .cl-counter { bottom: 14px; font-size: 13px; padding: 6px 16px; }
}

/* ============================================================
   활동사진 갤러리 (activities.html)
   ============================================================ */

.activities-page { background: var(--gray-50); min-height: 100vh; }

.activities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 880px) {
  .activities-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

@media (max-width: 480px) {
  .activities-grid { grid-template-columns: 1fr; }
}

.activity-item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  border: none;
  padding: 0;
  background: var(--gray-100);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}

.activity-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.activity-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.activities-loading,
.activities-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--gray-500);
  font-size: 17px;
  line-height: 1.7;
}

.activities-empty strong {
  display: block;
  color: var(--gray-700);
  font-size: 22px;
  margin-bottom: 12px;
}

.activities-empty p { margin: 6px 0; }

.activities-empty code {
  background: var(--gray-100);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--red-dark);
}

/* ============================================================
   라이트박스
   ============================================================ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.lightbox.is-open { display: flex; }

.lightbox-stage {
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-stage img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-close,
.lightbox-arrow {
  position: absolute;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  transition: background .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  top: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  font-size: 20px;
  font-weight: 700;
}

.lightbox-arrow {
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  font-size: 22px;
  font-weight: 900;
}

.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }

.lightbox-close:hover,
.lightbox-arrow:hover { background: rgba(255,255,255,0.28); }

.lightbox-bottom {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  text-align: center;
  color: #eee;
  font-size: 15px;
  padding: 0 20px;
}

.lightbox-counter {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  padding: 5px 14px;
  border-radius: 999px;
  font-weight: 700;
  margin-bottom: 6px;
}

.lightbox-caption {
  font-size: 14px;
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .lightbox-arrow { width: 44px; height: 44px; font-size: 18px; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
  .lightbox-close { top: 12px; right: 12px; width: 44px; height: 44px; }
}

/* ============================================================
   관리자 로그인 UI (헤더 우측)
   ============================================================ */

.admin-slot {
  display: flex;
  align-items: center;
  margin-left: 14px;
}

@media (max-width: 720px) {
  .admin-slot { margin-left: 8px; }
}

.admin-login-btn {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .15s;
  white-space: nowrap;
}

.admin-login-btn:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.admin-login-icon { font-size: 12px; }

@media (max-width: 480px) {
  .admin-login-btn { padding: 7px 11px; font-size: 13px; }
  .admin-login-btn span:not(.admin-login-icon) { display: none; }
}

/* 사용자 메뉴 */
.admin-user {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  padding: 5px 14px 5px 5px;
  cursor: pointer;
  outline: none;
}

.admin-user:hover, .admin-user:focus-within { background: var(--gray-50); border-color: var(--red); }

.admin-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
}

.admin-avatar-letter { background: var(--red); }

.admin-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-700);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-caret { font-size: 10px; color: var(--gray-500); }

.admin-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  min-width: 260px;
  max-width: calc(100vw - 24px);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
  z-index: 60;
}

@media (max-width: 480px) {
  .admin-menu {
    /* 화면 우측 안으로 — 잘림 방지 */
    right: -4px;
    min-width: min(260px, calc(100vw - 24px));
  }
}

/* 글자 크기 컨트롤 */
.admin-font-control {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-300);
  margin-bottom: 6px;
}

.afc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.afc-hint {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 6px;
  letter-spacing: 0.02em;
}

.afc-note {
  font-size: 11px;
  color: var(--c-5);
  font-weight: 700;
  margin-top: 4px;
  opacity: 0;
  transition: opacity .3s;
}

/* ============================================================
   텍스트 편집 모드 (관리자) — data-edit 요소
   ============================================================ */

body.admin-edit-mode [data-edit],
body.admin-edit-mode [data-edit-img] {
  outline: 2px dashed transparent;
  outline-offset: 4px;
  cursor: pointer;
  transition: outline-color .15s, background-color .15s;
  position: relative;
}

body.admin-edit-mode [data-edit]:hover,
body.admin-edit-mode [data-edit-img]:hover {
  outline-color: var(--red);
  background-color: rgba(230, 0, 18, 0.06);
  border-radius: 6px;
}

body.admin-edit-mode [data-edit]:hover::after {
  content: "✏️ 클릭";
  position: absolute;
  top: -32px;
  left: 0;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  letter-spacing: 0.04em;
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
}

body.admin-edit-mode [data-edit-img] {
  outline-offset: 2px;
}

body.admin-edit-mode [data-edit-img]:hover {
  filter: brightness(1.05);
}

/* ===== 이미지 편집 모달 - 미리보기/정렬 ===== */
.iem-preview-wrap {
  margin-top: 14px;
  padding: 18px;
  background: var(--gray-50);
  border: 1px dashed var(--gray-300);
  border-radius: 10px;
  min-height: 140px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.iem-preview-wrap.align-left   { justify-content: flex-start; }
.iem-preview-wrap.align-center { justify-content: center; }
.iem-preview-wrap.align-right  { justify-content: flex-end; }

.iem-preview-wrap img {
  display: block;
  height: auto;
  max-width: 100%;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.12));
}

.iem-align-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.iem-align-opt {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-300);
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  color: var(--gray-700);
  cursor: pointer;
  transition: all .15s;
}

.iem-align-opt:hover { border-color: var(--red); color: var(--red); }

.iem-align-opt:has(input:checked) {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.iem-align-opt input { display: none; }

/* ===== 텍스트 편집 모달 - 슬라이더/미리보기 ===== */
.tem-size-slider {
  width: 100%;
  margin: 8px 0;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--gray-100);
  border-radius: 999px;
  outline: none;
}

.tem-size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(230,0,18,0.4);
  border: 2px solid #fff;
}

.tem-size-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red);
  cursor: pointer;
  border: 2px solid #fff;
}

.tem-size-preview {
  margin-top: 12px;
  padding: 20px 16px;
  background: var(--gray-50);
  border-radius: 10px;
  text-align: center;
  font-weight: 800;
  line-height: 1.3;
  word-break: keep-all;
  color: var(--black);
  border: 1px dashed var(--gray-300);
  max-height: 240px;
  overflow: auto;
}

/* 색상 / 형광펜 스워치 */
.tem-color-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 4px;
}

@media (max-width: 600px) {
  .tem-color-row { grid-template-columns: repeat(6, 1fr); }
}

.tem-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform .12s, border-color .15s;
  background-clip: padding-box;
}

.tem-swatch:hover { transform: scale(1.15); }

.tem-swatch.is-active {
  border-color: var(--black);
  border-width: 3px;
  box-shadow: 0 0 0 2px #fff inset;
}

.tem-swatch-none {
  background: #fff !important;
  border-style: dashed;
}

.tem-swatch-custom {
  background: linear-gradient(135deg, #ff6b6b, #ffd93d, #6bcf7f, #4d96ff, #c476f7) !important;
  border-color: var(--gray-700);
  color: #fff;
  font-weight: 900;
  font-size: 18px;
}

.tem-swatch-custom span {
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* 스타일 토글 (굵게/기울임/밑줄) */
.tem-style-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.tem-style-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-300);
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  transition: all .15s;
}

.tem-style-toggle input { display: none; }

.tem-style-toggle:has(input:checked) {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.tem-style-toggle:has(input:checked) span strong,
.tem-style-toggle:has(input:checked) span em,
.tem-style-toggle:has(input:checked) span u { color: #fff; }

.afc-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
  white-space: nowrap;
}

.afc-buttons {
  display: inline-flex;
  align-items: center;
  background: var(--gray-100);
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}

.afc-btn {
  width: 28px;
  height: 28px;
  background: #fff;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.afc-btn:hover { background: var(--red); color: #fff; border-color: var(--red); }

.afc-level {
  background: transparent;
  border: none;
  color: var(--gray-700);
  font-weight: 800;
  font-size: 12px;
  min-width: 44px;
  text-align: center;
  cursor: pointer;
  padding: 0 4px;
}

.afc-level:hover { color: var(--red); text-decoration: underline; }

.admin-user:hover .admin-menu,
.admin-user:focus-within .admin-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.admin-menu-email {
  padding: 10px 12px 8px;
  font-size: 12px;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-300);
  margin-bottom: 6px;
  word-break: break-all;
}

.admin-menu-link {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background .12s, color .12s;
}

.admin-menu-link:hover { background: var(--red-soft); color: var(--red-dark); }

@media (max-width: 480px) {
  .admin-name { display: none; }
  .admin-caret { display: none; }
  .admin-user { padding: 4px; }
}

/* ============================================================
   활동사진 — 관리자 모드 UI
   ============================================================ */

.activities-admin-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 2px dashed var(--red);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.admin-badge {
  background: var(--red);
  color: #fff;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.upload-btn {
  cursor: pointer;
  margin: 0;
}

.admin-tip {
  font-size: 13px;
  color: var(--gray-500);
  margin-left: auto;
}

@media (max-width: 600px) {
  .admin-tip { margin-left: 0; width: 100%; }
}

.activity-item { position: relative; }

.activity-item img { cursor: pointer; }

.activity-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s, background .15s, transform .12s;
  z-index: 2;
}

/* 관리자 액션 버튼 그룹 (수정/삭제/핀) */
.post-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity .15s;
  z-index: 3;
}

.activity-item:hover .post-actions,
.activity-item:focus-within .post-actions,
.vcard:hover .post-actions,
.vcard:focus-within .post-actions {
  opacity: 1;
}

@media (hover: none) {
  .post-actions { opacity: 1; }
}

.post-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, transform .12s;
  backdrop-filter: blur(4px);
}

.post-action-btn:hover { background: var(--red); transform: scale(1.08); }
.post-action-btn.pin-btn:hover { background: #d99a00; }
.post-action-btn.edit-btn:hover { background: var(--c-2); }

/* 핀 배지 (좌상단) */
.pin-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(135deg, #ffd45a 0%, #f5a623 100%);
  color: #5a3a00;
  font-size: 12px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  z-index: 2;
  pointer-events: none;
}

/* 다중 이미지 배지 (좌하단) */
.multi-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  z-index: 2;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

/* 수정 모달 — 이미지 관리 */
.edit-images-wrap {
  margin: 12px 0;
}

.edit-images-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--gray-700);
  margin-bottom: 10px;
}

.edit-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  padding: 10px;
  background: var(--gray-50);
  border: 1px dashed var(--gray-300);
  border-radius: 10px;
}

.edit-image-item {
  position: relative;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.edit-image-item.is-master {
  outline: 2px solid var(--red);
  outline-offset: -2px;
}

.edit-image-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: var(--gray-100);
}

.edit-image-num {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.edit-image-actions {
  display: flex;
  justify-content: space-between;
  padding: 6px;
  background: var(--gray-100);
  gap: 4px;
}

.edit-img-btn {
  flex: 1;
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 13px;
  padding: 4px;
  cursor: pointer;
  font-weight: 700;
  color: var(--gray-700);
  transition: all .12s;
}

.edit-img-btn:hover { background: var(--red); color: #fff; border-color: var(--red); }

.edit-img-remove:hover { background: var(--red); }

.edit-images-hint {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 8px;
  padding: 6px 10px;
  background: var(--gray-50);
  border-radius: 6px;
  line-height: 1.5;
}

.activity-item.is-pinned,
.vcard.is-pinned {
  outline: 2px solid #f5a623;
  outline-offset: -2px;
}

/* 카드 제목 오버레이 */
.activity-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 16px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  z-index: 1;
}

/* 라이트박스 — 글 표시 영역 */
.lb-title {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.lb-body {
  font-size: 15px;
  color: #ddd;
  line-height: 1.65;
  margin-bottom: 8px;
  white-space: normal;
  max-height: 200px;
  overflow-y: auto;
}

.lb-date {
  font-size: 13px;
  color: #999;
  font-weight: 600;
}

/* lightbox-caption은 기존 단순 텍스트에서 박스로 확장 */
.lightbox-caption {
  background: rgba(0,0,0,0.55);
  padding: 12px 18px;
  border-radius: 12px;
  max-width: 700px;
  margin: 0 auto;
  text-align: left;
  opacity: 1 !important;
}

/* ============================================================
   글쓰기 모달
   ============================================================ */

.post-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.post-modal.is-open { display: flex; }

.post-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(2px);
}

.post-modal-body {
  position: relative;
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

@media (max-width: 600px) {
  .post-modal-body { padding: 22px; border-radius: 14px; }
}

.post-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-700);
  border: none;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.post-modal-close:hover { background: var(--red); color: #fff; }

.post-modal-body h3 {
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 22px;
  letter-spacing: -0.02em;
}

.post-field {
  display: block;
  margin-bottom: 18px;
}

.post-label {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.post-label small {
  font-weight: 600;
  color: var(--gray-500);
  margin-left: 4px;
}

.post-field input[type="text"],
.post-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  color: var(--black);
  background: #fff;
  transition: border-color .15s;
  resize: vertical;
}

.post-field input[type="text"]:focus,
.post-field textarea:focus,
.post-field select.post-select:focus {
  outline: none;
  border-color: var(--red);
}

.post-field select.post-select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: var(--black);
  background: #fff;
  cursor: pointer;
  transition: border-color .15s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.post-field select.post-select:hover { border-color: var(--red); }

.post-field textarea { min-height: 120px; line-height: 1.6; }

/* 파일 드롭존 */
.post-file-drop {
  position: relative;
  border: 2px dashed var(--gray-300);
  border-radius: 12px;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  overflow: hidden;
}

.post-file-drop:hover,
.post-file-drop.is-dragover {
  border-color: var(--red);
  background: var(--red-soft);
}

.post-file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.post-file-placeholder {
  font-size: 14px;
  color: var(--gray-500);
  font-weight: 600;
  text-align: center;
  padding: 20px;
  pointer-events: none;
}

.post-file-preview {
  max-width: 100%;
  max-height: 280px;
  border-radius: 8px;
  pointer-events: none;
}

/* 다중 파일 선택 목록 */
.post-file-list {
  max-height: 280px;
  overflow-y: auto;
  width: 100%;
  padding: 8px;
  background: #fff;
  border-radius: 10px;
}

.post-file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-bottom: 1px solid var(--gray-100);
}

.post-file-item:last-child { border-bottom: none; }

.post-file-item img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--gray-100);
  flex: 0 0 auto;
}

.post-file-info {
  min-width: 0;
  flex: 1;
  text-align: left;
}

.post-file-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-file-size {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 600;
}

.post-file-summary {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--red-soft);
  color: var(--red-dark);
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  text-align: center;
}

/* 파일별 액션 버튼 (▲ ▼ ✕) */
.post-file-actions {
  display: flex;
  gap: 4px;
  flex: 0 0 auto;
}

.pfile-btn {
  width: 32px;
  height: 32px;
  background: #fff;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all .12s;
}

.pfile-btn:hover { background: var(--red); color: #fff; border-color: var(--red); }
.pfile-remove:hover { background: var(--red); color: #fff; }

/* 자동 정렬 토글 */
.post-auto-sort-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--gray-50);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
  cursor: pointer;
}

.post-auto-sort-row input { width: 16px; height: 16px; cursor: pointer; }

.post-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.post-modal-actions .btn { flex: 1; max-width: 200px; }

.activity-item:hover .activity-delete,
.activity-item:focus-within .activity-delete { opacity: 1; }

.activity-delete:hover { background: var(--red); transform: scale(1.1); }

@media (hover: none) {
  .activity-delete { opacity: 1; background: rgba(0,0,0,0.7); }
}

/* ============================================================
   토스트 알림
   ============================================================ */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--black);
  color: #fff;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, transform .25s, visibility .25s;
  z-index: 2000;
  max-width: calc(100vw - 40px);
  text-align: center;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.toast-success { background: var(--c-5); }
.toast-error   { background: var(--red); }

/* ============================================================
   Utility
   ============================================================ */

.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;
}
