/* ───────── Tokens ───────── */
:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #eef1f7;
  --ink: #0f1220;
  --ink-2: #3a4054;
  --muted: #6b7183;
  --line: rgba(15, 18, 32, .09);
  --accent: #2a4bd7;
  --accent-2: #5b7cff;
  --accent-soft: rgba(42, 75, 215, .09);
  --on-accent: #ffffff;
  --green: #1f8a5c;
  --green-soft: rgba(31, 138, 92, .11);
  --red: #c9423a;
  --red-soft: rgba(201, 66, 58, .11);
  --blue: #2a4bd7;
  --blue-soft: rgba(42, 75, 215, .09);
  --shadow: 0 1px 2px rgba(15, 18, 32, .04), 0 14px 36px -14px rgba(31, 52, 140, .18);
  --radius: 18px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d14;
    --surface: #131622;
    --surface-2: #1b1f2e;
    --ink: #eef0f6;
    --ink-2: #c4c8d6;
    --muted: #8a90a6;
    --line: rgba(238, 240, 246, .09);
    --accent: #7b93ff;
    --accent-2: #a9b8ff;
    --accent-soft: rgba(123, 147, 255, .14);
    --on-accent: #0b0d14;
    --green: #5cc995;
    --green-soft: rgba(92, 201, 149, .14);
    --red: #f07f74;
    --red-soft: rgba(240, 127, 116, .14);
    --blue: #7b93ff;
    --blue-soft: rgba(123, 147, 255, .14);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6);
  }
}

/* ───────── Base ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; letter-spacing: -0.025em; }
p { margin: 0; }
code { font-size: .85em; background: var(--surface-2); padding: .1em .4em; border-radius: 6px; }
main { min-height: 70vh; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }
.section { padding: 96px 24px; }
.muted { color: var(--muted); }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
}
.inline { display: inline; margin: 0; }

/* ───────── Nav ───────── */
.nav {
  position: sticky; top: 0; z-index: 1000;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.home .nav {
  position: fixed; left: 0; right: 0;
  background: transparent; border-bottom-color: transparent;
  transition: background .3s, border-color .3s;
}
.home .nav.scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 24px; height: 68px;
  display: flex; align-items: center; gap: 32px;
}
.brand { font-family: var(--serif); font-weight: 700; font-size: 26px; letter-spacing: -0.03em; }
.brand span { color: var(--accent); font-style: italic; }
.brand.small { font-size: 20px; }
.brand.big { font-size: 56px; display: block; text-align: center; margin-bottom: 8px; }
.links { display: flex; gap: 4px; }
.links a {
  padding: 8px 14px; border-radius: 999px; font-size: 15px; font-weight: 500;
  opacity: .72; transition: opacity .2s, background .2s;
}
.links a:hover { opacity: 1; }
.links a.active { opacity: 1; background: var(--accent-soft); color: var(--accent); }
.nav-aux { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.pill, .btn {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 8px 16px; border-radius: 999px; border: 1px solid transparent;
  background: var(--ink); color: var(--bg);
  transition: transform .15s, opacity .2s;
}
.pill:hover, .btn:hover { transform: translateY(-1px); }
.pill.ghost { background: transparent; color: inherit; border-color: currentColor; opacity: .7; }
.pill.ghost:hover { opacity: 1; }
.pill.danger { background: var(--red-soft); color: var(--red); }
.pill.active { background: var(--accent); color: var(--on-accent); }
.btn { background: var(--accent); color: var(--on-accent); padding: 12px 24px; font-size: 15px; }

/* ───────── Hero ───────── */
.hero {
  position: relative; overflow: hidden;
  min-height: 100svh; display: grid; place-items: center;
  background:
    radial-gradient(900px 520px at 85% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%),
    radial-gradient(760px 520px at 0% 100%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 62%),
    var(--bg);
  color: var(--ink);
  text-align: center;
  padding: 120px 24px 80px;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
  opacity: .7;
}
.hero-glow {
  position: absolute; width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 14%, transparent), transparent 65%);
  top: 50%; left: 50%; transform: translate(-50%, -55%);
  animation: breathe 9s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: translate(-50%, -55%) scale(1.12); opacity: .7; } }
