:root {
  --gs-green: #00847d;
  --gs-green-dark: #00615c;
  --gs-green-light: #e3f4f2;
  --gs-gold: #f2a900;
  --text: #23302e;
  --muted: #6b7876;
  --border: #d8e6e4;
  --bg: #f7faf9;
  --card-bg: #ffffff;
  --danger: #b3261e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--gs-green-dark); }

.site-header {
  background: var(--gs-green);
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  color: white;
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.trefoil, .trefoil-big { line-height: 1; display: inline-flex; align-items: center; }
.trefoil { font-size: 1.6rem; }
.trefoil-big { font-size: 3rem; color: var(--gs-green); justify-content: center; }
.trefoil-icon { width: 1em; height: 1em; display: block; }

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.main-nav a {
  color: white;
  text-decoration: none;
  opacity: 0.85;
  font-size: 0.92rem;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover, .main-nav a.active {
  opacity: 1;
  border-bottom: 2px solid var(--gs-gold);
}

.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 22px;
}

.hero {
  text-align: center;
  padding: 20px 10px 6px;
}

.hero h1 { margin-bottom: 4px; color: var(--gs-green-dark); }
.hero-sub { font-size: 1.05rem; color: var(--text); margin: 4px 0; }
.meeting-info { color: var(--muted); }

.hero-banner {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin: 16px 0 22px;
  aspect-ratio: 16 / 8;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}

.hero-banner-overlay {
  width: 100%;
  padding: 24px 22px 20px;
  background: linear-gradient(180deg, rgba(0,40,38,0) 0%, rgba(0,40,38,0.55) 55%, rgba(0,40,38,0.85) 100%);
  color: white;
}

.hero-banner-overlay h1 {
  margin: 0 0 4px;
  color: white;
  font-size: 1.8rem;
}

.hero-banner-overlay .hero-sub {
  margin: 0 0 4px;
  color: #eafaf8;
  font-weight: 600;
}

.hero-banner-overlay .meeting-info {
  color: #d6f0ec;
  margin: 0;
}

.adventure-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 14px 0;
}

.adventure-row figure {
  margin: 0;
}

.adventure-row img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.adventure-row figcaption {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin-top: 5px;
}

.cookie-teaser-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cookie-teaser-inner img {
  width: 160px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

.cookie-teaser-inner h2 { margin-top: 0; }

@media (max-width: 600px) {
  .hero-banner { aspect-ratio: 4 / 5; }
  .adventure-row { grid-template-columns: repeat(2, 1fr); }
  .cookie-teaser-inner { flex-direction: column; align-items: flex-start; }
  .cookie-teaser-inner img { width: 100%; height: 160px; }
}

.highlight-card {
  background: linear-gradient(135deg, var(--gs-green-light), #ffffff);
  border-left: 5px solid var(--gs-gold);
}

.event-date { font-weight: 700; color: var(--gs-green-dark); margin-bottom: 2px; }

.muted { color: var(--muted); }

.btn {
  display: inline-block;
  background: var(--gs-green);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--gs-green-dark); }
.btn-small { padding: 6px 12px; font-size: 0.85rem; }
.btn-outline {
  background: transparent;
  color: var(--gs-green-dark);
  border: 1px solid var(--gs-green);
}
.btn-outline:hover { background: var(--gs-green-light); }

.link-btn {
  background: none;
  border: none;
  color: var(--danger);
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.82rem;
  padding: 0;
}

.inline-form { display: inline; }

.stacked-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  max-width: 480px;
}

.stacked-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--muted);
}

.stacked-form input, .stacked-form textarea, .stacked-form select {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.add-form-details summary {
  cursor: pointer;
  color: var(--gs-green-dark);
  font-weight: 600;
  margin-top: 6px;
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px;
  margin-top: 14px;
}

.roster-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin: -4px 0 6px;
}

.leadership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.leadership-card {
  background: var(--gs-green-light);
  border-radius: 10px;
  padding: 16px;
}

.leadership-card h3 {
  margin: 0 0 6px;
  color: var(--gs-green-dark);
}

.leadership-card .leader-name {
  font-weight: 600;
  margin: 0 0 4px;
}

.leadership-open {
  background: #fff4e5;
  border: 1px dashed var(--gs-gold);
}

.open-badge {
  color: #8a5a00;
  font-weight: 600;
  font-size: 0.88rem;
}

.roster-card {
  text-align: center;
  background: var(--gs-green-light);
  border-radius: 10px;
  padding: 14px 10px;
}

.roster-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 8px;
  display: block;
}

.placeholder-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gs-green);
  color: white;
  font-size: 2rem;
  font-weight: 700;
}

