/* 평화자료실 카드뉴스 이미지 뷰어 */
:root {
  --bg: #edf3fb;
  --ink: #172033;
  --muted: #647084;
  --blue: #1557b0;
  --blue-dark: #0d3671;
  --line: rgba(23, 32, 51, 0.12);
  --card: #ffffff;
  --shadow: 0 18px 50px rgba(13, 54, 113, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(21, 87, 176, 0.18), transparent 34rem),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 52%, #f7f8fb 100%);
  min-height: 100vh;
}

a { color: inherit; }
.container {
  width: min(100% - 32px, 980px);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.15;
}
.brand-main {
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}
.brand-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}
.join-link {
  text-decoration: none;
  background: var(--blue);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.92rem;
  box-shadow: 0 8px 20px rgba(21, 87, 176, 0.24);
}

.hero {
  text-align: center;
  padding: 48px 0 28px;
}
.eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  padding: 6px 12px;
  border: 1px solid rgba(21, 87, 176, 0.22);
  border-radius: 999px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 900;
  font-size: 0.85rem;
}
.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4.6rem);
  letter-spacing: -0.07em;
  line-height: 1.04;
}
.lead {
  margin: 18px auto 0;
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1rem, 2.7vw, 1.28rem);
  font-weight: 650;
  word-break: keep-all;
}

.viewer-section { padding: 12px 0 46px; }
.viewer {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: clamp(12px, 2.5vw, 24px);
}
.viewer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.counter {
  color: #fff;
  background: var(--blue-dark);
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.hint {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}
.stage {
  position: relative;
  display: grid;
  place-items: center;
  background: #111827;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  touch-action: pan-y;
}
.card-frame {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: translateX(24px) scale(0.985);
  transition: opacity 240ms ease, transform 240ms ease;
  pointer-events: none;
}
.card-frame.active {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}
.card-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #111827;
}
.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: clamp(42px, 8vw, 58px);
  height: clamp(42px, 8vw, 58px);
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(13, 27, 49, 0.46);
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 0.7;
  cursor: pointer;
  transition: background 160ms ease;
}
.nav-button:hover,
.nav-button:focus-visible {
  background: rgba(13, 27, 49, 0.76);
  outline: none;
}
.nav-prev { left: 12px; }
.nav-next { right: 12px; }
.indicators {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  padding: 18px 0 4px;
}
.dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(21, 87, 176, 0.25);
  cursor: pointer;
}
.dot.active {
  width: 34px;
  background: var(--blue);
}

.cta,
.share-section,
.detail-link-section {
  margin-bottom: 32px;
  padding: clamp(26px, 5vw, 42px);
  text-align: center;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 12px 34px rgba(23, 32, 51, 0.08);
}
.cta h2,
.share-section h2 {
  margin: 0;
  font-size: clamp(1.45rem, 4vw, 2.25rem);
  letter-spacing: -0.05em;
  word-break: keep-all;
}
.detail-label {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  word-break: keep-all;
}
.detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 18px;
  border-radius: 999px;
  background: #e7effa;
  color: var(--blue-dark);
  text-decoration: none;
  font-weight: 900;
}
.cta p,
.share-section p {
  margin: 12px auto 24px;
  max-width: 660px;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 650;
  word-break: keep-all;
}
.cta-buttons,
.share-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.share-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}
.button,
.share-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}
.button.primary {
  color: #fff;
  background: var(--blue);
}
.button.secondary {
  color: var(--blue-dark);
  background: #e7effa;
}
.share-button { color: #fff; }
.share-button.telegram { background: #229ed9; }
.share-button.native { background: #556b8e; }
.share-button.copy { background: #0d3671; }
.share-button.download-all { background: #7a3db8; }
.site-footer {
  padding: 28px 0 40px;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}
.site-footer p { margin: 4px 0; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 100;
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .container { width: min(100% - 20px, 980px); }
  .header-inner { min-height: 62px; }
  .brand-sub { display: none; }
  .join-link { padding: 9px 11px; font-size: 0.84rem; }
  .hero { padding-top: 34px; }
  .viewer { border-radius: 18px; }
  .stage { border-radius: 14px; }
  .nav-button { background: rgba(13, 27, 49, 0.34); }
  .nav-prev { left: 6px; }
  .nav-next { right: 6px; }
  .share-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
