/* ==========================================================================
   신월2회 장학회 · app.css
   ========================================================================== */

:root {
  --ink: #14252F;
  --navy: #12324B;
  --navy-deep: #0B2233;
  --navy-soft: #1E4763;
  --gold: #BE9448;
  --gold-soft: #E7D2A8;
  --paper: #FBF8F1;
  --paper-warm: #F5EFE3;
  --surface: #FFFFFF;
  --line: #E6DDCB;
  --line-soft: #F0E9DB;
  --muted: #6C7A82;
  --danger: #AC4438;
  --ok: #2F6B4F;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(18, 50, 75, .05), 0 6px 18px -12px rgba(18, 50, 75, .28);
  --shadow-md: 0 18px 48px -28px rgba(11, 34, 51, .45);
  --font-sans: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Helvetica Neue", sans-serif;
  --font-serif: "Nanum Myeongjo", "Noto Serif KR", "Apple SD Gothic Neo", Georgia, "Times New Roman", serif;
  --wrap: 1120px;
  --wrap-narrow: 940px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: -.01em;
  word-break: keep-all;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold); }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 700; line-height: 1.35; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(28px, 4vw, 40px); }
h2 { font-size: clamp(22px, 2.6vw, 30px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff;
  padding: 10px 16px; z-index: 200;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(251, 248, 241, .92);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 22px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand-mark { display: block; line-height: 0; filter: drop-shadow(0 4px 10px rgba(11,34,51,.18)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-serif); font-size: 18px; letter-spacing: -.02em; }
.brand-text small { font-size: 11px; color: var(--muted); letter-spacing: .18em; }

.nav { margin-left: auto; }
.nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px; border-radius: 999px;
  font-size: 14.5px; font-weight: 600; color: #33474F;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--paper-warm); color: var(--navy); }
.nav a.is-active { background: var(--navy); color: #fff; }
.nav a.is-active .nav-no { color: var(--gold-soft); }
.nav-no { font-size: 10px; color: var(--gold); font-weight: 700; letter-spacing: .04em; }
.nav-lock { font-size: 10px; opacity: .55; }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.user-name { font-weight: 700; color: var(--ink); }
.badge-admin {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px;
  background: var(--gold-soft); color: #6C4E14; font-size: 10.5px; font-weight: 700; vertical-align: 1px;
}
.link-quiet { color: var(--muted); font-size: 13px; border-bottom: 1px solid transparent; }
.link-quiet:hover { color: var(--navy); border-bottom-color: var(--line); }
.link-danger { background: none; border: 0; padding: 0; color: var(--danger); font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-danger.small { font-size: 12px; }

.menu-toggle {
  display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); cursor: pointer; padding: 10px 9px; flex-direction: column; justify-content: space-between;
}
.menu-toggle span { display: block; height: 2px; background: var(--navy); border-radius: 2px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 20px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14.5px; font-weight: 700; cursor: pointer; text-align: center;
  transition: transform .12s, background .15s, color .15s, border-color .15s, box-shadow .15s;
  line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 8px 22px -14px rgba(11,34,51,.8); }
.btn-primary:hover { background: var(--navy-soft); color: #fff; }
.btn-gold { background: var(--gold); color: #24190A; }
.btn-gold:hover { background: #CDA65C; color: #24190A; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--navy); }
.btn-ghost:hover { background: var(--paper-warm); color: var(--navy); border-color: #D8CCB4; }
.btn-outline-light { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.4); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,.16); color: #fff; }
.btn-danger { background: #F6E7E4; color: var(--danger); border-color: #EBD3CE; }
.btn-danger:hover { background: #F0D8D3; color: var(--danger); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { display: flex; width: 100%; }
.btn-install {
  background: var(--surface); border-color: var(--line); color: var(--navy);
  padding: 9px 14px; font-size: 13.5px;
}
.btn-install:hover { background: var(--paper-warm); }

/* ---------- flash ---------- */

.flash-area { max-width: var(--wrap); margin: 16px auto 0; padding: 0 24px; }
.flash {
  border-radius: var(--radius-sm); padding: 13px 18px; font-size: 14.5px; margin-bottom: 10px;
  border: 1px solid var(--line); background: var(--surface);
}
.flash-ok { border-color: #CFE3D6; background: #F1F8F3; color: #23543E; }
.flash-warn { border-color: #EBD6C4; background: #FDF4EA; color: #7A4A1C; }
.error-list { margin: 0; padding-left: 18px; }

/* ---------- layout ---------- */

main { min-height: 60vh; }
.section { max-width: var(--wrap); margin: 0 auto; padding: 60px 24px; }
.section-narrow { max-width: var(--wrap-narrow); }
.section-head { margin-bottom: 32px; max-width: 720px; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; max-width: none; }
.section-no {
  font-family: var(--font-serif); font-size: 12px; letter-spacing: .28em; color: var(--gold);
  margin: 0 0 8px; font-weight: 700;
}
.section-desc { color: var(--muted); margin: 0; font-size: 15.5px; }
.sub-head { font-size: 20px; margin: 48px 0 16px; }
.sub-head .count { color: var(--gold); font-size: 15px; font-family: var(--font-sans); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.empty-state { color: var(--muted); padding: 40px 0; text-align: center; }
.nowrap { white-space: nowrap; }

.grid { display: grid; gap: 20px; align-items: stretch; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- hero ---------- */

.hero {
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(190,148,72,.28), transparent 60%),
    radial-gradient(700px 500px at 0% 110%, rgba(30,71,99,.65), transparent 60%),
    linear-gradient(160deg, #0B2233 0%, #12324B 55%, #16405C 100%);
  color: #F4EFE4;
  overflow: hidden;
}
.hero-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 72px 24px 76px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
}
.kicker {
  font-size: 11.5px; letter-spacing: .3em; color: var(--gold-soft); font-weight: 700;
  margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 56px); line-height: 1.22; color: #fff; margin-bottom: 22px;
}
.hero h1 em { font-style: normal; color: var(--gold-soft); }
.hero-lead { font-size: 16.5px; color: rgba(244,239,228,.82); max-width: 30em; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 42px; }
.hero-stats { display: flex; gap: 34px; list-style: none; padding: 0; margin: 0; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-serif); font-size: 28px; color: var(--gold-soft); line-height: 1.1; }
.hero-stats span { font-size: 12.5px; color: rgba(244,239,228,.65); letter-spacing: .06em; }

.hero-visual { position: relative; }
.hero-photo {
  margin: 0; border-radius: 26px; overflow: hidden; position: relative;
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.7);
  border: 1px solid rgba(255,255,255,.16);
}
.hero-photo img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.hero-photo figcaption {
  position: absolute; left: 14px; bottom: 14px; right: 14px;
  display: flex; align-items: center; gap: 8px;
  background: rgba(9,25,36,.72); color: #F4EFE4; backdrop-filter: blur(6px);
  padding: 9px 14px; border-radius: 12px; font-size: 13px;
}
.hero-badge {
  position: absolute; right: -18px; top: -22px;
  background: var(--paper); color: var(--navy); border-radius: 16px;
  padding: 12px 16px; display: flex; gap: 10px; align-items: center;
  box-shadow: var(--shadow-md); font-size: 12.5px; font-weight: 700; line-height: 1.3;
}
.hero-badge small { font-weight: 500; color: var(--muted); }
.hero-badge-mark {
  font-family: var(--font-serif); font-size: 24px; color: var(--gold);
  border-right: 1px solid var(--line); padding-right: 10px; line-height: 1;
}

/* ---------- page hero ---------- */

.page-hero {
  background: linear-gradient(180deg, #0F2A3E 0%, #163D57 100%);
  color: #F4EFE4; padding: 44px 24px 48px;
}
.page-hero-compact { padding: 34px 24px 38px; }
.page-hero-inner { max-width: var(--wrap-narrow); margin: 0 auto; }
.page-hero h1 { color: #fff; margin-bottom: 10px; }
.page-lead { color: rgba(244,239,228,.78); font-size: 16px; margin: 0; max-width: 40em; }
.crumb { display: flex; gap: 8px; font-size: 12.5px; color: rgba(244,239,228,.55); margin-bottom: 22px; flex-wrap: wrap; }
.crumb a { color: rgba(244,239,228,.75); }
.crumb a:hover { color: var(--gold-soft); }

/* ---------- cards ---------- */

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card-feature { padding: 30px 26px; }
.feature-icon { font-size: 28px; display: block; margin-bottom: 14px; }
.card-symbol { background: var(--paper-warm); border-style: dashed; }
.card-principle { position: relative; padding-top: 30px; }
.principle-no {
  position: absolute; top: 18px; right: 22px; font-family: var(--font-serif);
  font-size: 30px; color: var(--line); line-height: 1;
}
.card-sub { color: var(--muted); font-size: 14.5px; margin: 0 0 10px; }

.chip-sample {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  background: #F6EEDF; color: #8A6420; border: 1px solid #EAD9BB;
  font-size: 11px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}

/* ---------- donations ---------- */

.card-donation { display: block; padding: 0; overflow: hidden; color: var(--ink); }
.card-donation:hover { color: var(--ink); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-donation { transition: transform .18s, box-shadow .18s; }
.card-media { position: relative; }
.card-media img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.card-media .chip-sample { position: absolute; left: 14px; top: 14px; background: rgba(251,248,241,.94); }
.card-body { padding: 22px 24px 24px; }
.card-date { font-size: 12.5px; color: var(--gold); letter-spacing: .04em; font-weight: 700; margin: 0 0 6px; }
.card-donation h3 { font-size: 20px; margin-bottom: 8px; }
.card-text { color: var(--muted); font-size: 14.5px; margin-bottom: 14px; }
.card-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.card-meta .amount { margin-left: auto; color: var(--navy); font-weight: 700; }

.donation-list { display: flex; flex-direction: column; gap: 18px; }
.donation-row {
  display: grid; grid-template-columns: 240px 1fr 30px; gap: 26px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; color: var(--ink); transition: box-shadow .18s, transform .18s;
}
.donation-row:hover { color: var(--ink); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.donation-thumb { align-self: stretch; display: flex; min-height: 150px; }
.donation-thumb img { object-fit: cover; border-radius: 12px; width: 100%; height: auto; min-height: 0; flex: 1 1 auto; }
.donation-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.donation-date { font-size: 12.5px; color: var(--gold); font-weight: 700; }
.donation-info h2 { font-size: 21px; margin-bottom: 6px; }
.donation-summary { color: var(--muted); font-size: 14.5px; margin-bottom: 10px; }
.donation-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.donation-meta .amount { color: var(--navy); font-weight: 700; }
.donation-arrow { font-size: 20px; color: var(--line); }
.donation-row:hover .donation-arrow { color: var(--gold); }

.donation-title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.meta-list { display: flex; gap: 28px; list-style: none; padding: 0; margin: 14px 0 0; flex-wrap: wrap; }
.meta-list li { display: flex; flex-direction: column; font-size: 13px; color: rgba(244,239,228,.6); }
.meta-list strong { color: #fff; font-size: 15px; font-weight: 700; }
.donation-lead { font-size: 18px; color: var(--navy); font-family: var(--font-serif); line-height: 1.6; margin-bottom: 28px; }
.donation-hero { margin: 0 0 32px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.donation-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.donation-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 44px; border-top: 1px solid var(--line); padding-top: 22px; gap: 12px; flex-wrap: wrap; }
.donation-nav-side { display: flex; gap: 18px; }

/* ---------- prose ---------- */

.prose { font-size: 16.5px; line-height: 1.85; color: #2A3B44; }
.prose p { margin-bottom: 1.15em; }
.prose h2 { font-size: 22px; margin: 1.6em 0 .6em; }
.prose h3 { font-size: 18px; margin: 1.4em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.6em 0; }
.prose > p:first-child {
  font-size: 17.5px; color: #22343E; line-height: 1.9;
}
.quote {
  margin: 2em 0; padding: 26px 30px; background: var(--paper-warm);
  border-left: 3px solid var(--gold); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-serif); font-size: 18px; line-height: 1.7; color: var(--navy);
}
.quote cite { display: block; margin-top: 10px; font-family: var(--font-sans); font-size: 13px; font-style: normal; color: var(--muted); }
.rich-content img { border-radius: var(--radius-sm); margin: 1.2em 0; }
.rich-content blockquote {
  margin: 1.6em 0; padding: 18px 22px; background: var(--paper-warm);
  border-left: 3px solid var(--gold); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-serif); color: var(--navy);
}
.rich-content blockquote p:last-child { margin-bottom: 0; }
.rich-content h2 { font-size: 22px; margin: 1.6em 0 .6em; }
.rich-content h3 { font-size: 18px; margin: 1.3em 0 .5em; }
.rich-content a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- facts / timeline ---------- */

.fact-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.fact-card .chip-sample { position: absolute; top: 20px; right: 20px; }
.fact-list { margin: 0; }
.fact-list div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px dashed var(--line-soft); }
.fact-list div:last-child { border-bottom: 0; }
.fact-list dt { color: var(--muted); font-size: 14px; font-weight: 700; }
.fact-list dd { margin: 0; font-size: 15.5px; }

.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { display: flex; gap: 22px; padding: 0 0 26px 24px; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 8px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--paper); border: 2px solid var(--gold);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline-year { font-family: var(--font-serif); font-weight: 700; color: var(--gold); min-width: 74px; font-size: 16px; }
.timeline-body strong { display: block; font-size: 16px; }
.timeline-body p { margin: 2px 0 0; color: var(--muted); font-size: 14.5px; }

.visit-card {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-sm);
}
.visit-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.visit-map {
  border-radius: var(--radius-sm); background:
    repeating-linear-gradient(45deg, #EFE9DC, #EFE9DC 10px, #F5F0E6 10px, #F5F0E6 20px);
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--muted); font-size: 13px; min-height: 180px; border: 1px solid var(--line-soft);
}

/* ---------- vision ---------- */

.section-vision { }
.vision-track { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: v; }
.vision-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative; box-shadow: var(--shadow-sm); }
.vision-step:nth-child(2) { background: var(--navy); color: #F4EFE4; border-color: var(--navy); }
.vision-step:nth-child(2) h3 { color: #fff; }
.vision-step:nth-child(2) p { color: rgba(244,239,228,.78); }
.vision-label { font-size: 12px; letter-spacing: .16em; color: var(--gold); font-weight: 700; display: block; margin-bottom: 12px; }
.vision-step:nth-child(2) .vision-label { color: var(--gold-soft); }

.people { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.person { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px; text-align: center; }
.avatar {
  display: inline-flex; width: 46px; height: 46px; border-radius: 50%; align-items: center; justify-content: center;
  background: var(--paper-warm); color: var(--navy); font-family: var(--font-serif); font-weight: 700; margin-bottom: 10px;
}
.avatar-sm { width: 26px; height: 26px; font-size: 12px; margin-bottom: 0; margin-right: 6px; }
.person strong { display: block; font-size: 15px; }
.person small { color: var(--muted); font-size: 12.5px; }

/* ---------- funding ---------- */

.account-card {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.account-main { padding: 34px; background: linear-gradient(160deg, #fff, #FCFAF5); }
.account-side { padding: 34px; background: var(--paper-warm); border-left: 1px solid var(--line); }
.account-bank { font-size: 13px; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.account-number {
  font-family: var(--font-serif); font-size: clamp(26px, 3.6vw, 38px); color: var(--navy);
  letter-spacing: .04em; margin: 8px 0 6px; word-break: break-all;
}
.account-holder { color: var(--muted); font-size: 14.5px; margin-bottom: 22px; }
.account-holder strong { color: var(--ink); }
.account-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.account-note { margin: 18px 0 0; font-size: 13.5px; color: var(--muted); }
.account-side h3 { font-size: 17px; }
.steps { padding-left: 20px; margin: 0 0 1em; }
.steps li { margin-bottom: 10px; }
.steps-sm { font-size: 14.5px; }
.account-side .chip-sample { margin-top: 6px; }

.flow { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; flex-wrap: wrap; }
.flow-step { flex: 1 1 200px; display: flex; gap: 12px; align-items: center; background: var(--paper-warm); border-radius: var(--radius-sm); padding: 16px 18px; }
.flow-step span { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.flow-step p { margin: 0; font-size: 14px; }
.flow-arrow { color: var(--gold); font-size: 18px; }
.card-affiliate { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.card-affiliate p { color: var(--muted); font-size: 14.5px; flex: 1; }

/* ---------- album ---------- */

.album-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.strip-item img { aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); transition: transform .2s, filter .2s; }
.strip-item:hover img { transform: scale(1.02); filter: brightness(1.05); }

.album-block { margin-bottom: 52px; }
.album-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.album-head h2 { font-size: 22px; margin-bottom: 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.album-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.album-item {
  position: relative; padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: var(--radius-sm); overflow: hidden; line-height: 0;
}
.album-item img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform .25s; }
.album-item:hover img { transform: scale(1.03); }
.album-zoom {
  position: absolute; right: 10px; bottom: 10px; background: rgba(9,25,36,.6); color: #fff;
  border-radius: 8px; padding: 3px 8px; font-size: 13px; line-height: 1.4; opacity: 0; transition: opacity .2s;
}
.album-item:hover .album-zoom { opacity: 1; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery-item { border-radius: var(--radius-sm); overflow: hidden; }
.gallery-item img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

.lightbox {
  position: fixed; inset: 0; z-index: 120; background: rgba(6, 18, 27, .94);
  display: flex; align-items: center; justify-content: center; padding: 40px 60px;
}
.lightbox[hidden] { display: none; }
.lightbox-figure { margin: 0; text-align: center; max-width: 100%; }
.lightbox-figure img { max-height: 78vh; width: auto; max-width: 100%; border-radius: 10px; margin: 0 auto; }
.lightbox-figure figcaption { color: rgba(255,255,255,.8); font-size: 13.5px; margin-top: 14px; }
.lightbox-close {
  position: absolute; top: 18px; right: 20px; background: rgba(255,255,255,.1); color: #fff;
  border: 0; width: 42px; height: 42px; border-radius: 50%; font-size: 18px; cursor: pointer;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.1); color: #fff;
  border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 26px; cursor: pointer; line-height: 1;
}
.lightbox-nav.prev { left: 16px; }
.lightbox-nav.next { right: 16px; }
.lightbox-nav:hover, .lightbox-close:hover { background: rgba(255,255,255,.22); }

/* ---------- join / install banner ---------- */

.section-join { padding-top: 20px; }
.join-card {
  display: grid; grid-template-columns: 1.25fr .75fr; gap: 0;
  border-radius: 26px; overflow: hidden; border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.join-copy { padding: 44px; }
.join-copy h2 { font-size: clamp(22px, 2.8vw, 30px); }
.join-steps { list-style: none; padding: 0; margin: 24px 0; }
.join-steps li { display: flex; align-items: center; gap: 12px; padding: 9px 0; font-size: 15px; }
.join-steps span { width: 24px; height: 24px; border-radius: 50%; background: var(--paper-warm); color: var(--gold); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px; flex-shrink: 0; }
.join-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.join-board {
  background: var(--navy); color: #F4EFE4; padding: 40px 34px; display: flex; flex-direction: column; justify-content: center; text-align: center;
}
.join-board h3 { color: #fff; margin-bottom: 10px; }
.join-board p { color: rgba(244,239,228,.75); font-size: 14.5px; }
.join-board .link-quiet { color: rgba(244,239,228,.7); }
.lock-icon { font-size: 26px; margin-bottom: 14px; }

.install-banner {
  max-width: var(--wrap); margin: 0 auto 80px; padding: 30px 34px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: linear-gradient(120deg, #0E2A3E, #1B4664); color: #F4EFE4; border-radius: 24px;
}
.install-banner h3 { color: #fff; margin-bottom: 4px; font-size: 20px; }
.install-banner p { margin: 0; color: rgba(244,239,228,.72); font-size: 14.5px; }

/* ---------- auth ---------- */

.auth-page {
  max-width: 960px; margin: 0 auto; padding: 64px 24px 80px;
  display: grid; grid-template-columns: 1fr .8fr; gap: 34px; align-items: start;
}
.auth-page-wide { max-width: 1020px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow-sm); }
.auth-head { margin-bottom: 26px; }
.auth-head h1 { font-size: 28px; margin-bottom: 6px; }
.auth-head p { color: var(--muted); margin: 0; font-size: 14.5px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-foot { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line-soft); font-size: 14px; color: var(--muted); }
.auth-foot p { margin: 0 0 4px; }
.auth-side { padding: 30px 4px; }
.auth-side h2 { font-size: 19px; }
.check-list { list-style: none; padding: 0; margin: 0 0 20px; }
.check-list li { position: relative; padding-left: 22px; margin-bottom: 10px; font-size: 14.5px; color: #3A4C55; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }

/* ---------- forms ---------- */

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13.5px; font-weight: 700; color: #33474F; }
.field-label .req { color: var(--danger); font-style: normal; font-size: 11px; margin-left: 4px; }
.field-label .opt { color: var(--muted); font-weight: 500; font-size: 11.5px; margin-left: 4px; }
.field input[type="text"], .field input[type="password"], .field input[type="tel"], .field input[type="date"], .field input[type="url"], .field textarea, .form-card input[type="text"], .form-card input[type="date"], .form-card input[type="url"] {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: #FEFDFB; font-size: 15px; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .form-card input:focus {
  outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(18,50,75,.1);
}
.field-hint { font-size: 12.5px; color: var(--muted); margin: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-invite input { border-color: var(--gold); background: #FDF9F0; font-weight: 700; letter-spacing: .04em; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 18px; }
.form-compact { padding: 22px; gap: 14px; margin-bottom: 18px; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.form-foot-left { justify-content: flex-start; }
.form-foot-split { justify-content: space-between; align-items: center; }
.form-foot-actions { display: flex; align-items: center; gap: 14px; }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; color: #3A4C55; }
.check input { margin-top: 3px; }
.check-inline { align-items: center; }
.check-inline input { margin: 0; }
.hidden-form { display: none; }
.inline-form { display: inline; }
.req { color: var(--danger); }

.editor-wrap { background: #fff; border-radius: 0; }
#editor { min-height: 260px; background: #fff; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; }
.editor-tall #editor { min-height: 340px; }
.ql-toolbar.ql-snow { border-color: var(--line); border-radius: 10px 10px 0 0; background: #FCFAF5; }
.ql-container.ql-snow { border-color: var(--line); border-radius: 0 0 10px 10px; font-family: var(--font-sans); }
#editor .ql-editor { min-height: 260px; }
.editor-tall #editor .ql-editor { min-height: 340px; }

.thumb-preview { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.thumb-preview img { width: 90px; height: 68px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.thumb-item { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.thumb-item img { aspect-ratio: 4 / 3; object-fit: cover; }
.thumb-item span { display: block; padding: 6px 8px; font-size: 12px; color: var(--danger); }

/* ---------- board ---------- */

.board-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.board-table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.board-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.board-table th { text-align: left; padding: 13px 16px; background: var(--paper-warm); color: var(--muted); font-size: 12.5px; letter-spacing: .04em; font-weight: 700; border-bottom: 1px solid var(--line); }
.board-table td { padding: 15px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.board-table tr:last-child td { border-bottom: 0; }
.board-table tr:hover td { background: #FDFBF6; }
.col-no { width: 64px; color: var(--muted); font-size: 13px; }
.col-author { width: 140px; }
.col-date { width: 110px; color: var(--muted); font-size: 13px; }
.col-cmt { width: 70px; text-align: center; color: var(--gold); font-weight: 700; }
.col-title a { font-weight: 600; color: var(--ink); }
.col-title a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.edited { font-size: 11px; color: var(--muted); margin-left: 6px; }
.board-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.board-foot p { margin: 0; }

.post-title { font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 12px; }
.post-meta { display: flex; gap: 18px; list-style: none; padding: 0; margin: 0; font-size: 13px; color: rgba(244,239,228,.7); align-items: center; flex-wrap: wrap; }
.post-meta li { display: flex; align-items: center; }
.post-meta .avatar-sm { background: rgba(255,255,255,.14); color: #fff; }
.post-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow-sm); min-height: 160px; }
.post-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.comments { margin-top: 34px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 24px; }
.comment { border-bottom: 1px solid var(--line-soft); padding: 14px 0; }
.comment:last-child { border-bottom: 0; }
.comment-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.comment-head strong { font-size: 14px; }
.comment-body { margin: 0; font-size: 14.5px; color: #33474F; }
.comment-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.comment-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 14.5px; resize: vertical; background: #FEFDFB; }

.locked-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 56px 40px;
  text-align: center; box-shadow: var(--shadow-sm);
}
.locked-icon { font-size: 34px; margin-bottom: 16px; }
.locked-panel h2 { font-size: clamp(20px, 2.4vw, 26px); line-height: 1.5; margin-bottom: 14px; }
.locked-desc { color: var(--muted); font-size: 15px; margin-bottom: 26px; }
.locked-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }
.locked-points { list-style: none; padding: 0; margin: 0 auto; max-width: 480px; text-align: left; font-size: 13.5px; color: var(--muted); }
.locked-points li { padding-left: 18px; position: relative; margin-bottom: 8px; }
.locked-points li::before { content: "·"; position: absolute; left: 4px; color: var(--gold); font-weight: 700; }

/* ---------- split card ---------- */

.split-card {
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  background: var(--paper-warm); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px;
}
.split-card h2 { font-size: 22px; margin-bottom: 6px; }
.split-card p { margin: 0; color: var(--muted); font-size: 14.5px; max-width: 46em; }
.split-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- admin ---------- */

.admin-section { padding-top: 40px; }
.admin-layout { display: grid; grid-template-columns: 200px 1fr; gap: 30px; align-items: start; }
.admin-tabs nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 92px; }
.admin-tab { padding: 11px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; color: #3A4C55; }
.admin-tab:hover { background: var(--paper-warm); color: var(--navy); }
.admin-tab.is-active { background: var(--navy); color: #fff; }
.admin-tip { margin-top: 22px; padding: 16px; border-radius: 12px; background: var(--paper-warm); font-size: 12.5px; color: var(--muted); }
.admin-tip strong { display: block; color: var(--ink); margin-bottom: 4px; }
.admin-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); margin-bottom: 24px; }
.admin-block-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-block-head h2 { font-size: 20px; margin-bottom: 4px; }
.admin-block-head p { margin: 0; font-size: 13.5px; }
.inline-add { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.inline-add input { flex: 1 1 180px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: #FEFDFB; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; padding: 10px 12px; background: var(--paper-warm); color: var(--muted); font-size: 12px; font-weight: 700; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table .num { text-align: right; color: var(--muted); }
.row-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-form { display: contents; }
.input-code, .input-label { width: 100%; min-width: 120px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; background: #FEFDFB; }
.input-code { font-weight: 700; letter-spacing: .03em; }
.switch { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); }
.admin-album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 20px; }
.admin-album-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.admin-album-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); }
.admin-album-thumbs img { aspect-ratio: 1; object-fit: cover; }
.admin-album-info { padding: 10px 12px; display: flex; flex-direction: column; }
.admin-album-card > form { padding: 0 12px 12px; }
.affiliate-form { border-left: 3px solid var(--gold-soft); }
.affiliate-add { border-style: dashed; background: #FDFBF6; }

/* ---------- install ---------- */

.install-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 22px; }
.install-device h2 { font-size: 19px; display: flex; align-items: center; gap: 8px; }
.install-device .steps { font-size: 14.5px; }
.ios-share { display: inline-block; border: 1px solid currentColor; border-radius: 5px; padding: 0 5px; font-size: 12px; }
.note-card { margin-bottom: 18px; }
.note-card h3 { font-size: 17px; }
.legal h2 { font-size: 18px; margin-top: 1.8em; }

/* ---------- modal ---------- */

.modal { position: fixed; inset: 0; z-index: 140; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(6, 18, 27, .62); backdrop-filter: blur(3px); }
.modal-card {
  position: relative; background: var(--paper); border-radius: 22px; max-width: 520px; width: 100%;
  padding: 32px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.5); max-height: 88vh; overflow-y: auto;
}
.modal-close { position: absolute; top: 14px; right: 16px; background: none; border: 0; font-size: 18px; color: var(--muted); cursor: pointer; }
.modal-head { text-align: center; margin-bottom: 22px; }
.modal-icon { font-size: 30px; display: block; margin-bottom: 8px; }
.modal-head h2 { font-size: 21px; margin-bottom: 6px; }
.modal-head p { color: var(--muted); font-size: 14px; margin: 0; }
.install-tabs { display: flex; background: var(--paper-warm); border-radius: 999px; padding: 4px; margin-bottom: 20px; }
.install-tabs .tab { flex: 1; border: 0; background: none; padding: 9px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer; }
.install-tabs .tab.is-active { background: var(--surface); color: var(--navy); box-shadow: var(--shadow-sm); }
.install-panel .steps { font-size: 14.5px; }
.modal-foot { margin-top: 18px; text-align: center; font-size: 13px; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--navy); color: #fff; padding: 12px 22px; border-radius: 999px; font-size: 14px;
  z-index: 200; transition: opacity .2s, transform .2s; pointer-events: none; box-shadow: var(--shadow-md);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- footer ---------- */

.site-footer { background: #0B1E2B; color: rgba(244,239,228,.7); padding: 54px 24px 24px; margin-top: 20px; }
.footer-inner { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 34px; }
.footer-brand strong { font-family: var(--font-serif); color: #F4EFE4; font-size: 17px; display: block; margin-bottom: 10px; }
.footer-brand p { font-size: 13.5px; line-height: 1.8; margin: 0; }
.footer-links h4 { color: #F4EFE4; font-size: 13px; letter-spacing: .08em; margin-bottom: 12px; }
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(244,239,228,.68); font-size: 13.5px; }
.footer-links a:hover { color: var(--gold-soft); }
.footer-bottom {
  max-width: var(--wrap); margin: 40px auto 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: rgba(244,239,228,.45); flex-wrap: wrap;
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; padding: 64px 24px 72px; }
  .hero-badge { right: 10px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .people { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .header-inner { padding: 10px 16px; gap: 12px; flex-wrap: wrap; }
  .nav {
    order: 5; width: 100%; margin-left: 0; display: none;
    border-top: 1px solid var(--line); padding-top: 8px;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav a { border-radius: 10px; padding: 12px 14px; font-size: 15px; }
  .menu-toggle { display: flex; }
  .header-actions { margin-left: auto; }
  .btn-install { padding: 9px 12px; font-size: 12.5px; }
  .user-chip .link-quiet { display: none; }
  .section { padding: 44px 18px; }
  .section-head-row { flex-direction: column; align-items: flex-start; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .account-card, .visit-card, .join-card, .auth-page, .install-grid { grid-template-columns: 1fr; }
  .account-side { border-left: 0; border-top: 1px solid var(--line); }
  .join-board { padding: 32px 24px; }
  .donation-row { grid-template-columns: 110px 1fr; gap: 16px; padding: 14px; }
  .donation-arrow { display: none; }
  .donation-info h2 { font-size: 18px; }
  .album-grid, .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .album-strip { grid-template-columns: repeat(2, 1fr); }
  .vision-track { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-tabs nav { flex-direction: row; overflow-x: auto; position: static; padding-bottom: 4px; }
  .admin-tab { white-space: nowrap; }
  .admin-tip { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-badge { display: none; }
  .lightbox { padding: 20px; }
  .lightbox-nav { width: 38px; height: 38px; font-size: 20px; }
  .locked-panel { padding: 40px 22px; }
  .install-banner { margin-bottom: 52px; padding: 24px; }
  .post-body { padding: 22px; }
  .form-card { padding: 22px; }
  .auth-card { padding: 26px 22px; }
  .section-head { margin-bottom: 24px; }
  .timeline li { gap: 14px; }
  .timeline-year { min-width: 58px; font-size: 15px; }
  .fact-list div { grid-template-columns: 92px 1fr; gap: 12px; }
  .split-card { padding: 26px 22px; }
}

@media (max-width: 560px) {
  .btn-install { width: 40px; height: 40px; padding: 0; border-radius: 12px; }
  .btn-install-text { display: none; }
  .btn-install span:first-child { font-size: 16px; }
  .header-actions .btn-ghost, .header-actions .btn-primary { padding: 9px 13px; font-size: 13px; }
}

@media (max-width: 480px) {
  body { font-size: 15.5px; }
  .brand-text strong { font-size: 16px; }
  .brand-text small { font-size: 10px; }
  .hero-stats { gap: 22px; }
  .donation-row { grid-template-columns: 88px 1fr; }
  .card-body { padding: 18px; }
  .account-number { font-size: 24px; }
  .board-table .col-author, .board-table .col-date { font-size: 12px; }
  .board-table th.col-author, .board-table th.col-date { font-size: 11px; }
}

@media print {
  .site-header, .site-footer, .install-banner, .btn, .menu-toggle { display: none !important; }
}
