:root {
  --sand: #d1b06d;
  --sage: #53616f;
  --brown: #8b6b4a;
  --deep-blue: #0f1f2d;
  --cream: #f4f0e6;
  --shadow: rgba(0, 0, 0, 0.08);
  --font-family: 'Rubik', sans-serif;
  --jersey-top: #d1b06d;
  --jersey-mid: #b5884f;
  --jersey-bottom: #0f1f2d;
  --jersey-gradient: linear-gradient(180deg, var(--jersey-top) 0%, var(--jersey-mid) 38%, var(--jersey-bottom) 100%);
  --jersey-surface-gradient: linear-gradient(135deg, rgba(209, 176, 109, 0.93), rgba(15, 31, 45, 0.95));
  --jersey-scale-pattern: radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 55%);
  --jersey-scale-pattern-alt: radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 58%);
}

* {
  box-sizing: border-box;
}

body.theme-earthy {
  margin: 0;
  font-family: var(--font-family);
  background-image: var(--jersey-gradient), var(--jersey-scale-pattern), var(--jersey-scale-pattern-alt);
  background-size: cover, 140px 140px, 160px 160px;
  background-position: center, 0 0, 70px 70px;
  background-repeat: no-repeat, repeat, repeat;
  background-attachment: fixed, fixed, fixed;
  color: #1f2a30;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--deep-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.site-header {
  background-image: linear-gradient(180deg, rgba(209, 176, 109, 0.95) 0%, rgba(15, 31, 45, 0.96) 100%), var(--jersey-scale-pattern), var(--jersey-scale-pattern-alt);
  background-size: cover, 120px 120px, 140px 140px;
  background-position: center, 0 0, 60px 60px;
  background-repeat: no-repeat, repeat, repeat;
  background-blend-mode: normal, overlay, overlay;
  color: #fff;
  padding: 1rem 0;
  box-shadow: 0 2px 12px var(--shadow);
}

.site-header-inner {
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  text-decoration: none;
}

.branding:hover,
.branding:focus {
  color: #fff;
  text-decoration: none;
}