.hero-inner { position: relative; z-index: 1; animation: rise 1s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.wordmark {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(96px, 22vw, 260px); line-height: .95; letter-spacing: -0.06em;
  margin: 8px 0 28px; color: var(--ink);
}
.wordmark span {
  display: inline-block; padding: 0 .14em 0 .02em; margin-right: -.1em;
  font-style: italic; font-weight: 500; color: var(--accent);
}
.hero-sub { font-size: clamp(16px, 2.2vw, 20px); color: var(--muted); max-width: 520px; margin: 0 auto; }
.hero-stats {
  display: inline-flex; gap: 0; margin-top: 48px;
  border: 1px solid var(--line); border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
}
.hero-stats div { padding: 16px 28px; display: flex; flex-direction: column; align-items: center; }
.hero-stats div + div { border-left: 1px solid var(--line); }
.hero-stats strong { font-family: var(--serif); font-size: 32px; font-weight: 500; line-height: 1.1; color: var(--accent); }
.hero-stats span { font-size: 13px; color: var(--muted); }
.scroll-cue {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--muted); background: var(--surface);
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* ───────── News ───────── */
.section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 36px; }
.section-head h2, .page-head h1 { font-size: clamp(32px, 4.5vw, 48px); font-weight: 700; }

.media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.media-fallback {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.media-fallback span { font-family: var(--serif); font-size: 44px; color: rgba(255,255,255,.92); letter-spacing: -0.04em; }
.media-fallback em { color: #fff; font-weight: 500; }

.feature {
  display: grid; grid-template-columns: 1.35fr 1fr;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden;
  box-shadow: var(--shadow); margin-bottom: 28px;
}
.feature .media { aspect-ratio: auto; min-height: 360px; }
.feature-body { padding: 44px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.feature-body h3 { font-size: clamp(24px, 3vw, 34px); }
.feature-body p { color: var(--ink-2); }
.more { color: var(--accent); font-weight: 600; font-size: 15px; margin-top: 8px; }
time { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: .02em; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .3s, box-shadow .3s; display: flex; flex-direction: column;
}
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 8px; }
.card-body h3 { font-size: 19px; }
.card-body p {
  color: var(--muted); font-size: 15px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card:hover, .feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card:hover img, .feature:hover img { transform: scale(1.04); }
.feature { transition: transform .3s, box-shadow .3s; }

.empty {
  text-align: center; padding: 72px 24px; border: 1.5px dashed var(--line); border-radius: 24px;
  display: flex; flex-direction: column; gap: 6px; color: var(--muted);
}
.empty p { color: var(--ink); font-weight: 600; font-size: 18px; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tile {
  position: relative; padding: 32px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .2s, transform .3s;
  min-height: 200px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
}
.tile:hover { border-color: var(--accent); transform: translateY(-3px); }
.tile-no { position: absolute; top: 24px; left: 32px; font-family: var(--serif); font-size: 15px; color: var(--accent); }
.tile h3 { font-size: 26px; }
.tile p { color: var(--muted); }
.lock { position: absolute; top: 24px; right: 28px; font-size: 12px; color: var(--muted); }

/* ───────── Article ───────── */
.article { display: flex; flex-direction: column; gap: 16px; }
.article h1 { font-size: clamp(30px, 4.5vw, 44px); }
.back { color: var(--muted); font-size: 14px; margin-bottom: 16px; display: inline-block; }
.back:hover { color: var(--accent); }
.article-image img { border-radius: var(--radius); width: 100%; }
.article-image { margin: 16px 0; }
.article-body { display: flex; flex-direction: column; gap: 1em; font-size: 17px; color: var(--ink-2); line-height: 1.85; margin-bottom: 24px; }

/* ───────── Page head ───────── */
.page-head { padding-top: 72px; padding-bottom: 40px; }
.lead { color: var(--muted); font-size: 18px; margin-top: 12px; max-width: 640px; }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.page-head .meta-row .muted { font-size: 13px; margin-right: 10px; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
.chip.tiny { font-size: 11px; padding: 2px 8px; }
.tag-개정 { background: var(--blue-soft); color: var(--blue); }
.tag-신설 { background: var(--green-soft); color: var(--green); }
.status-가결, .status-결정 { background: var(--green-soft); color: var(--green); }
.status-부결 { background: var(--red-soft); color: var(--red); }
.chip-online { background: var(--blue-soft); color: var(--blue); }
.chip-place { background: var(--accent-soft); color: var(--accent); }

/* ───────── Bylaws ───────── */
.bylaws { display: grid; grid-template-columns: 220px 1fr; gap: 48px; padding-bottom: 120px; align-items: start; }
.toc { position: sticky; top: 100px; }
.toc-title { font-size: 12px; font-weight: 700; letter-spacing: .18em; color: var(--muted); text-transform: uppercase; margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 7px 0 7px 18px; font-size: 15px; color: var(--ink-2); margin-left: -1px; border-left: 2px solid transparent; }
.toc a span { color: var(--muted); font-size: 13px; margin-right: 4px; }
.toc a:hover { color: var(--accent); border-left-color: var(--accent); }

.articles { display: flex; flex-direction: column; gap: 20px; }
.article-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 36px;
}
.article-card header { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.art-no { font-family: var(--serif); font-size: 18px; color: var(--accent); font-weight: 500; }
.article-card h2 { font-size: 24px; }
.clauses { display: flex; flex-direction: column; gap: 14px; }
.clause { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 4px 0; }
.clause:not(:has(.clause-label)) { grid-template-columns: 1fr; }
.clause.changed { padding: 16px 18px; border-radius: 14px; background: var(--surface-2); }
.clause-label { font-weight: 700; min-width: 96px; color: var(--ink); }
.clause-body { color: var(--ink-2); }
.clause-body ul { margin: 8px 0 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.clause-body li { position: relative; padding-left: 18px; }
.clause-body li::before { content: ""; position: absolute; left: 2px; top: .75em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.clause-tag { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; }
.notes { padding: 28px 36px; border-radius: var(--radius); border: 1px dashed var(--line); }
.notes ul { margin: 0; padding-left: 18px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }

/* ───────── Minutes timeline ───────── */
.year-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.year-jump a {
  font-family: var(--serif); font-size: 15px; padding: 6px 16px; border-radius: 999px;
  border: 1px solid var(--line); transition: all .2s;
}
.year-jump a:hover { border-color: var(--accent); color: var(--accent); }

.timeline { position: relative; padding-bottom: 120px; }
.timeline::before {
  content: ""; position: absolute; top: 8px; bottom: 120px; left: calc(24px + 120px + 20px);
  width: 1px; background: linear-gradient(var(--accent), var(--line) 30%);
}
.meeting { display: grid; grid-template-columns: 120px 40px 1fr; margin-bottom: 40px; }
.meeting-year { text-align: right; padding-top: 18px; }
.meeting-year span { font-family: var(--serif); font-size: 34px; font-weight: 300; color: var(--muted); letter-spacing: -0.03em; position: sticky; top: 96px; }
.meeting:first-child .meeting-year span { color: var(--accent); }
.meeting-dot { position: relative; }
.meeting-dot::after {
  content: ""; position: absolute; top: 32px; left: 50%; transform: translateX(-50%);
  width: 13px; height: 13px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent);
}
.meeting-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px 32px;
  display: flex; flex-direction: column; gap: 24px; box-shadow: var(--shadow);
}
.meeting-card header .meta-row { margin: 0 0 12px; }
.meeting-card h2 { font-size: 24px; }

.attendance { background: var(--surface-2); border-radius: 16px; padding: 18px 20px; }
.attendance-head { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.attendance-head strong { font-size: 18px; color: var(--accent); }
.bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.people { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.person { font-size: 13px; padding: 4px 12px; border-radius: 999px; font-weight: 500; }
.person.in { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.person.in::before { content: "●"; color: var(--green); font-size: 8px; margin-right: 6px; vertical-align: 2px; }
.person.out { color: var(--muted); border: 1px dashed var(--line); }
.person.out::before { content: "○"; font-size: 8px; margin-right: 6px; vertical-align: 2px; }

.agenda + .agenda { border-top: 1px solid var(--line); padding-top: 24px; }
.agenda-head { margin-bottom: 14px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.agenda-head h3 { font-size: 18px; }
.agenda-head p { font-size: 14px; }
.items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.items > li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; }
.num { font-size: 20px; color: var(--accent); line-height: 1.4; }
.item-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.item-title h4 { font-size: 17px; }
.items ul { margin: 6px 0 0; padding-left: 0; list-style: none; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; font-size: 15.5px; }
.items ul li { padding-left: 14px; position: relative; }
.items ul li::before { content: "–"; position: absolute; left: 0; color: var(--muted); }
.items li.rejected h4 { text-decoration: line-through; text-decoration-color: var(--red); color: var(--muted); }
.empty-agenda { font-size: 14px; }

/* ───────── Bases ───────── */
.bases { display: grid; grid-template-columns: 1fr 300px; gap: 24px; padding-bottom: 120px; }
.map {
  height: 640px; border-radius: 22px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow); background: var(--surface-2); z-index: 0;
}
.roster { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px; max-height: 640px; overflow: auto; }
.roster ul { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 2px; }
.roster button {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  font: inherit; color: inherit; background: none; border: 0; padding: 8px 10px; border-radius: 12px; cursor: pointer;
}
.roster button:hover, .roster button.on { background: var(--surface-2); }
.avatar {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 15px;
}
.avatar.venue { background: var(--accent-soft); color: var(--accent); font-size: 13px; }
.who { display: flex; flex-direction: column; line-height: 1.35; flex: 1; }
.who strong { font-size: 15px; }
.who span { font-size: 13px; color: var(--muted); }
.small-note { font-size: 12.5px; line-height: 1.6; }
.legend { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-right: 16px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.member { background: var(--accent); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--accent); }
.dot.venue { background: #f08a3c; transform: rotate(45deg); border-radius: 2px; }

.pin {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: #2a4bd7; color: #fff; font: 700 15px var(--sans);
  border: 2px solid #fff; box-shadow: 0 6px 16px rgba(0,0,0,.35);
  transition: transform .2s;
}
.pin.dim { opacity: .75; border-style: dashed; }
.pin-venue {
  width: 22px; height: 22px; background: #f08a3c; transform: rotate(45deg); border-radius: 4px;
  border: 2px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.leaflet-popup-content-wrapper { border-radius: 14px; font-family: var(--sans); }
.leaflet-popup-content { margin: 12px 16px; line-height: 1.5; }
.leaflet-popup-content strong { font-size: 15px; }
.leaflet-container { font-family: var(--sans); }
.map .leaflet-tile-pane { filter: saturate(.55) contrast(.95); }
@media (prefers-color-scheme: dark) {
  .map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9) saturate(.6); }
  .pin { border-color: #131622; background: #5b7cff; }
}

/* ───────── Forms ───────── */
.login { min-height: 70vh; display: grid; place-items: center; padding-top: 48px; padding-bottom: 48px; }
.login-card {
  width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 24px; padding: 40px 32px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 18px; text-align: center;
}
.login-card .btn { justify-content: center; }
.field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input:not([type=checkbox]):not([type=file]), .field textarea {
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; outline: none;
  transition: border-color .2s, box-shadow .2s; width: 100%;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.error { color: var(--red); font-size: 14px; }
.error ul { margin: 0; padding-left: 18px; }
.editor { display: flex; flex-direction: column; gap: 20px; padding-bottom: 120px; }
.preview { max-width: 280px; border-radius: 12px; }
.check { display: flex; gap: 6px; align-items: center; font-size: 14px; }

.admin-list { display: flex; flex-direction: column; gap: 12px; padding-bottom: 120px; }
.admin-row {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 18px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px;
}
.thumb { width: 96px; height: 64px; border-radius: 10px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .media-fallback span { font-size: 18px; }
.admin-info { display: flex; flex-direction: column; }
.admin-actions { display: flex; gap: 6px; }

/* ───────── Footer ───────── */
.footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer .brand { color: var(--ink); }

/* ───────── Responsive ───────── */
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .feature { grid-template-columns: 1fr; }
  .feature .media { min-height: 0; aspect-ratio: 16 / 10; }
  .feature-body { padding: 28px; }
  .bylaws { grid-template-columns: 1fr; }
  .toc { display: none; }
  .bases { grid-template-columns: 1fr; }
  .map { height: 460px; }
  .roster { max-height: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .section { padding: 64px 16px; }
  .nav-inner { padding: 0 16px; gap: 10px; height: 60px; }
  .brand { font-size: 22px; }
  .links a { padding: 6px 9px; font-size: 14px; }
  .nav-aux .pill { padding: 6px 10px; font-size: 12px; }
  .user-menu summary { padding: 0; border: 0; background: none; }
  .user-name { display: none; }
  .cards, .tiles { grid-template-columns: 1fr; }
  .hero-stats div { padding: 12px 18px; }
  .hero-stats strong { font-size: 26px; }
  .page-head { padding-top: 48px; }
  .article-card { padding: 24px 20px; }
  .clause { grid-template-columns: 1fr; gap: 4px; }
  .timeline::before { left: 22px; }
  .meeting { grid-template-columns: 12px 1fr; gap: 0 18px; }
  .meeting-year { grid-column: 2; text-align: left; padding: 0 0 8px; }
  .meeting-year span { position: static; font-size: 26px; }
  .meeting-dot { grid-row: 1 / span 2; grid-column: 1; }
  .meeting-dot::after { top: 14px; left: 6px; }
  .meeting-card { grid-column: 2; padding: 22px 18px; }
  .admin-row { grid-template-columns: 64px 1fr; }
  .thumb { width: 64px; height: 48px; }
  .admin-actions { grid-column: 1 / -1; justify-content: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ───────── Accounts ───────── */
.user-menu { position: relative; }
.user-menu summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); transition: border-color .2s;
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover, .user-menu[open] summary { border-color: var(--accent); }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 700;
}
.user-name { font-size: 14px; font-weight: 600; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; z-index: 1100;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  padding: 6px; display: flex; flex-direction: column;
}
.user-head { padding: 8px 12px 10px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.user-dropdown a, .user-dropdown button {
  display: block; width: 100%; text-align: left; font: inherit; font-size: 15px; color: var(--ink);
  background: none; border: 0; padding: 10px 12px; border-radius: 10px; cursor: pointer;
}
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--surface-2); }
.user-dropdown a.active { color: var(--accent); }
.user-dropdown form { margin: 0; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.user-dropdown button { color: var(--red); }
.notice { background: var(--green-soft); color: var(--green); padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.field-group { border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.field-group legend { font-size: 14px; font-weight: 700; padding: 0 6px; }
.field em, .field-group em { font-style: normal; font-weight: 400; }
.address-row { display: flex; gap: 8px; }
.address-row input { flex: 1; }
.address-row .pill { white-space: nowrap; }
.picker-map { height: 280px; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; z-index: 0; }
.picker-map .leaflet-tile-pane { filter: saturate(.55) contrast(.95); }
.member-row { grid-template-columns: 44px 1fr auto; }
.member-row .avatar { width: 44px; height: 44px; }
.roster-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; }
.roster-item.off { opacity: .55; }
.roster-item.off .avatar { background: var(--surface-2); color: var(--muted); }
.admin-tabs { display: flex; gap: 6px; padding-top: 28px; }
.admin-tabs a { padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); }
.admin-tabs a.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.admin-tabs + .page-head { padding-top: 36px; }
.howto { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; }
.howto ol { margin: 0 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }

/* ───────── Gallery ───────── */
.section-tight { padding-bottom: 120px; }
.new-album, .album-settings { position: relative; }
.new-album { margin-top: 24px; }
.new-album summary, .album-settings summary { list-style: none; cursor: pointer; display: inline-flex; }
.new-album summary::-webkit-details-marker, .album-settings summary::-webkit-details-marker { display: none; }
.editor.compact {
  padding: 20px; margin-top: 12px; gap: 14px; max-width: 420px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.album-settings .editor.compact { position: absolute; z-index: 20; width: min(420px, 90vw); }

.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.album { display: flex; flex-direction: column; gap: 12px; }
.album-cover {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--surface-2);
  box-shadow: var(--shadow); transition: transform .3s;
}
.album:hover .album-cover { transform: translateY(-4px); }
.album-cover > img { width: 100%; height: 100%; object-fit: cover; }
.album-strip { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; }
.album-strip img { width: 54px; height: 54px; object-fit: cover; border-radius: 10px; border: 2px solid var(--surface); }
.album-body { display: flex; flex-direction: column; gap: 2px; padding: 0 4px; }
.album-body h3 { font-size: 18px; }
.album-body .muted { font-size: 13px; }

.upload-btn { cursor: pointer; }
.upload-status { margin-top: 16px; max-width: 480px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.upload-status .bar span { transition: width .3s; }

.masonry { columns: 4 240px; column-gap: 12px; }
.shot { margin: 0 0 12px; break-inside: avoid; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: var(--surface-2); }
.shot img { width: 100%; height: auto; transition: transform .5s cubic-bezier(.2,.7,.2,1), opacity .3s; }
.shot:hover img { transform: scale(1.03); }

.lightbox {
  position: fixed; inset: 0; z-index: 2000; background: rgba(8, 10, 16, .94);
  display: grid; place-items: center; padding: 56px 64px 72px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 128px); object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb-close, .lb-nav {
  position: absolute; background: rgba(255,255,255,.08); color: #fff; border: 0; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%; font-size: 22px; display: grid; place-items: center;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.18); }
.lb-close { top: 16px; right: 16px; font-size: 18px; }
.lb-nav { top: 50%; transform: translateY(-50%); font-size: 32px; }
.lb-nav.prev { left: 12px; }
.lb-nav.next { right: 12px; }
.lb-bar {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; color: rgba(255,255,255,.75); font-size: 13px;
}
.lb-actions { display: flex; gap: 8px; }
.lb-bar .pill.ghost { color: #fff; }
.lb-bar .pill[hidden] { display: none; }

@media (max-width: 640px) {
  .masonry { columns: 2; column-gap: 8px; }
  .shot { margin-bottom: 8px; border-radius: 8px; }
  .lightbox { padding: 48px 0 64px; }
  .lb-nav { display: none; }
  .albums { grid-template-columns: 1fr 1fr; gap: 14px; }
  .album-strip { display: none; }
  .album-body h3 { font-size: 15px; }
  .address-row { flex-direction: column; }
  .admin-tabs { overflow-x: auto; }
  .links { overflow-x: auto; scrollbar-width: none; }
}
