:root {
  --bg: #edf2f8;
  --bg-strong: #dfe7f1;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --text: #141a23;
  --muted: #556171;
  --accent: #1d5fb8;
  --accent-dark: #184989;
  --forest: #1a2230;
  --forest-soft: #2f415a;
  --line: rgba(20, 26, 35, 0.12);
  --shadow: 0 24px 80px rgba(20, 34, 48, 0.15);
  --radius-lg: 32px;
  --radius-md: 22px;
  --radius-sm: 16px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(29, 95, 184, 0.22), transparent 25%),
    radial-gradient(circle at top right, rgba(95, 107, 125, 0.2), transparent 28%),
    linear-gradient(180deg, #f7fafe 0%, #e8eef6 100%);
  font-family: "Inter", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  opacity: 0.28;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
li {
  line-height: 1.7;
}

.site-shell {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.site-header,
.site-footer,
.panel,
.hero-card {
  backdrop-filter: blur(18px);
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 999px;
  background: rgba(249, 251, 255, 0.78);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 132px;
  height: 132px;
  margin: -18px 0 -18px -6px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 10px 22px rgba(24, 73, 137, 0.18));
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-text strong,
.eyebrow,
.panel-kicker,
.nav-toggle,
.button,
.site-nav a {
  letter-spacing: 0.04em;
}

.brand-text strong {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2.1rem;
  font-weight: 400;
  line-height: 0.95;
}

.brand-text span {
  color: var(--muted);
  font-size: 0.92rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.site-nav a,
.nav-toggle {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  color: var(--accent-dark);
  background: rgba(29, 95, 184, 0.1);
}

.nav-toggle {
  display: none;
  border: 0;
  background: rgba(29, 95, 184, 0.1);
  cursor: pointer;
}

.hero,
.section-grid,
.page-hero {
  margin-bottom: 24px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: stretch;
}

.hero-visual {
  display: grid;
  gap: 20px;
}

.hero-copy,
.page-hero {
  padding: 36px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(26, 34, 48, 0.96), rgba(24, 73, 137, 0.92)),
    var(--forest);
  color: #f8f4ed;
  box-shadow: var(--shadow);
}

.page-hero {
  width: 100%;
  max-width: none;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 12px;
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  color: rgba(248, 244, 237, 0.72);
}

.panel-kicker {
  color: var(--accent-dark);
}

.hero h1,
.page-hero h1,
.panel h2,
.hero-card h2 {
  margin: 0;
  line-height: 0.96;
}

.hero h1,
.page-hero h1 {
  max-width: 12ch;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(3.4rem, 9vw, 7rem);
  font-weight: 400;
}

.hero-text,
.page-hero p {
  max-width: 62ch;
  margin-top: 18px;
  font-size: 1.06rem;
  color: rgba(248, 244, 237, 0.82);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 800;
  text-transform: uppercase;
}

.button-primary {
  color: #f7fbff;
  background: linear-gradient(135deg, var(--accent), #6d7682);
  box-shadow: 0 16px 40px rgba(29, 95, 184, 0.24);
}

.button-secondary,
.button-ghost {
  color: #fffaf4;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.button-ghost {
  color: var(--accent-dark);
  border-color: rgba(29, 95, 184, 0.14);
  background: rgba(29, 95, 184, 0.06);
}

.hero-card,
.panel,
.site-footer {
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow);
}

.hero-photo-card {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-photo-card::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 26, 35, 0.02), rgba(20, 26, 35, 0.32)),
    linear-gradient(135deg, rgba(29, 95, 184, 0.12), transparent 45%);
  content: "";
  pointer-events: none;
}

.hero-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(29, 95, 184, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(250, 252, 255, 0.92), rgba(255, 255, 255, 0.76));
}

.hero-card::after {
  position: absolute;
  right: -28px;
  bottom: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(24, 73, 137, 0.08);
  content: "";
}

.hero-card-label {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-logo {
  display: block;
  width: min(240px, 100%);
  margin: 24px 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 40px rgba(20, 34, 48, 0.16));
}