.branding .logo {
  width: 64px;
  height: 64px;
  padding: 0.5rem;
  border-radius: 16px;
  object-fit: contain;
  background-image: var(--jersey-surface-gradient), var(--jersey-scale-pattern), var(--jersey-scale-pattern-alt);
  background-size: cover, 120px 120px, 140px 140px;
  background-position: center, 0 0, 60px 60px;
  background-repeat: no-repeat, repeat, repeat;
  background-blend-mode: normal, overlay, overlay;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-name {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-tagline {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  margin-top: 0.5rem;
  background: linear-gradient(135deg, rgba(15, 31, 45, 0.95), rgba(15, 31, 45, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 0.4rem 0.75rem;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nav-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(9, 18, 26, 0.4);
}

.primary-nav {
  margin-left: auto;
}

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.nav-item a {
  color: #fff;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: background 0.2s ease;
}

.nav-item a:hover {
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
}

.nav-lock {
  font-size: 0.75rem;
  opacity: 0.75;
}

.nav-item.active a {
  background: rgba(255, 255, 255, 0.16);
}

.auth-actions {
  margin-left: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.home-card-toggle {
  background: #fff;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 12px 24px var(--shadow);
  margin-bottom: 2rem;
}

.home-card-toggle h2 {
  margin: 0 0 0.5rem;
}

.home-card-toggle p {
  margin: 0 0 1rem;
  color: rgba(31, 42, 48, 0.65);
}

.home-card-toggle .toggle-form {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.home-card-toggle .toggle-form button {
  margin-left: auto;
}

.auth-actions form {
  margin: 0;
}

.welcome {
  font-size: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 14px;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-secondary {
  background-image: linear-gradient(135deg, rgba(209, 176, 109, 0.92), rgba(15, 31, 45, 0.96)), var(--jersey-scale-pattern);
  background-size: cover, 140px 140px;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
  color: #fff;
  box-shadow: 0 12px 28px rgba(9, 18, 26, 0.32);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(9, 18, 26, 0.4);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.88);
  color: var(--deep-blue);
  border: 1px solid rgba(13, 25, 36, 0.25);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(13, 25, 36, 0.4);
}

.btn-disabled {
  background: rgba(42, 76, 100, 0.15);
  color: rgba(42, 76, 100, 0.6);
  cursor: not-allowed;
}

.btn-small {
  padding: 0.35rem 0.8rem;
  border-radius: 10px;
  font-size: 0.85rem;
}

.btn-danger {
  background: #b15538;
  color: #fff;
}

.page-content {
  padding: 3rem 0;
}

.page-content .container {
  background: rgba(250, 247, 240, 0.88);
  border-radius: 28px;
  box-shadow: 0 32px 60px rgba(15, 24, 34, 0.22);
  padding: 3rem;
}

.page-header {
  margin-bottom: 2rem;
  text-align: left;
}

.page-header.admin {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-header.special {
  text-align: center;
}

.page-header h1 {
  margin: 0 0 0.5rem;
  font-size: 2.4rem;
  color: var(--deep-blue);
}

.page-header p {
  margin: 0;
  color: rgba(31, 42, 48, 0.75);
}

.admin-nav {
  background: #fff;
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  box-shadow: 0 8px 16px var(--shadow);
}

.admin-nav a {
  padding: 0.5rem 1rem;
  border-radius: 10px;
  background: rgba(42, 76, 100, 0.06);
  color: var(--deep-blue);
  font-weight: 500;
  transition: all 0.2s ease;
}

.admin-nav a:hover {
  background: rgba(42, 76, 100, 0.12);
  text-decoration: none;
}

.admin-nav a.active {
  background: var(--deep-blue);
  color: #fff;
}

.gallery-image-collection {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 1.5rem;
}

.gallery-image-entry {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  padding: 0.75rem;
  box-shadow: 0 10px 20px rgba(15, 24, 34, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}

.gallery-image-entry img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  max-height: 140px;
}

.gallery-image-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(31, 42, 48, 0.7);
  gap: 0.5rem;
}

.gallery-image-meta form {
  margin: 0;
}

.hero {
  background: linear-gradient(135deg, rgba(198, 165, 106, 0.9), rgba(15, 31, 45, 0.92));
  color: #fff;
  border-radius: 36px;
  padding: 3rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.18);
}

.hero-logo {
  width: 120px;
  margin-bottom: 1rem;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: 2.8rem;
}

.hero p {
  font-size: 1.1rem;
  max-width: 32ch;
  margin: 0 0 2rem;
}

.hero-overlay-texture {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent 60%);
  opacity: 0.2;
  pointer-events: none;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.quick-card {
  background: rgba(255, 255, 255, 0.12);
  padding: 1rem;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  color: #fff;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.quick-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.25);
}

.quick-icon {
  font-size: 1.5rem;
}

.section {
  margin: 3rem 0;
}

.button-group {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.news-card {
  background: #fff;
  border-radius: 28px;
  padding: 2rem;
  box-shadow: 0 18px 32px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.news-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.news-card-header h2 {
  margin: 0;
}

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.news-item h3 {
  margin: 0.25rem 0 0.5rem;
}

.news-item p {
  margin: 0;
  color: rgba(31, 42, 48, 0.78);
}

.news-body {
  margin: 0;
  color: rgba(31, 42, 48, 0.78);
  line-height: 1.55;
}

.news-body p {
  margin: 0 0 0.5rem;
}

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

.rich-text {
  line-height: 1.65;
  color: rgba(31, 42, 48, 0.82);
}

.rich-text p {
  margin: 0 0 0.75rem;
}

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

.rich-text ul {
  margin: 0 0 0.75rem 1.25rem;
  padding-left: 0;
}

.rich-text li {
  margin-bottom: 0.35rem;
}

.ride-summary {
  margin: 0;
}

.ride-description {
  margin: 1rem 0;
}

.news-detail-meta {
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: rgba(31, 42, 48, 0.6);
}

.news-detail {
  margin-top: 2rem;
}

.news-detail-card {
  background: #fff;
  border-radius: 28px;
  padding: 2rem;
  box-shadow: 0 18px 36px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.news-detail-body {
  line-height: 1.7;
  color: rgba(31, 42, 48, 0.85);
}

.news-detail-body p {
  margin: 0 0 1rem;
}

.news-detail-body p:last-child {
  margin-bottom: 0;
}

.news-item-meta {
  font-size: 0.85rem;
  color: rgba(31, 42, 48, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.news-empty {
  margin: 0;
  color: rgba(31, 42, 48, 0.7);
}

.ride-card {
  background: #fff;
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 16px 32px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ride-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ride-type {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.ride-type.weekly {
  color: var(--sage);
}

.ride-type.endurance {
  color: var(--brown);
}

.ride-type.beginner {
  color: #3c6d70;
}

.ride-type.anniversary {
  color: var(--deep-blue);
}

.ride-meta {
  font-size: 0.9rem;
  display: flex;
  gap: 1rem;
  color: rgba(31, 42, 48, 0.7);
}

.ride-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ride-row {
  background: #fff;
  border-radius: 20px;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 160px 1fr auto;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 12px 24px var(--shadow);
}

.ride-row-date {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ride-date {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--deep-blue);
}

.ride-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0.75rem 0 0;
}

.tag {
  background: rgba(42, 76, 100, 0.08);
  color: var(--deep-blue);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

.tag-alert {
  background: rgba(177, 85, 56, 0.15);
  color: #b15538;
}

.tag-lock {
  background: rgba(42, 76, 100, 0.15);
}

.tag.pending {
  background: rgba(183, 157, 114, 0.22);
  color: var(--brown);
}

.tag.approved {
  background: rgba(122, 140, 92, 0.2);
  color: var(--sage);
}

.tag.denied {
  background: rgba(177, 85, 56, 0.2);
  color: #b15538;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 14px;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.flash-success {
  background: rgba(122, 140, 92, 0.18);
  color: var(--sage);
}

.flash-danger {
  background: rgba(177, 85, 56, 0.18);
  color: #b15538;
}

.flash-info {
  background: rgba(42, 76, 100, 0.18);
  color: var(--deep-blue);
}

.filter-form {
  margin-bottom: 2rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  gap: 1.5rem;
  justify-content: center;
}

.gallery-tile {
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 30px var(--shadow);
  cursor: zoom-in;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  width: 100%;
  max-width: 320px;
}

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

form label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-weight: 500;
  width: 100%;
}

input, select, textarea {
  font-family: inherit;
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(31, 42, 48, 0.15);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
  display: block;
  width: 100%;
}

textarea {
  resize: vertical;
}

.ride-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 100%;
  overflow: hidden;
}

.gravelling-info .ride-detail {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.ride-info {
  background: #fff;
  border-radius: 28px;
  padding: 2rem;
  box-shadow: 0 18px 32px var(--shadow);
}

.ride-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.weather-widget .weather-card {
  background: linear-gradient(135deg, rgba(198, 165, 106, 0.92), rgba(15, 31, 45, 0.94));
  color: #fff;
  border-radius: 26px;
  padding: 1.35rem;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 260px;
  position: relative;
}

.weather-widget--slim .weather-card {
  padding: 1rem;
  gap: 0.7rem;
  min-height: auto;
}

.weather-loading,
.weather-error {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}

.weather-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.weather-icon {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
}

.weather-widget--slim .weather-temp {
  font-size: clamp(1.5rem, 5vw, 1.85rem);
}

.weather-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));

.weather-widget--slim .weather-condition {
  font-size: 0.8rem;
}
}

.weather-temp {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.1rem);
}

.weather-condition {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.weather-range,
.weather-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.88);
}

.weather-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: 0.45rem;
}

.weather-widget--slim .weather-row {
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
}

@media (max-width: 640px) {
  .weather-row {
    grid-template-columns: 1fr;
  }
}

.weather-stat {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.45rem;
  background: rgba(250, 247, 240, 0.9);
  color: var(--deep-blue);
  border-radius: 12px;
  border: 1px solid rgba(250, 247, 240, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.weather-widget--slim .weather-stat {
  padding: 0.3rem 0.4rem;
}

.stat-icon {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--deep-blue);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.stat-icon svg {
  width: 13px;
  height: 13px;
}

.stat-copy {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  flex: 1;
}

.stat-label {
  text-transform: uppercase;
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.stat-value {
  font-weight: 600;
  font-size: 0.76rem;
  color: var(--deep-blue);
  line-height: 1.1;
}

.weather-widget--slim .stat-label {
  font-size: 0.48rem;
}

.weather-widget--slim .stat-value {
  font-size: 0.7rem;
}

.notice-card {
  background: #fff8f3;
  padding: 1rem 1.25rem;
  border-radius: 20px;
  box-shadow: 0 10px 20px var(--shadow);
}

.route-preview {
  border-radius: 18px;
  border: 1px solid rgba(42, 76, 100, 0.12);
}

.route-preview-wrapper {
  margin-top: 0.75rem;
}

.route-preview-trigger {
  border: none;
  background: transparent;
  padding: 0;
  width: 100%;
  border-radius: 20px;
  cursor: zoom-in;
  position: relative;
  display: inline-block;
}

.route-preview-trigger:focus-visible {
  outline: 3px solid rgba(69, 123, 157, 0.5);
  outline-offset: 4px;
}

.route-preview-trigger img {
  display: block;
  width: 100%;
}

.route-preview-hint {
  position: absolute;
  bottom: 0.85rem;
  right: 0.85rem;
  background: rgba(15, 24, 32, 0.75);
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  pointer-events: none;
}

.ride-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  max-width: 100%;
}

.ride-locations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ride-download {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.download-note {
  font-size: 0.85rem;
  color: rgba(31, 42, 48, 0.65);
}

.gravelling-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.gravelling-info {
  background: #fff;
  border-radius: 28px;
  padding: 2.5rem;
  box-shadow: 0 22px 40px var(--shadow);
  max-width: 100%;
  overflow: hidden;
}

.countdown-card {
  background: linear-gradient(135deg, rgba(198, 165, 106, 0.9), rgba(15, 31, 45, 0.92));
  color: #fff;
  border-radius: 24px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.18);
  max-width: 100%;
  overflow: hidden;
}

.countdown-card .timer {
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
  margin: 1rem 0;
  max-width: 100%;
}

.counter {
  font-size: 2.2rem;
  font-weight: 600;
  white-space: nowrap;
}

.status {
  margin: 0;
}

.status-open {
  color: #cfffc4;
}

.status-closed {
  color: #ffd1c0;
}

.gravelling-form {
  background: #fff;
  border-radius: 28px;
  padding: 2rem;
  box-shadow: 0 22px 40px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 100%;
  overflow: hidden;
}

.gravelling-form form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.registration-status {
  border-radius: 24px;
  padding: 1.5rem;
  background: #f7f9fc;
  border: 1px solid rgba(31, 42, 48, 0.08);
  box-shadow: 0 12px 24px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.registration-status p {
  margin: 0;
}

.registration-status .status-pill {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.25rem 0.9rem;
  background: rgba(31, 42, 48, 0.08);
  color: #1f2a30;
}

.registration-status .status-subtext {
  font-size: 0.9rem;
  color: rgba(31, 42, 48, 0.7);
}

.registration-status.registration-approved {
  border-left: 4px solid #2e7d32;
}

.registration-status.registration-approved .status-pill {
  background: rgb(167, 219, 168);
  color: #1f4d21;
}

.registration-status.registration-pending {
  border-left: 4px solid #c4901d;
}

.registration-status.registration-pending .status-pill {
  background: rgba(244, 182, 44, 0.2);
  color: #7a5200;
}

.registration-status.registration-denied {
  border-left: 4px solid #c44536;
}

.registration-status.registration-denied .status-pill {
  background: rgb(237, 153, 161);
  color: #6b1f15;
}

.form-errors {
  background: rgba(177, 85, 56, 0.15);
  color: #7a2f18;
  padding: 1rem;
  border-radius: 16px;
}

.form-errors ul {
  margin: 0;
  padding-left: 1.2rem;
}

.checkbox {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.checkbox input {
  width: auto;
  accent-color: var(--sage);
}

.waitlist-note {
  font-size: 0.9rem;
  color: rgba(31, 42, 48, 0.75);
}

.sponsor-carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.sponsor-carousel::-webkit-scrollbar {
  height: 6px;
}

.sponsor-carousel::-webkit-scrollbar-thumb {
  background: rgba(42, 76, 100, 0.35);
  border-radius: 999px;
}

.sponsor-slide {
  background: #fff;
  border-radius: 20px;
  padding: 0.75rem 1rem;
  min-width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 12px 20px var(--shadow);
}

.sponsor-carousel.skinny .sponsor-slide {
  min-width: 0;
}

.sponsor-carousel.skinny {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  overflow: visible;
  padding-bottom: 0;
}

.sponsor-carousel.skinny .sponsor-slide {
  width: 100%;
}

@media (max-width: 600px) {
  .sponsor-carousel.skinny {
    grid-template-columns: 1fr;
  }
}

.section.sponsors {
  background: rgba(183, 157, 114, 0.12);
  padding: 2.5rem;
  border-radius: 32px;
}

.sponsor-section {
  margin: 0;
}

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.sponsor-card {
  background: #fff;
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 16px 32px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  height: 100%;
}

.sponsor-card img {
  max-width: 100%;
  height: 120px;
  object-fit: contain;
}

.sponsor-card-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(31, 42, 48, 0.65);
  margin: 0;
}

.sponsor-card .btn {
  margin-top: auto;
  margin-bottom: 1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.gallery-tile {
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 30px var(--shadow);
  cursor: zoom-in;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.gallery-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 36px rgba(0, 0, 0, 0.22);
}

.gallery-tile figcaption {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.gallery-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

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

.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 24, 32, 0.7);
  backdrop-filter: blur(4px);
  cursor: zoom-out;
}

.overlay-content {
  position: relative;
  background: #fff;
  border-radius: 24px;
  padding: 1.5rem;
  max-width: min(720px, 92vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.25);
  z-index: 1;
}

.overlay-image {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 16px;
}

.overlay-media {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
}

.overlay-nav {
  border: none;
  background: rgba(15, 31, 45, 0.08);
  color: var(--deep-blue);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  font-size: 1.5rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.overlay-nav:hover {
  background: rgba(15, 31, 45, 0.16);
  transform: translateY(-1px);
}

.overlay-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.overlay-counter {
  text-align: center;
  font-size: 0.9rem;
  color: rgba(31, 42, 48, 0.65);
}

.overlay-caption {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.overlay-title {
  margin: 0;
  font-size: 1.4rem;
  color: var(--deep-blue);
}

.overlay-text {
  margin: 0;
  color: rgba(31, 42, 48, 0.78);
}

.overlay-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(31, 42, 48, 0.08);
  border: none;
  border-radius: 999px;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--deep-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay-close:hover {
  background: rgba(31, 42, 48, 0.12);
}

.sponsor-tag {
  font-size: 0.75rem;
  color: var(--deep-blue);
  opacity: 0.7;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 32px var(--shadow);
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 32px var(--shadow);
  margin-bottom: 2rem;
}

.table-wrapper .table {
  min-width: 640px;
  margin: 0;
  box-shadow: none;
  border-radius: 0;
}

.table th, .table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(31, 42, 48, 0.08);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.table-actions form {
  margin: 0;
}

.table-subtext {
  display: block;
  font-size: 0.85rem;
  color: rgba(31, 42, 48, 0.65);
  margin-top: 0.15rem;
}

.admin-form .quill-editor {
  border: 1px solid rgba(31, 42, 48, 0.15);
  border-radius: 18px;
  min-height: 220px;
  background: #fff;
}

.admin-form .ql-toolbar.ql-snow {
  border-radius: 18px 18px 0 0;
  border-color: rgba(31, 42, 48, 0.15);
  background: rgba(83, 97, 111, 0.06);
}

.admin-form .ql-container.ql-snow {
  border-radius: 0 0 18px 18px;
  border-color: rgba(31, 42, 48, 0.15);
  font-family: inherit;
}

.admin-form .quill-editor-tall {
  min-height: 320px;
}

.admin-form .field-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: rgba(31, 42, 48, 0.6);
}

.thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 14px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: #fff;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 16px 28px var(--shadow);
}

.stat-label {
  font-size: 0.85rem;
  color: rgba(31, 42, 48, 0.65);
}

.stat-value {
  font-size: 2rem;
  font-weight: 600;
  color: var(--deep-blue);
}

.admin-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-notifications ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.admin-notifications li {
  background: #fff;
  border-radius: 18px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 12px 24px var(--shadow);
}

.meta {
  display: block;
  font-size: 0.75rem;
  color: rgba(31, 42, 48, 0.6);
}

.meta.pending {
  color: #b15538;
}

.auth-card {
  background: #fff;
  padding: 2.5rem;
  border-radius: 28px;
  box-shadow: 0 20px 36px var(--shadow);
  width: min(420px, 90vw);
  margin: 0 auto;
}

.auth-card h1 {
  margin-top: 0;
}

.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.form-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.form-checks {
  display: flex;
  gap: 1.5rem;
}

.form-hint {
  font-size: 0.85rem;
  color: rgba(31, 42, 48, 0.65);
  margin-top: -0.25rem;
}

.notifications-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.notification-log ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.notification-log li {
  background: #fff;
  border-radius: 20px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 12px 24px var(--shadow);
}

.site-footer {
  background: linear-gradient(180deg, rgba(15, 31, 45, 0.95) 0%, rgba(15, 31, 45, 0.75) 100%);
  color: rgba(255, 255, 255, 0.82);
  margin-top: 4rem;
}

.footer-inner {
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-logo {
  width: 80px;
  margin-bottom: 0.75rem;
}

.footer-links, .footer-newsletter {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.85);
}

.newsletter-input-group {
  display: flex;
  gap: 0.5rem;
}

.newsletter-input-group input {
  flex: 1;
}

.footer-bottom {
  background: rgba(10, 20, 28, 0.9);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom-inner {
  width: 100%;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
}

@media (min-width: 961px) {
  .ride-detail,
  .gravelling-grid {
    grid-template-columns: 7fr 3fr;
  }

  .notifications-layout {
    grid-template-columns: 3fr 2fr;
  }

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

  .site-header-inner,
  .footer-inner,
  .footer-bottom-inner {
    max-width: 1200px;
  }
}

@media (max-width: 960px) {
  .table-wrapper {
    border-radius: 18px;
  }

  .table-wrapper .table {
    min-width: 520px;
  }

  .container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 1.5rem;
  }

  .site-header,
  .site-footer {
    padding-left: 0;
    padding-right: 0;
  }

  .site-header-inner,
  .footer-inner,
  .footer-bottom-inner {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .site-header-inner {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    width: 100%;
    order: 3;
    display: none;
  }

  .primary-nav.open {
    display: block;
  }

  .primary-nav ul {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .auth-actions {
    order: 2;
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .auth-actions .welcome {
    flex: 1 1 100%;
    text-align: right;
  }

  .auth-actions form,
  .auth-actions .btn {
    flex: 0 0 auto;
  }

  .ride-row {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .ride-detail,
  .gravelling-grid,
  .notifications-layout,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .gravelling-grid {
    gap: 1.5rem;
  }

  .gravelling-info,
  .gravelling-form {
    padding: 1.5rem;
  }

  .countdown-card {
    padding: 1.25rem;
  }

  .countdown-card .timer {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }

  .countdown-card .counter {
    font-size: 1.8rem;
  }

  .countdown-card .label {
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .ride-sidebar {
    flex-direction: column;
  }

  .ride-meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 2rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .quick-actions {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .overlay-content {
    max-width: 92vw;
    padding: 1.25rem;
  }

  .overlay-image {
    max-height: 50vh;
  }
}
