
:root {
  --green-950: #073b18;
  --green-900: #0a4f20;
  --green-800: #0f6428;
  --green-700: #14752b;
  --green-600: #1b8b35;
  --green-500: #25a244;
  --green-200: #bfe7c8;
  --green-100: #e9f7ec;
  --green-050: #f5fbf6;
  --white: #ffffff;
  --ink: #152019;
  --muted: #667169;
  --line: #dce7df;
  --surface: #ffffff;
  --surface-soft: #f6faf7;
  --shadow: 0 16px 40px rgba(6, 70, 25, .10);
  --radius: 22px;
}

html[data-theme="dark"] {
  --white: #101713;
  --ink: #edf8ef;
  --muted: #aab8ad;
  --line: #2c3c31;
  --surface: #142019;
  --surface-soft: #0e1711;
  --green-050: #101a13;
  --green-100: #193221;
  --shadow: 0 16px 40px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface-soft);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
img { display: block; max-width: 100%; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px clamp(18px, 4vw, 64px);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  font-weight: 850;
  font-size: 1.18rem;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, var(--green-600), var(--green-900));
  border: 3px solid var(--green-200);
  box-shadow: 0 5px 14px rgba(10, 100, 40, .22);
}

.brand-name { color: var(--green-800); }

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
}

.desktop-nav a {
  padding: 10px 14px;
  color: var(--muted);
  border-radius: 12px;
  font-weight: 700;
}

.desktop-nav a:hover,
.desktop-nav a:focus-visible {
  color: var(--green-800);
  background: var(--green-100);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--green-800);
  cursor: pointer;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 750;
}

.avatar-fallback {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--green-700);
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--green-800);
  font-weight: 750;
  cursor: pointer;
}

.page-shell {
  width: min(1440px, calc(100% - 40px));
  margin: 28px auto 70px;
}

.messages { margin-bottom: 18px; }
.message {
  padding: 13px 16px;
  border: 1px solid var(--green-200);
  border-radius: 14px;
  background: var(--green-100);
  color: var(--green-900);
}

.hero {
  min-height: 500px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 6vw, 86px);
  background:
    radial-gradient(circle at 95% 12%, rgba(37, 162, 68, .10), transparent 40%),
    linear-gradient(135deg, var(--surface), var(--green-050));
}

.eyebrow,
.card-kicker {
  margin: 0 0 8px;
  color: var(--green-700);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: var(--green-800);
  font-size: clamp(3.1rem, 7vw, 6.5rem);
  line-height: .98;
  letter-spacing: -.055em;
}

.hero-tagline {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid var(--green-700);
  border-radius: 13px;
  background: var(--green-700);
  color: white;
  font-weight: 850;
  box-shadow: 0 8px 20px rgba(20, 117, 43, .18);
  transition: transform .18s ease, background .18s ease;
}

.button:hover { background: var(--green-800); transform: translateY(-1px); }
.button-small { min-height: 40px; padding: 8px 15px; }
.button-outline { background: transparent; color: var(--green-800); box-shadow: none; }
.button-outline:hover { background: var(--green-100); }

.feature-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 54px;
}

.feature-row > div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
}

.feature-icon {
  grid-row: span 2;
  color: var(--green-600);
  font-weight: 900;
}

.feature-row strong { color: var(--green-900); font-size: .86rem; }
.feature-row small { color: var(--muted); font-size: .76rem; }

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 500px;
  overflow: hidden;
  background:
    radial-gradient(circle at 65% 25%, rgba(255,255,255,.7), transparent 25%),
    linear-gradient(145deg, var(--green-100), var(--green-600));
}

.hero-visual::before,
.hero-visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
}
.hero-visual::before { width: 360px; height: 360px; top: -80px; right: -80px; }
.hero-visual::after { width: 280px; height: 280px; bottom: -100px; left: -70px; }

.table-scene {
  position: relative;
  width: min(410px, 74%);
  aspect-ratio: 1;
  filter: drop-shadow(0 30px 42px rgba(0, 56, 18, .24));
}