.hero-card h2,
.panel h2 {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.hero-points,
.feature-list,
.year-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.hero-points li,
.feature-list li,
.year-list li {
  position: relative;
  padding-left: 18px;
}

.hero-points li + li,
.feature-list li + li,
.year-list li + li {
  margin-top: 10px;
}

.hero-points li::before,
.feature-list li::before,
.year-list li::before {
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
  transform: translateY(-50%);
}

.section-grid {
  display: grid;
  gap: 24px;
}

.intro-grid,
.timeline-grid,
.cards-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.event-board,
.story-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

.panel {
  padding: 28px;
  border-radius: var(--radius-md);
  background: var(--surface);
}

.panel-highlight {
  background:
    radial-gradient(circle at top left, rgba(29, 95, 184, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(251, 253, 255, 0.94), rgba(255, 255, 255, 0.8));
}

.panel-dark {
  background:
    linear-gradient(135deg, rgba(26, 34, 48, 0.96), rgba(47, 65, 90, 0.92)),
    var(--forest);
  color: #f8f4ed;
}

.panel-dark .panel-kicker {
  color: rgba(248, 244, 237, 0.74);
}

.panel-span-full {
  grid-column: 1 / -1;
}

.panel p:last-child {
  margin-bottom: 0;
}

.text-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--accent-dark);
  font-weight: 800;
}

.text-link:hover,
.text-link:focus-visible {
  text-decoration: underline;
}

.text-link-light {
  color: #f7fbff;
}

.subpage-main {
  display: flex;
  flex-direction: column;
}

.archive-list {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}

.archive-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.archive-item h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
}

.archive-item-content {
  min-width: 0;
}

.archive-item-copy {
  margin: 10px 0 0;
  color: var(--muted);
}

.archive-meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.qr-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: center;
}

.qr-card img {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(20, 26, 35, 0.08);
  background: #fff;
}

.qr-card p {
  margin: 0;
}

.qr-card p + p {
  margin-top: 12px;
}

.members-section {
  margin-bottom: 24px;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.member-card {
  overflow: hidden;
  border: 1px solid rgba(20, 26, 35, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.member-card img,
.member-card-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(26, 34, 48, 0.96), rgba(24, 73, 137, 0.92));
}

.member-card h3 {
  margin: 0;
  padding: 14px 12px 16px;
  font-size: 0.96rem;
  line-height: 1.35;
}

.member-card-placeholder {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.78);
  font-family: "Bebas Neue", sans-serif;
  font-size: 2rem;
  letter-spacing: 0.08em;
}

.table-wrap {
  overflow-x: auto;
}

.info-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 0.98rem;
}

.info-table th,
.info-table td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.info-table thead th {
  color: #f7fbff;
  background: linear-gradient(135deg, var(--accent-dark), var(--forest-soft));
}

.feature-list-tight li + li {
  margin-top: 6px;
}

.year-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}

.year-list li + li {
  margin-top: 0;
}

.year-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.year-link-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 78px;
  border: 1px solid rgba(29, 95, 184, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent-dark);
  font-family: "Bebas Neue", sans-serif;
  font-size: 2rem;
  letter-spacing: 0.05em;
}

