/* =========================================================================
   Trail Life IL-2931 — Components & layout
   ========================================================================= */

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section--tint { background: var(--khaki-200); background-image: none; }
.section--forest {
  background: var(--forest);
  background-image: none;
  color: #f2ecdd;
}
.section--forest h1, .section--forest h2, .section--forest h3 { color: #fff; }
.section__head { max-width: 720px; margin: 0 auto 2rem; text-align: center; }
.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--campfire-deep);
  margin-bottom: 0.4rem;
}
.lead { font-size: 1.15rem; color: var(--text-soft); }
.section--forest .lead { color: #d9e0d3; }
.text-center { text-align: center; }
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--campfire-deep);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--ease), background var(--ease), box-shadow var(--ease);
  min-height: 46px;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--campfire-deep); color: #fff; }
.btn--primary:hover { background: #8f3c14; color: #fff; }
.btn--forest { background: var(--forest); color: #fff; }
.btn--forest:hover { background: var(--pine); color: #fff; }
.btn--ghost { background: transparent; color: var(--pine); border-color: var(--border-strong); }
.btn--ghost:hover { background: rgba(0,0,0,0.04); color: var(--pine); }
.btn--light { background: #fff; color: var(--pine); }
.btn--light:hover { background: var(--parchment); color: var(--pine); }
.btn--sm { padding: 0.45rem 0.9rem; font-size: 0.9rem; min-height: 38px; }
.btn.is-loading { opacity: 0.85; cursor: progress; pointer-events: none; }
.btn.is-loading::before {
  content: '';
  width: 15px; height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.is-loading::before { animation: none; } }
.btn--block { width: 100%; justify-content: center; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* ---- Header / nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--pine);
  color: #f2ecdd;
  box-shadow: var(--shadow-sm);
}
.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: #fff;
  margin-right: auto;
}
.brand__badge {
  width: 42px; height: 42px;
  flex: none;
  display: grid; place-items: center;
  background: var(--campfire-deep);
  border-radius: 10px;
  color: #fff;
}
.brand__name { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; line-height: 1; }
.brand__sub { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--khaki); }
.nav__links { display: flex; align-items: center; gap: 0.35rem; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  color: #e8e0cf;
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  transition: background var(--ease), color var(--ease);
}
.nav__links a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav__links a.is-active { color: #fff; box-shadow: inset 0 -3px 0 var(--campfire); }
/* Desktop: links + CTA sit inline on one row */
.nav__menu { display: flex; align-items: center; gap: 0.6rem; }
.nav__cta { margin-left: 0.35rem; }
.nav__toggle {
  display: none;
  background: transparent;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  color: #fff;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
}

@media (max-width: 1024px) {
  .nav__toggle { display: inline-flex; }
  .nav__menu {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 68px;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    background: var(--pine);
    padding: 0.75rem 1.25rem 1.25rem;
    box-shadow: var(--shadow-lg);
  }
  .nav__menu.is-open { display: flex; }
  .nav__links { flex-direction: column; align-items: stretch; gap: 0.15rem; }
  .nav__links a { padding: 0.7rem 0.6rem; }
  .nav__cta { margin: 0.4rem 0 0; }
  .btn--nav { width: 100%; justify-content: center; }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  isolation: isolate;
  background-color: #24382b;
  /* Top: dark wash for text legibility. Middle: optional photo (may be absent).
     Bottom: rich gradient so the hero always looks intentional with no photo. */
  background-image:
    linear-gradient(105deg, rgba(20,30,23,0.82) 0%, rgba(31,46,36,0.6) 55%, rgba(31,46,36,0.5) 100%),
    var(--hero-image, none),
    radial-gradient(130% 130% at 12% 8%, #3f6249 0%, #294036 52%, #182a1f 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(5rem, 11vw, 9rem);
  overflow: hidden;
}
/* Faint topographic contour lines for texture/depth */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='600' fill='none' stroke='%23ffffff' stroke-opacity='0.06' stroke-width='2'%3E%3Cpath d='M-50 120 C 150 60 350 180 550 110 S 900 120 950 90'/%3E%3Cpath d='M-50 200 C 150 140 350 260 550 190 S 900 200 950 170'/%3E%3Cpath d='M-50 300 C 180 230 360 350 560 280 S 900 300 960 260'/%3E%3Cpath d='M-50 400 C 150 330 350 450 550 380 S 900 400 950 360'/%3E%3Cpath d='M-50 500 C 180 430 360 550 560 480 S 900 500 960 460'/%3E%3C/svg%3E");
  background-size: cover;
}
/* Organic ridgeline that flows into the section below */
.hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 68px;
  background: var(--parchment);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 68' preserveAspectRatio='none'%3E%3Cpath d='M0 68 L0 40 C 240 8 400 60 620 44 C 840 28 1000 4 1440 34 L1440 68 Z'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 68' preserveAspectRatio='none'%3E%3Cpath d='M0 68 L0 40 C 240 8 400 60 620 44 C 840 28 1000 4 1440 34 L1440 68 Z'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
}
.hero .container { position: relative; z-index: 1; }
.hero__inner { max-width: 720px; }
.hero h1 { color: #fff; margin-bottom: 0.4rem; text-shadow: 0 2px 12px rgba(0,0,0,0.25); }
.hero__sub { font-size: 1.25rem; color: #eadfca; margin-bottom: 1.75rem; max-width: 40ch; }
.hero .btn-row { margin-top: 0.5rem; }

/* ---- Cards / grids ---- */
.grid { display: grid; gap: 1.25rem; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.card--hover { cursor: default; }
.card--hover:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.card h3 { margin-top: 0.25rem; }

/* Pillar cards get an accent top-edge that "lights up" on hover */
.pillar {
  position: relative;
  overflow: hidden;
  text-align: left;
}
.pillar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--campfire), var(--forest));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--ease);
}
.pillar:hover::before { transform: scaleX(1); }
.pillar__icon {
  width: 60px; height: 60px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 30%, var(--khaki-200), #d8cbaf);
  color: var(--forest);
  border-radius: 50%;
  margin-bottom: 1rem;
  box-shadow: inset 0 0 0 2px rgba(46,64,52,0.12), var(--shadow-sm);
  transition: transform var(--ease), color var(--ease), background var(--ease);
}
.pillar:hover .pillar__icon {
  transform: rotate(-6deg) scale(1.06);
  color: var(--campfire-deep);
}
.division__grade {
  font-family: var(--font-head);
  color: var(--campfire-deep);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
}

