:root {
  --blue: #2b90f5;
  --blue-deep: #1474dc;
  --blue-ink: #16324c;
  --sky: #e7f3ff;
  --sky-2: #f5fbff;
  --lime: #d7f56a;
  --lime-deep: #c3e84a;
  --yellow: #ffe56a;
  --ink: #1c2430;
  --muted: #5c6b7c;
  --line: rgba(22, 50, 76, 0.1);
  --card: #ffffff;
  --radius: 28px;
  --shadow: 0 16px 40px rgba(28, 104, 186, 0.12);
  --sans: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --wrap: min(1120px, calc(100% - 32px));
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@font-face {
  font-family: "Nest Spanish";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("https://cdn.jsdelivr.net/fontsource/fonts/inter:vf@5.2.8/latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

html[lang="ko"] {
  word-break: keep-all;
  overflow-wrap: break-word;
}

html[lang="es"],
html[lang="pt"] {
  --sans: "Nest Spanish", "Pretendard Variable", Pretendard, sans-serif;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #d7ecff 0%, var(--sky-2) 320px, #f7fbff 100%);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 450;
  line-height: 1.7;
  letter-spacing: -0.01em;
}

body.menu-open { overflow: hidden; }

img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }
p { margin: 0; }

::selection { background: #d7f56a; color: var(--ink); }

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

h1, h2, h3 { font-weight: 700; letter-spacing: -0.03em; margin: 0; line-height: 1.28; }
h1 { font-size: clamp(2.35rem, 5vw, 4.15rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.45rem); }
h3 { font-size: 1.2rem; }

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  background: var(--blue-ink);
  color: white;
  padding: 8px 12px;
  border-radius: 12px;
  z-index: 80;
}
.skip:focus { top: 12px; }

.wrap { width: var(--wrap); margin-inline: auto; }

.kicker {
  margin: 0 0 10px;
  color: var(--blue-deep);
  font-size: 0.86rem;
  font-weight: 700;
}

.lead { color: var(--muted); font-size: 1.05rem; max-width: 40rem; }

.site-header {
  position: sticky;
  top: 12px;
  z-index: 40;
  width: var(--wrap);
  height: 72px;
  margin: 12px auto 0;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(28, 104, 186, 0.08);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: 100%;
  padding: 0 14px 0 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  color: white;
  background: var(--blue);
  border-radius: 14px;
}
.brand-mark svg { width: 28px; height: 28px; }

.brand-name { display: block; font-weight: 700; font-size: 1.02rem; line-height: 1.2; letter-spacing: -0.03em; }
.brand-sub { display: block; color: var(--muted); font-size: 0.72rem; line-height: 1.2; }

.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a, .nav-panel a {
  text-decoration: none;
  color: var(--blue-ink);
  font-size: 0.94rem;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 999px;
}
.nav a:hover, .nav-panel a:hover { background: var(--sky); }
.nav a[aria-current="page"], .nav-panel a[aria-current="page"] {
  background: #e5f2ff;
  color: var(--blue-deep);
}

.langs {
  display: flex;
  padding: 4px;
  background: var(--sky);
  border-radius: 999px;
  flex: none;
}
.langs a {
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--blue-ink);
  line-height: 1;
}
.langs a[aria-current="true"] { background: var(--blue); color: white; }
.langs .short { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  background: white;
  color: var(--blue-ink);
}
.btn-primary { background: var(--blue); color: white; }
.btn-primary:hover { background: var(--blue-deep); }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: #ffd84a; }
.btn-white { background: white; color: var(--blue-ink); }
.btn-white:hover { background: #f4fbff; }
.btn-ghost { background: white; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--blue); }
.header-give { padding: 10px 16px; flex: none; }
.header-login {
  flex: none;
  border: 0;
  background: transparent;
  color: var(--blue-deep);
  font-weight: 700;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 999px;
}
.header-login:hover { background: var(--sky); }
.login-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: rgba(22, 50, 76, 0.42);
}
.login-sheet {
  width: min(400px, 100%);
  margin: 0;
  padding: 28px 24px 22px;
  background: white;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(22, 50, 76, 0.22);
}
.login-sheet h2 { margin: 0 0 8px; font-size: 1.7rem; line-height: 1.3; }
.login-hint { margin: 0 0 18px; color: var(--muted); font-size: 0.95rem; }
.login-sheet .field { margin-bottom: 16px; }
.login-sheet .row-actions { margin-top: 4px; }
.admin-card { padding: 22px; }
.news-editor { margin-bottom: 18px; }
.news-editor h2 { margin: 0 0 12px; font-size: 1.35rem; }
.password-fold { margin: 14px 0 18px; background: white; }
.story-manage { display: grid; gap: 8px; }
.story-manage .admin-actions, .article-body .admin-actions, .article-sheet + .admin-actions { justify-content: flex-start; }