.table-top {
  position: absolute;
  inset: 15%;
  border: 10px solid rgba(255,255,255,.88);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255,255,255,.96) 0 32%, rgba(233,247,236,.98) 33% 62%, rgba(255,255,255,.92) 63%);
  box-shadow:
    inset 0 0 0 2px rgba(20,117,43,.10),
    0 22px 45px rgba(0,65,22,.18);
}

.table-monogram {
  position: absolute;
  inset: 34%;
  display: grid;
  place-items: center;
  border: 3px solid var(--green-200);
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, var(--green-600), var(--green-900));
  font-size: clamp(1.4rem, 4vw, 2.5rem);
  font-weight: 950;
  letter-spacing: -.05em;
}

.chair {
  position: absolute;
  width: 24%;
  height: 13%;
  border: 6px solid rgba(255,255,255,.9);
  border-radius: 999px 999px 14px 14px;
  background: var(--green-800);
  box-shadow: 0 12px 24px rgba(0,65,22,.18);
}

.chair-top {
  top: 0;
  left: 38%;
}

.chair-right {
  top: 43%;
  right: -1%;
  transform: rotate(90deg);
}

.chair-bottom {
  left: 38%;
  bottom: 0;
  transform: rotate(180deg);
}

.chair-left {
  top: 43%;
  left: -1%;
  transform: rotate(-90deg);
}

.place-setting {
  position: absolute;
  width: 22%;
  height: 22%;
}

.setting-one { top: 4%; left: 39%; }
.setting-two { top: 39%; right: 4%; transform: rotate(90deg); }
.setting-three { bottom: 4%; left: 39%; transform: rotate(180deg); }
.setting-four { top: 39%; left: 4%; transform: rotate(-90deg); }

.mini-plate {
  position: absolute;
  inset: 20%;
  border: 3px solid var(--green-200);
  border-radius: 50%;
  background: white;
  box-shadow: inset 0 0 0 5px #f6faf7;
}

.fork,
.knife {
  position: absolute;
  top: 28%;
  width: 4%;
  height: 46%;
  border-radius: 999px;
  background: var(--green-700);
}

.fork { left: 8%; }
.knife { right: 8%; }

.member-badge {
  position: absolute;
  right: 7%;
  bottom: 12%;
  width: 126px;
  height: 126px;
  display: grid;
  place-content: center;
  text-align: center;
  color: white;
  border: 5px solid white;
  border-radius: 50%;
  background: var(--green-800);
  box-shadow: 0 12px 28px rgba(0,0,0,.2);
}
.member-badge strong { font-size: 2rem; }
.member-badge span { font-size: .78rem; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 20px;
}

.card, .panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(6, 70, 25, .06);
}

.card { padding: 24px; }
.card h2, .panel h2 { margin: 0; font-size: 1.2rem; }
.card-heading { display: flex; gap: 14px; align-items: flex-start; }
.card-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green-800);
  background: var(--green-100);
  font-weight: 900;
}
.muted { color: var(--muted); }

.mini-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 20px;
  text-align: center;
}
.mini-stats strong { display: block; color: var(--green-700); font-size: 1.5rem; }
.mini-stats span { display: block; color: var(--muted); font-size: .76rem; }

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
.panel { padding: 24px; }
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.inline-link { color: var(--green-700); font-weight: 800; }

.result-list { display: grid; }
.result-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.result-row:last-child { border-bottom: 0; }
.result-rank {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green-800);
  background: var(--green-100);
  font-weight: 900;
}
.result-row small { display: block; color: var(--muted); }
.rating { color: var(--green-700); font-weight: 850; }

.empty-state {
  min-height: 180px;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
}
.empty-state strong { color: var(--ink); }
.empty-state span { display: block; margin-top: 6px; }