/* ---- Feature / split ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 1.5rem; } }

/* ---- Photo strip / gallery ---- */
.photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
@media (max-width: 620px) { .photo-strip { grid-template-columns: repeat(2, 1fr); } }
.photo-strip a, .photo-strip img, .gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  aspect-ratio: 4 / 3;
  background: var(--khaki-200);
}
.photo-strip a {
  display: block;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.photo-strip a img { transition: transform 400ms cubic-bezier(0.4,0,0.2,1); display: block; }
.photo-strip a:hover img, .photo-strip a:focus-visible img { transform: scale(1.06); }
.gallery__item img { transition: transform 400ms cubic-bezier(0.4,0,0.2,1); }
.gallery__item:hover img, .gallery__item:focus-visible img { transform: scale(1.05); }

/* Scroll-reveal (progressive enhancement; only active when JS adds .reveal) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 600ms ease, transform 600ms cubic-bezier(0.16,1,0.3,1); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}
.gallery {
  columns: 3 260px;
  column-gap: 1rem;
}
.gallery__item {
  break-inside: avoid;
  margin-bottom: 1rem;
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
  display: block;
  border: none;
  background: none;
  padding: 0;
  width: 100%;
}
.gallery__item img { aspect-ratio: auto; }
.gallery__cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
  color: #fff;
  background: linear-gradient(transparent, rgba(31,46,36,0.85));
  text-align: left;
  opacity: 0;
  transition: opacity var(--ease);
}
.gallery__item:hover .gallery__cap, .gallery__item:focus-visible .gallery__cap { opacity: 1; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(23, 33, 26, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 85vh; border-radius: 8px; box-shadow: var(--shadow-lg); }
.lightbox__close {
  position: absolute; top: 1rem; right: 1.25rem;
  background: transparent; border: none; color: #fff;
  font-size: 2.4rem; line-height: 1; cursor: pointer;
}

/* ---- Empty state ---- */
.empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-soft);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

/* ---- Info list (meeting details, donate) ---- */
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { display: flex; gap: 0.7rem; padding: 0.55rem 0; border-bottom: 1px solid var(--border); }
.info-list li:last-child { border-bottom: none; }
.info-list .ico { color: var(--campfire-deep); flex: none; margin-top: 2px; }
.note {
  background: var(--khaki-200);
  border-left: 4px solid var(--campfire-deep);
  padding: 0.9rem 1.1rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
}