.menu-btn, .backdrop, .nav-panel { display: none; }

.hero-block { padding: 18px 0 8px; }
.hero-sky {
  width: var(--wrap);
  margin-inline: auto;
  border-radius: 36px;
  padding: 64px 28px 28px;
  text-align: center;
  color: white;
  background-color: var(--blue);
  background-image:
    linear-gradient(180deg, rgba(12, 86, 186, 0.78) 0%, rgba(43, 144, 245, 0.55) 46%, rgba(20, 110, 210, 0.28) 100%),
    url("/photos/sky.jpg");
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}
.hero-sky .kicker { color: var(--lime); }
.hero-sky .lead { color: rgba(255, 255, 255, 0.94); margin: 16px auto 0; }
.hero-sky h1 .accent {
  display: inline-block;
  margin-top: 6px;
  background: var(--lime);
  color: var(--blue-ink);
  border-radius: 18px;
  padding: 0 0.28em 0.06em;
  box-decoration-break: clone;
}
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.hero-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 36px;
  text-align: left;
}
.hero-cards figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: white;
  color: var(--ink);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(16, 60, 110, 0.16);
}
.hero-cards img { width: 100%; height: 148px; object-fit: cover; }
.hero-cards figcaption { margin-top: auto; padding: 12px 14px 14px; font-weight: 700; font-size: 0.95rem; }

.section { padding: 72px 0; }
.section-head { display: grid; gap: 10px; margin-bottom: 26px; max-width: 38rem; }

.card-grid, .use-grid, .story-grid, .gallery-grid, .steps {
  display: grid;
  gap: 14px;
}
.card-grid, .use-grid, .steps { grid-template-columns: repeat(4, 1fr); }
.story-grid, .gallery-grid { grid-template-columns: repeat(3, 1fr); }

.info-card, .use-card, .step, .panel, .story-card, .gallery-grid figure, .person-panel, .give-panel, .page-hero-card, .article-sheet, .footer-card, .admin-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(28, 104, 186, 0.06);
}

.info-card, .use-card, .step, .panel { padding: 22px; }
.info-card p, .use-card p, .step p, .panel p { color: var(--muted); margin-top: 8px; }

.num {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--sky);
  color: var(--blue-deep);
  font-weight: 800;
  margin-bottom: 14px;
}
.info-card:nth-child(2) .num, .use-card:nth-child(2) { background: var(--lime); }
.info-card:nth-child(4) .num { background: var(--yellow); }
.use-card:nth-child(2) { background: var(--lime); }
.use-card:nth-child(3) { background: #e5f3ff; }
.use-card:nth-child(4) { background: #fff6c9; }
.use-card:nth-child(2) p,
.use-card:nth-child(3) p,
.use-card:nth-child(4) p { color: var(--blue-ink); }

.step .when { color: var(--blue-deep); font-weight: 700; font-size: 0.88rem; }
.step h3 { margin: 6px 0 0; }

.story-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  min-height: 100%;
}
.story-card img { width: 100%; height: 180px; object-fit: cover; }
.story-card div { padding: 16px 18px 18px; display: grid; gap: 8px; }
.story-card p { color: var(--muted); }
.story-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.86rem; }

.badge {
  display: inline-flex;
  align-items: center;
  background: var(--yellow);
  color: #6d5600;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 800;
}