.roster-card h3 { margin: 4px 0; font-size: 1rem; }
.roster-card .blurb { font-size: 0.85rem; color: var(--muted); min-height: 2.4em; }

.event-list { display: flex; flex-direction: column; gap: 14px; }

.event-row {
  display: flex;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

.special-event { border-left: 5px solid var(--gs-gold); background: var(--gs-green-light); }

.event-date-badge {
  flex: 0 0 100px;
  font-weight: 700;
  color: var(--gs-green-dark);
}

.event-body { flex: 1; }
.event-body h3 { margin: 0 0 4px; }
.event-body p, .plan-text { white-space: pre-line; }

.claimed-badge { color: var(--gs-green-dark); font-weight: 600; }
.snack-badge { color: #8a5a00; font-weight: 600; }
.claim-link { color: var(--gs-green-dark); cursor: pointer; font-weight: 600; }

.badge-block {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--gs-green-light);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 8px 0;
}

.badge-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: white;
}

.badge-name {
  font-weight: 700;
  color: var(--gs-green-dark);
  margin: 4px 0 4px;
}

.badge-bullets {
  margin: 0;
  padding-left: 18px;
  font-size: 0.86rem;
  color: var(--text);
}

.badge-bullets li { margin-bottom: 2px; }

.move-badge-details {
  margin-top: 8px;
}

.move-badge-details summary {
  font-size: 0.82rem;
}

.doc-list {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.doc-list li:last-child { border-bottom: none; }

.rsvp-event-title { margin-top: 0; color: var(--gs-green-dark); }

.rsvp-girl-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 560px;
}

.rsvp-girl-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.rsvp-girl-row:last-child { border-bottom: none; }

.rsvp-girl-name { font-weight: 600; }

.rsvp-choices {
  display: flex;
  gap: 14px;
}

.rsvp-choice {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
}

.rsvp-summary-line {
  font-size: 0.88rem;
  color: var(--gs-green-dark);
  font-weight: 600;
  margin: 6px 0;
}

main img {
  cursor: zoom-in;
}

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 18, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 30px;
  cursor: zoom-out;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-overlay img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
  cursor: default;
}

.trefoil-field {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 100px;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

/* Anchored to the edges of the centered 900px .page column (see .page,
   max-width 900px => half-width 450px) plus a small gap, so the falling
   shapes drift close to the body text instead of clinging to the far
   edges of a wide browser window. */
.trefoil-field-left { left: calc(50% - 562px); }
.trefoil-field-right { right: calc(50% - 562px); }

.trefoil-fall {
  position: absolute;
  top: 0;
  display: block;
  animation-name: trefoil-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.trefoil-sway {
  display: block;
  animation-name: trefoil-sway;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.trefoil-spin {
  display: inline-block;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.12));
  animation-name: trefoil-spin;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.trefoil-spin svg { display: block; width: 100%; height: 100%; }
.trefoil-spin { color: var(--gs-green); }

@keyframes trefoil-fall {
  0%   { transform: translateY(-10vh); opacity: 0; }
  8%   { opacity: var(--op, 0.5); }
  92%  { opacity: var(--op, 0.5); }
  100% { transform: translateY(110vh); opacity: 0; }
}

@keyframes trefoil-sway {
  0%   { transform: translateX(var(--s1, 0px)); }
  25%  { transform: translateX(var(--s2, 0px)); }
  50%  { transform: translateX(var(--s3, 0px)); }
  75%  { transform: translateX(var(--s4, 0px)); }
  100% { transform: translateX(var(--s1, 0px)); }
}

@keyframes trefoil-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@media (max-width: 1150px) {
  .trefoil-field { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .trefoil-field { display: none; }
}

.event-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th, .data-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.balance { font-size: 1.3rem; font-weight: 700; color: var(--gs-green-dark); }
.balance-negative { color: var(--danger); }
.amount-positive { color: var(--gs-green-dark); }
.amount-negative { color: var(--danger); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
}

.gallery-caption { font-size: 0.82rem; color: var(--muted); margin: 4px 0 0; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.info-box {
  background: var(--gs-green-light);
  border-radius: 10px;
  padding: 14px 16px;
}
.info-box h3 { margin-top: 0; color: var(--gs-green-dark); }

.flash-box {
  background: #fff4e5;
  border: 1px solid var(--gs-gold);
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 16px;
}

.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
}

.login-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 32px;
  text-align: center;
  max-width: 320px;
  width: 100%;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.login-card input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
}

.error { color: var(--danger); font-size: 0.9rem; }

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 20px;
}

@media (max-width: 600px) {
  .two-col { grid-template-columns: 1fr; }
  .event-row { flex-direction: column; }
  .event-date-badge { flex: none; }
}