/* ---- Forms ---- */
.form-field { margin-bottom: 1.1rem; }
.form-field label {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--pine);
}
.form-field .req { color: var(--campfire-deep); }
.input, .textarea, select.input {
  width: 100%;
  font: inherit;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  min-height: 46px;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.input:focus, .textarea:focus, select.input:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(46, 64, 52, 0.15);
}
.textarea { min-height: 130px; resize: vertical; }
.field-error { color: #b23b1e; font-size: 0.9rem; margin-top: 0.3rem; }
.input--error { border-color: #b23b1e; }
.help { color: var(--text-soft); font-size: 0.9rem; margin-top: 0.3rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.check-grid { display: grid; grid-template-columns: 1fr; gap: 0.35rem; }
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-family: var(--font-body);
  font-weight: 400;
  cursor: pointer;
  padding: 0.35rem 0;
  line-height: 1.35;
}
.check input {
  width: 20px; height: 20px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--forest);
  cursor: pointer;
}
.form-card { max-width: 620px; }
.alert {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
}
.alert--success { background: #e4f0e4; border: 1px solid #b6d8b6; color: #245c2e; }
.alert--error { background: #f8e5df; border: 1px solid #e6b8a8; color: #8f3c14; }

/* ---- Calendar ---- */
.cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.cal-toolbar h2 { margin: 0; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 0 0 1.5rem; padding: 0; list-style: none; font-size: 0.9rem; }
.cal-legend li { display: flex; align-items: center; gap: 0.4rem; }
.dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.dot--meeting { background: var(--type-meeting); }
.dot--campout { background: var(--type-campout); }
.dot--service { background: var(--type-service); }
.dot--special { background: var(--type-special); }

.calendar {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  table-layout: fixed;
}
.calendar th {
  background: var(--forest);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 500;
  padding: 0.6rem 0.4rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.calendar td {
  border: 1px solid var(--border);
  vertical-align: top;
  height: 104px;
  padding: 0.35rem;
  position: relative;
}
.calendar td.out { background: #efe8d8; color: var(--text-soft); }
.calendar td.today { box-shadow: inset 0 0 0 2px var(--campfire); }
.cal-daynum { font-family: var(--font-head); font-weight: 600; font-size: 0.9rem; color: var(--pine); }
.cal-event {
  display: block;
  font-size: 0.76rem;
  line-height: 1.25;
  padding: 2px 5px;
  margin-top: 3px;
  border-radius: 4px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-event.meeting { background: var(--type-meeting); }
.cal-event.campout { background: var(--type-campout); }
.cal-event.service { background: var(--type-service); }
.cal-event.special { background: var(--type-special); }

/* Upcoming list */
.event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.event-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--forest);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-sm);
}
.event-item.meeting { border-left-color: var(--type-meeting); }
.event-item.campout { border-left-color: var(--type-campout); }
.event-item.service { border-left-color: var(--type-service); }
.event-item.special { border-left-color: var(--type-special); }
.event-date {
  flex: none;
  text-align: center;
  font-family: var(--font-head);
  min-width: 54px;
}
.event-date .m { display: block; font-size: 0.75rem; text-transform: uppercase; color: var(--campfire-deep); letter-spacing: 0.05em; }
.event-date .d { display: block; font-size: 1.5rem; font-weight: 700; color: var(--pine); line-height: 1; }
.event-body h4 { font-family: var(--font-head); margin: 0 0 0.15rem; font-size: 1.05rem; color: var(--pine); }
.event-meta { font-size: 0.9rem; color: var(--text-soft); }
.badge {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 8px;
  border-radius: 999px;
  color: #fff;
  vertical-align: middle;
}
.badge.meeting { background: var(--type-meeting); }
.badge.campout { background: var(--type-campout); }
.badge.service { background: var(--type-service); }
.badge.special { background: var(--type-special); }

@media (max-width: 680px) {
  /* Collapse the month grid into the upcoming list on small screens */
  .calendar-wrap { overflow-x: auto; }
  .calendar { min-width: 560px; }
}

/* ---- Footer ---- */
.site-footer {
  background: var(--pine);
  color: #cdd6c8;
  background-image: none;
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}
.site-footer a { color: #eadfca; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 1.25rem; } }
.site-footer h4 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-social { display: flex; gap: 0.6rem; margin-top: 0.5rem; }
.footer-social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: rgba(255,255,255,0.08); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 2rem; padding-top: 1.25rem; font-size: 0.85rem; color: #9fac97; text-align: center; }

/* ---- Page layout wrapper ---- */
.page-wrap { display: flex; flex-direction: column; min-height: 100dvh; }
main { flex: 1; }
.page-header {
  position: relative;
  isolation: isolate;
  background-color: var(--forest);
  background-image: radial-gradient(120% 140% at 100% 0%, #3a5a44 0%, #2e4034 45%, #223026 100%);
  color: #fff;
  padding: 2.75rem 0 3.25rem;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='300' fill='none' stroke='%23ffffff' stroke-opacity='0.06' stroke-width='2'%3E%3Cpath d='M-50 80 C 150 30 350 120 550 70 S 900 80 950 55'/%3E%3Cpath d='M-50 150 C 180 100 360 190 560 140 S 900 150 960 120'/%3E%3Cpath d='M-50 220 C 150 170 350 260 550 210 S 900 220 950 190'/%3E%3C/svg%3E");
  background-size: cover;
}
.page-header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 40px;
  background: var(--parchment);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40 L0 22 C 300 4 520 34 760 22 C 1000 10 1180 6 1440 20 L1440 40 Z'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40 L0 22 C 300 4 520 34 760 22 C 1000 10 1180 6 1440 20 L1440 40 Z'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
}
.page-header .container { position: relative; z-index: 1; }
.page-header h1 { color: #fff; margin-bottom: 0.3rem; }
.page-header p { color: #d9e0d3; margin: 0; max-width: 60ch; }

/* ---- Admin ---- */
.admin-bar {
  background: var(--bark);
  color: #f4eee1;
  padding: 0.6rem 0;
  font-size: 0.9rem;
}
.admin-bar .container { display: flex; align-items: center; gap: 1rem; justify-content: space-between; }
.admin-bar a { color: #f4eee1; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.table th, .table td { text-align: left; padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { background: var(--khaki-200); font-family: var(--font-head); }
.table tr:last-child td { border-bottom: none; }
.row-unread { background: #fff6ee; }
.inline-form { display: inline; }
.stack { display: grid; gap: 1rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
@media (max-width: 560px) { .two-col { grid-template-columns: 1fr; } }
.muted { color: var(--text-soft); }

/* ---- Gallery album cards ---- */
.album-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease), box-shadow var(--ease);
}
.album-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: inherit; }
.album-card__cover { position: relative; aspect-ratio: 4 / 3; background: var(--khaki-200); }
.album-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.album-card__placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--forest); background: linear-gradient(135deg, var(--khaki-200), #d8cbaf); }
.album-card__count { position: absolute; bottom: 8px; right: 8px; background: rgba(31,46,36,0.82); color: #fff; font-size: 0.75rem; padding: 2px 8px; border-radius: 999px; }
.album-card__body { padding: 0.85rem 1rem; }
.album-card__body h3 { margin: 0; font-size: 1.15rem; }
.album-card__date { color: var(--text-soft); font-size: 0.9rem; }
.album-cap { padding: 0.5rem 0.2rem 0; font-size: 0.85rem; color: var(--text-soft); }

/* ---- Admin: dropzone + upload progress ---- */
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--parchment);
  padding: 1.75rem 1rem;
  text-align: center;
  cursor: pointer;
  color: var(--text-soft);
  transition: border-color var(--ease), background var(--ease);
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--forest); background: #efe8d8; }
.dropzone.is-over { border-color: var(--campfire-deep); background: #f3e2d5; color: var(--pine); }
.dropzone strong { color: var(--pine); }
.upload-list { list-style: none; margin: 0.9rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.upload-item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.5rem 0.75rem; font-size: 0.9rem; }
.upload-name { grid-column: 1 / 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-status { grid-column: 2 / 3; grid-row: 1 / 2; color: var(--text-soft); }
.upload-bar { grid-column: 1 / 3; height: 6px; background: var(--khaki-200); border-radius: 999px; overflow: hidden; }
.upload-bar__fill { display: block; height: 100%; width: 0; background: var(--forest); transition: width 160ms linear; }
.upload-item.done .upload-status { color: #245c2e; }
.upload-item.done .upload-bar__fill { background: #2f6f4f; }
.upload-item.err .upload-status { color: #b23b1e; }
.upload-item.err .upload-bar__fill { background: #b23b1e; }

/* ---- Admin: album edit rows ---- */
.album-row { display: grid; grid-template-columns: 1fr auto auto; gap: 0.5rem; align-items: center; margin-bottom: 0.4rem; }
@media (max-width: 520px) { .album-row { grid-template-columns: 1fr; } }

/* ---- Admin: media grid ---- */
.media-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.media-admin__item {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
  display: flex;
  flex-direction: column;
}
.media-admin__thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--khaki-200); display: block; }
.media-admin__badge { position: absolute; top: 6px; left: 6px; background: rgba(31,46,36,0.82); color: #fff; font-size: 0.7rem; padding: 1px 7px; border-radius: 999px; }
.media-admin__form { padding: 0.55rem; display: grid; gap: 0.4rem; }
.media-admin__form .input { padding: 0.4rem 0.5rem; min-height: 36px; font-size: 0.9rem; }
.media-admin__actions { display: flex; justify-content: flex-end; }
.media-admin__del { margin: 0 0.55rem 0.55rem; }