.note {
  background: #fff8d4;
  color: var(--blue-ink);
  border-radius: 18px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.person-panel {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 8px;
  overflow: hidden;
  align-items: stretch;
}
.person-panel img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; }
.person-panel div { padding: 28px 28px 28px 18px; }
.person-copy { display: grid; gap: 8px; align-content: center; }

.give-panel {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 36px;
  color: white;
  background:
    linear-gradient(120deg, rgba(16, 104, 204, 0.88), rgba(43, 144, 245, 0.72)),
    url("/photos/sky.jpg") center/cover;
}
.give-panel .lead, .give-panel p { color: rgba(255, 255, 255, 0.94); }
.home-uses { margin-top: 14px; }

.gallery-grid figure { margin: 0; overflow: hidden; }
.gallery-grid img { width: 100%; height: 220px; object-fit: cover; }
.gallery-grid figcaption { padding: 12px 14px 16px; font-weight: 700; }

.page-hero { padding: 22px 0 0; }
.page-hero-card {
  padding: 42px 36px;
  color: white;
  background:
    linear-gradient(100deg, rgba(14, 92, 186, 0.82), rgba(43, 144, 245, 0.62)),
    url("/photos/sky.jpg") center/cover;
}
.page-hero-card .kicker { color: var(--lime); }
.page-hero-card .lead { color: rgba(255, 255, 255, 0.94); margin-top: 12px; }

.programs { grid-template-columns: repeat(3, 1fr); }
.who, .methods, .contact-grid, .receipts, .profile {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.profile { grid-template-columns: 300px 1fr; align-items: start; }
.profile-photo { margin: 0; background: white; border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 30px rgba(28, 104, 186, 0.06); }
.profile-photo img { width: 100%; height: 420px; object-fit: cover; }
.profile-photo figcaption { padding: 12px 14px 14px; color: var(--muted); font-size: 0.88rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 12px 0 0; list-style: none; }
.chips li { background: var(--sky); color: var(--blue-ink); border-radius: 999px; padding: 5px 10px; font-size: 0.88rem; font-weight: 650; }

.prayer-list { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.prayer-list li { padding-left: 16px; position: relative; color: var(--blue-ink); }
.prayer-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--lime-deep);
  position: absolute;
  left: 0;
  top: 0.65em;
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filters a {
  text-decoration: none;
  background: white;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.filters a[aria-current="true"] { background: var(--blue); color: white; box-shadow: none; }

.article-sheet { overflow: hidden; margin-top: 16px; }
.article-sheet img.cover { width: 100%; height: 320px; object-fit: cover; }
.article-body { padding: 28px 32px 36px; }
.prose { display: grid; gap: 14px; margin-top: 18px; }
.prose p { font-size: 1.05rem; line-height: 1.85; }

.receipt dl { margin: 12px 0 0; display: grid; gap: 8px; }
.receipt div { display: grid; grid-template-columns: 88px 1fr; gap: 8px; }
.receipt dt { color: var(--muted); }
.receipt dd { margin: 0; font-weight: 700; word-break: break-all; }

.faq { display: grid; gap: 8px; }
.faq-item { background: white; border-radius: 18px; overflow: hidden; }
.faq-item button {
  width: 100%;
  text-align: left;
  background: white;
  border: 0;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-weight: 700;
}
.faq-item .a { color: var(--muted); padding: 0 18px 16px; }

.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field span { font-size: 0.9rem; font-weight: 700; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }
input, textarea, select {
  width: 100%;
  border: 1.5px solid var(--line);
  background: #f8fbff;
  border-radius: 16px;
  padding: 12px 14px;
}
input[type="checkbox"] { width: auto; padding: 0; }
textarea { min-height: 140px; resize: vertical; }
.form-status { min-height: 1.4em; color: var(--blue-deep); font-size: 0.92rem; margin-top: 8px; }
.links { display: grid; gap: 8px; margin-top: 12px; }
.links a { color: var(--blue-deep); font-weight: 700; }

.site-footer { padding: 10px 0 28px; }
.footer-card { padding: 28px; display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 22px; align-items: start; }
.site-footer a { text-decoration: none; }
.site-footer nav { display: grid; gap: 6px; }
.foot-note { grid-column: 1 / -1; color: var(--muted); font-size: 0.88rem; padding-top: 8px; }
.manage-link { margin-left: 12px; color: var(--muted); font-size: 0.78rem; font-weight: 500; }

.admin-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr); gap: 16px; align-items: start; }
.admin-card h2 { margin: 0; font-size: 1.25rem; }
.admin-card .field { margin-bottom: 16px; }
.admin-card .field small { display: block; margin-top: 4px; color: var(--muted); font-size: 0.86rem; line-height: 1.5; }
#admin-post { scroll-margin-top: 110px; }
.admin-card .note { color: var(--muted); font-size: 0.86rem; }
.login-card { width: min(400px, 100%); }
.admin-list { display: grid; gap: 8px; margin: 14px 0; }
.admin-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; background: #f8fbff; border-radius: 18px; padding: 12px; }
.admin-item.is-editing { box-shadow: inset 0 0 0 2px var(--lime-deep); }
.admin-item h3 { margin: 0; font-size: 1rem; }
.admin-actions, .row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-item.is-confirming { grid-template-columns: 1fr; }
.admin-item.is-confirming .admin-actions { flex-direction: column; align-items: flex-start; }
.admin-item.is-confirming .note { margin: 0; }
.btn-text, .btn-quiet { background: transparent; box-shadow: none; padding: 8px 10px; }
.btn-text { color: var(--blue-deep); }
.btn-quiet { color: var(--muted); }
.check { display: flex; gap: 8px; align-items: center; font-weight: 700; margin: 4px 0 14px; }
.fold { background: #f8fbff; border-radius: 18px; padding: 12px 14px; margin: 8px 0 14px; }
.fold summary { cursor: pointer; font-weight: 700; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--blue-ink);
  color: white;
  padding: 10px 14px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%); }