.photo-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-auto-rows: 125px;
  gap: 10px;
}
.photo-grid a, .photo-placeholder {
  overflow: hidden;
  border-radius: 14px;
}
.photo-grid a:first-child, .photo-placeholder.large { grid-row: span 2; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder {
  display: grid;
  place-items: center;
  color: var(--green-800);
  background: linear-gradient(135deg, var(--green-100), var(--green-200));
  font-weight: 900;
}

.site-footer {
  min-height: 120px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  padding: 30px clamp(22px, 5vw, 72px);
  color: white;
  background: var(--green-900);
}
.site-footer div { display: grid; }
.site-footer span { opacity: .82; font-size: .88rem; }

.mobile-nav { display: none; }

@media (max-width: 1050px) {
  .desktop-nav { display: none; }
  .header-actions { margin-left: auto; }
  .hero { grid-template-columns: 1fr; }
  .hero-visual { min-height: 360px; }
  .feature-row { margin-top: 36px; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .stats-card { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  body { padding-bottom: 72px; }
  .site-header { min-height: 64px; padding: 10px 14px; }
  .brand-name { font-size: 1rem; }
  .brand-mark { width: 38px; height: 38px; }
  .user-chip span:last-child,
  .header-actions form,
  .text-button { display: none; }

  .page-shell { width: min(100% - 24px, 680px); margin-top: 14px; }
  .hero { border-radius: 22px; min-height: auto; }
  .hero-copy { padding: 34px 24px; }
  .hero h1 { font-size: clamp(3rem, 16vw, 4.8rem); }
  .hero-visual { min-height: 300px; }
  .member-badge { width: 96px; height: 96px; }
  .member-badge strong { font-size: 1.5rem; }

  .feature-row { grid-template-columns: 1fr 1fr; gap: 20px 12px; }
  .hero-actions .button { flex: 1 1 100%; }

  .dashboard-grid,
  .content-grid { grid-template-columns: 1fr; }
  .stats-card { grid-column: auto; }
  .mini-stats { grid-template-columns: 1fr 1fr; gap: 18px; }

  .photo-grid { grid-auto-rows: 100px; }

  .mobile-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: 0 12px 30px rgba(0,0,0,.16);
    backdrop-filter: blur(16px);
  }
  .mobile-nav a {
    display: grid;
    place-items: center;
    gap: 2px;
    color: var(--muted);
    font-size: .7rem;
    font-weight: 800;
  }
  .mobile-nav span { color: var(--green-700); font-size: 1.2rem; }
  .site-footer { display: none; }
}

@media (max-width: 420px) {
  .theme-toggle { width: 38px; height: 38px; }
  .hero-copy { padding: 30px 20px; }
  .feature-row { grid-template-columns: 1fr; }
  .hero-visual { min-height: 250px; }
}

/* Member photo gallery */
.gallery-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}
.gallery-title h1 { margin: 0; color: var(--green-800); font-size: clamp(2.3rem, 6vw, 4.5rem); line-height: 1; }
.gallery-title p:last-child { max-width: 720px; color: var(--muted); }
.photo-upload-panel { margin-bottom: 20px; }
.gallery-upload-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.gallery-upload-form label { display: grid; gap: 8px; color: var(--ink); font-weight: 800; }
.gallery-upload-form label > span small { color: var(--muted); font-weight: 600; }
.gallery-upload-form .upload-file-field { grid-row: span 2; }
.gallery-upload-form .button { justify-self: start; }
.upload-note { margin: 0; align-self: center; }
.form-control {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.drop-zone {
  min-height: 150px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 22px;
  text-align: center;
  color: var(--green-800);
  border: 2px dashed var(--green-200);
  border-radius: 16px;
  background: var(--green-050);
}
.drop-zone input { max-width: 100%; }
.errorlist { margin: 0; padding-left: 18px; color: #b42318; font-size: .88rem; }
.full-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.gallery-card { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-soft); }
.gallery-card a { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--green-100); }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.gallery-card:hover img { transform: scale(1.025); }
.gallery-card figcaption { display: grid; gap: 3px; padding: 14px; }
.gallery-card figcaption span, .gallery-card figcaption small { color: var(--muted); }
.gallery-empty { grid-column: 1 / -1; }

@media (max-width: 900px) {
  .full-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .gallery-title { align-items: stretch; flex-direction: column; }
  .gallery-upload-form { grid-template-columns: 1fr; }
  .gallery-upload-form .upload-file-field { grid-row: auto; }
  .full-gallery { grid-template-columns: 1fr; }
}