.year-link-card:hover,
.year-link-card:focus-visible {
  background: rgba(29, 95, 184, 0.08);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.gallery-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.gallery-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.gallery-card-body {
  padding: 24px;
}

.gallery-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.event-selector-panel {
  margin-bottom: 24px;
}

.event-table {
  margin-top: 18px;
}

.event-table-head,
.event-row {
  display: grid;
  grid-template-columns:
    minmax(220px, 2.1fr)
    minmax(120px, 0.95fr)
    minmax(170px, 1.15fr)
    minmax(130px, 1fr)
    minmax(110px, 0.8fr)
    minmax(70px, 0.55fr);
  gap: 14px;
  align-items: center;
}

.event-table-head {
  padding: 0 18px 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.event-row {
  width: 100%;
  margin-top: 10px;
  padding: 18px;
  border: 1px solid rgba(20, 26, 35, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.event-link-row {
  text-decoration: none;
}

.event-cell {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.event-cell-label {
  display: none;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.event-row strong {
  font-size: 1.32rem;
  color: var(--accent-dark);
  font-weight: 800;
}

.event-row span,
.event-cell-value {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.event-row .event-cell-value-attendance {
  color: var(--accent-dark);
  font-weight: 800;
}

.event-row:hover,
.event-row:focus-visible,
.event-row.is-active {
  border-color: rgba(29, 95, 184, 0.34);
  box-shadow: 0 18px 34px rgba(20, 34, 48, 0.12);
  transform: translateY(-2px);
}

.event-row.is-active {
  background: linear-gradient(135deg, rgba(29, 95, 184, 0.12), rgba(255, 255, 255, 0.9));
}

.signup-form {
  display: grid;
  gap: 16px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field span {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid rgba(20, 26, 35, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font: inherit;
}

.form-field textarea {
  min-height: 140px;
  padding: 14px 16px;
  resize: vertical;
}

.form-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.signup-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.form-note,
.form-message {
  margin: 0;
  color: var(--muted);
}

.form-message {
  font-weight: 700;
}

.closed-signup-message {
  margin: 18px 0 10px;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--forest);
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-toolbar p {
  margin: 0;
}

.admin-summary {
  color: var(--muted);
  font-weight: 700;
}

.admin-table-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
}

.admin-payments-table td:last-child,
.admin-payments-table th:last-child {
  text-align: center;
}

.admin-checkbox {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
  cursor: pointer;
}

.admin-login-note {
  color: var(--muted);
}

.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.admin-card-link {
  display: block;
  height: 100%;
}

.admin-card-link .panel {
  height: 100%;
}

.admin-status-inline {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(29, 95, 184, 0.1);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.admin-form-grid .form-field.form-field-wide {
  grid-column: 1 / -1;
}

.upload-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(20, 26, 35, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.56);
}

.upload-panel h3 {
  margin: 0;
}

.upload-file-box {
  padding: 16px 18px;
  border: 1px dashed rgba(29, 95, 184, 0.28);
  border-radius: 18px;
  background: rgba(29, 95, 184, 0.05);
}

.upload-file-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.upload-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.upload-progress-panel {
  display: grid;
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
  padding: 32px;
  border: 1px solid rgba(20, 26, 35, 0.1);
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(29, 95, 184, 0.16), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(235, 241, 251, 0.96));
}

.upload-progress-panel h3 {
  margin: 0;
}

.upload-progress-lead {
  margin: 0;
  color: var(--accent-dark);
  font-size: 1.05rem;
  font-weight: 700;
}

.upload-progress-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--accent-dark);
}

.upload-progress-bar {
  overflow: hidden;
  height: 18px;
  border-radius: 999px;
  background: rgba(20, 34, 48, 0.1);
  box-shadow: inset 0 1px 3px rgba(20, 34, 48, 0.08);
}

.upload-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1d5fb8, #2aa2ff);
  transition: width 220ms ease;
}

.admin-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.admin-photo-card {
  overflow: hidden;
  border: 1px solid rgba(20, 26, 35, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
}

.admin-photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.admin-photo-card-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.admin-photo-name {
  margin: 0;
  color: var(--accent-dark);
  font-weight: 800;
  word-break: break-word;
}

.admin-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(20, 26, 35, 0.1);
}

.button-danger {
  color: #fff4f4;
  background: linear-gradient(135deg, #b3261e, #7a1812);
  box-shadow: 0 16px 36px rgba(122, 24, 18, 0.24);
}

.status-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.section-heading-block {
  margin-bottom: 16px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-title-row h2 {
  margin: 0;
}

.section-count-caption {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  padding: 18px 24px;
  border: 1px solid rgba(29, 95, 184, 0.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(29, 95, 184, 0.18), transparent 48%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(228, 237, 252, 0.98));
  color: var(--accent-dark);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 16px 34px rgba(20, 34, 48, 0.08);
  white-space: nowrap;
}

.status-column {
  padding: 18px;
  border: 1px solid rgba(20, 26, 35, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.status-column h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.status-column ul {
  margin: 0;
  padding-left: 18px;
}

.status-note {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(29, 95, 184, 0.1);
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

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

.payment-progress {
  margin-top: 18px;
}

.payment-progress p {
  margin: 10px 0 0;
  font-weight: 700;
}

.payment-progress-bar {
  overflow: hidden;
  height: 14px;
  border-radius: 999px;
  background: rgba(20, 26, 35, 0.08);
}

.payment-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), #6d7682);
}

.payment-followup {
  margin-top: 18px;
}

.payment-followup h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.payment-followup-list {
  margin: 0;
  padding-left: 18px;
}

.detail-stack {
  display: grid;
  gap: 24px;
  margin-bottom: 24px;
}

.detail-panel {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.detail-panel h2 {
  margin: 0 0 16px;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
}

.detail-article-copy .detail-header {
  margin-bottom: 22px;
}

.article-richtext {
  color: var(--forest);
}

.article-richtext > *:first-child {
  margin-top: 0;
}

.article-richtext > *:last-child {
  margin-bottom: 0;
}

.article-richtext p + p {
  margin-top: 16px;
}

.article-richtext img,
.article-inline-image {
  max-width: min(320px, 100%);
  height: auto;
  margin: 0 18px 18px 0;
  border-radius: 18px;
  float: left;
  box-shadow: 0 18px 42px rgba(20, 34, 48, 0.14);
}

.preview-shot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.preview-shot {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(20, 26, 35, 0.08);
  background: var(--surface-strong);
}

.preview-shot img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-preview-strip {
  display: grid;
  gap: 18px;
}

.gallery-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.gallery-preview-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.archive-empty-state {
  padding: 24px 26px;
  border: 1px dashed rgba(29, 95, 184, 0.26);
  border-radius: var(--radius-md);
  background: rgba(29, 95, 184, 0.05);
  color: var(--muted);
  font-weight: 700;
}

.selector-stack {
  display: grid;
  gap: 14px;
}

.gallery-summary {
  margin: 0 0 20px;
  color: var(--muted);
  font-weight: 600;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.photo-card {
  display: grid;
  gap: 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(20, 26, 35, 0.08);
  background: rgba(255, 255, 255, 0.92);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.photo-card:hover,
.photo-card:focus-visible,
.preview-shot:hover,
.preview-shot:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(20, 34, 48, 0.12);
}

.photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.photo-card span {
  padding: 12px 14px;
  color: var(--accent-dark);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
}

body.lightbox-open {
  overflow: hidden;
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.gallery-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 18, 0.82);
  backdrop-filter: blur(4px);
}

.gallery-lightbox-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  width: min(92vw, 1400px);
  height: 100dvh;
  margin: 0 auto;
  padding: 32px 0;
}

.gallery-lightbox-figure {
  margin: 0;
  display: grid;
  gap: 14px;
  min-width: 0;
}

.gallery-lightbox-image {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 150px);
  object-fit: contain;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
}

.gallery-lightbox-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: rgba(255, 255, 255, 0.94);
  font-weight: 700;
}

.gallery-lightbox-nav,
.gallery-lightbox-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: white;
  cursor: pointer;
}

.gallery-lightbox-nav {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 2rem;
}

.gallery-lightbox-close {
  position: absolute;
  top: 18px;
  right: 0;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 2rem;
  line-height: 1;
}

.gallery-lightbox-nav:hover,
.gallery-lightbox-nav:focus-visible,
.gallery-lightbox-close:hover,
.gallery-lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.24);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding: 24px 28px;
  border-radius: var(--radius-md);
  background: rgba(249, 251, 255, 0.78);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--forest);
  font-weight: 700;
}

@media (max-width: 1040px) {
  .hero,
  .intro-grid,
  .timeline-grid,
  .cards-2,
  .cards-3,
  .admin-card-grid,
  .event-board,
  .story-grid,
  .photo-grid,
  .preview-shot-grid,
  .status-columns {
    grid-template-columns: 1fr;
  }

  .hero-photo-card {
    min-height: 420px;
  }

  .site-header {
    border-radius: 30px;
  }

  .member-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .year-link-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-grid,
  .preview-shot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-table-head,
  .event-row {
    grid-template-columns:
      minmax(150px, 1.9fr)
      minmax(100px, 0.95fr)
      minmax(150px, 1.15fr)
      minmax(120px, 1fr)
      minmax(80px, 0.75fr)
      minmax(55px, 0.5fr);
  }

  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .archive-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .qr-card {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }

  .gallery-lightbox-dialog {
    width: min(96vw, 1120px);
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(calc(100% - 20px), var(--container));
    padding-top: 12px;
  }

  .site-header {
    top: 8px;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 28px;
  }

  .brand {
    gap: 8px;
    max-width: calc(100% - 78px);
  }

  .brand-logo {
    width: 88px;
    height: 88px;
    margin: -8px 0 -8px -2px;
  }

  .brand-text strong {
    font-size: 1.85rem;
  }

  .brand-text span {
    font-size: 0.82rem;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 8px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 14px;
  }

  .hero-copy,
  .page-hero,
  .panel,
  .hero-card,
  .site-footer,
  .detail-panel {
    padding: 24px;
  }

  .page-hero h1 {
    max-width: none;
    font-size: clamp(2.7rem, 13vw, 4.3rem);
  }

  .page-hero p {
    font-size: 1rem;
  }

  .hero-photo-card {
    min-height: 280px;
  }

  .hero h1,
  .page-hero h1 {
    max-width: none;
  }

  .member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .year-link-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .photo-grid,
  .preview-shot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-lightbox-dialog {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    width: min(100vw, 100%);
    padding: 68px 14px 18px;
  }

  .gallery-lightbox-close {
    top: 12px;
    right: 14px;
  }

  .gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    font-size: 1.6rem;
  }

  .gallery-lightbox-prev {
    left: 10px;
  }

  .gallery-lightbox-next {
    right: 10px;
  }

  .gallery-lightbox-image {
    max-height: calc(100dvh - 170px);
    border-radius: 18px;
  }

  .gallery-lightbox-caption {
    flex-direction: column;
    gap: 6px;
    font-size: 0.94rem;
  }

  .event-table-head {
    display: none;
  }

  .event-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  .event-cell {
    gap: 4px;
  }

  .event-cell-label {
    display: block;
  }

  .signup-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .signup-actions .button {
    width: 100%;
  }

  .form-note,
  .form-message {
    width: 100%;
  }

  .detail-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-count {
    min-width: 0;
    width: 100%;
    justify-content: flex-start;
  }

  .admin-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-table-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .hero-actions,
  .button {
    width: 100%;
  }

  .button {
    justify-content: center;
  }

  .year-list {
    grid-template-columns: 1fr;
  }

  .member-grid {
    grid-template-columns: 1fr;
  }

  .year-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-grid,
  .preview-shot-grid {
    grid-template-columns: 1fr;
  }

  .site-shell {
    width: min(calc(100% - 16px), var(--container));
  }

  .site-header {
    padding: 8px 12px;
  }

  .brand {
    max-width: calc(100% - 70px);
  }

  .brand-logo {
    width: 78px;
    height: 78px;
    margin: -6px 0 -6px 0;
  }

  .brand-text strong {
    font-size: 1.55rem;
  }

  .brand-text span {
    display: none;
  }

  .hero-copy,
  .page-hero,
  .panel,
  .hero-card,
  .site-footer,
  .detail-panel,
  .status-column {
    padding: 18px;
  }

  .page-hero h1 {
    font-size: clamp(2.2rem, 15vw, 3.2rem);
  }

  .panel h2 {
    font-size: clamp(1.45rem, 8vw, 2rem);
  }

  .event-row {
    margin-top: 8px;
    padding: 14px;
    border-radius: 16px;
  }

  .event-row strong {
    font-size: 1.5rem;
  }

  .event-row span,
  .event-cell-value {
    font-size: 0.9rem;
  }

  .event-row .event-cell-value-attendance {
    font-size: 1rem;
  }

  .form-field input,
  .form-field select {
    min-height: 46px;
    padding: 0 14px;
  }

  .status-columns {
    gap: 14px;
  }

  .section-count {
    padding: 16px 18px;
    font-size: 1.2rem;
  }

  .article-richtext img,
  .article-inline-image {
    float: none;
    margin-right: 0;
  }
}