.empty { color: var(--muted); padding: 20px 0; }
.back-link { font-weight: 700; color: var(--blue-deep); text-decoration: none; }

@media (max-width: 980px) {
  .nav, .header-give { display: none; }
  .menu-btn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border-radius: 14px;
    border: 0;
    background: var(--sky);
    cursor: pointer;
  }
  .menu-btn span, .menu-btn span::before, .menu-btn span::after {
    display: block;
    width: 16px;
    height: 2px;
    background: var(--blue-ink);
    position: relative;
  }
  .menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
  .menu-btn span::before { top: -6px; }
  .menu-btn span::after { top: 6px; }
  body.menu-open .menu-btn span { background: transparent; }
  body.menu-open .menu-btn span::before { top: 0; transform: rotate(45deg); }
  body.menu-open .menu-btn span::after { top: 0; transform: rotate(-45deg); }

  .backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(22, 50, 76, 0.28);
    border: 0;
    opacity: 0;
    pointer-events: none;
  }
  body.menu-open .backdrop { opacity: 1; pointer-events: auto; }
  .nav-panel {
    display: none;
    position: fixed;
    z-index: 45;
    top: 92px;
    left: 16px;
    right: 16px;
    background: white;
    border-radius: 24px;
    padding: 10px;
    box-shadow: var(--shadow);
  }
  body.menu-open .nav-panel { display: grid; }

  .hero-cards, .card-grid, .use-grid, .steps, .story-grid, .gallery-grid,
  .who, .methods, .contact-grid, .receipts, .profile, .person-panel, .footer-card, .admin-grid {
    grid-template-columns: 1fr;
  }
  .programs { grid-template-columns: 1fr; }
  .give-panel, .person-panel { display: grid; }
  .person-panel img, .profile-photo img { height: 240px; min-height: 0; }
  .footer-card { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .langs .full { display: none; }
  .langs .short { display: inline; }
  .brand-sub { display: none; }
  .hero-sky { padding: 42px 18px 18px; border-radius: 28px; }
  .hero-cards { grid-template-columns: 1fr 1fr; }
  .page-hero-card, .give-panel, .article-body { padding: 24px 18px; }
  .section { padding: 52px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
