:root {
  --bg: #f7f1e3;
  --surface: #fffaf0;
  --surface-strong: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #b91c1c;
  --accent-dark: #7f1d1d;
  --gold: #d97706;
  --pine: #14532d;
  --danger: #991b1b;
  --ring: rgba(217, 119, 6, 0.2);
  --shadow: 0 20px 60px rgba(17, 24, 39, 0.12);
  --shadow-soft: 0 14px 34px rgba(17, 24, 39, 0.08);
  --radius: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.24), transparent 24%),
    linear-gradient(180deg, #fff8ec 0%, #f4ead5 100%);
  color: var(--text);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

body {
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(31, 41, 55, 0.12);
  border-radius: 16px;
  background: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid transparent;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--ring);
}

label {
  display: grid;
  gap: 0.45rem;
  color: var(--text);
  font-weight: 600;
}

label span {
  font-size: 0.95rem;
}

.public-header,
.site-footer,
.site-main,
.login-page,
.admin-main {
  width: min(1260px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.site-main {
  padding: 1rem 0 4rem;
}

.brand-bar,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.public-header {
  padding: 1.2rem 0 0.2rem;
}

.brand-lockup,
.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  min-width: 0;
}

.brand-logo {
  width: 74px;
  height: 74px;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.brand-copy strong,
.admin-brand strong {
  display: block;
  font-size: 1rem;
  line-height: 1.25;
}

.brand-copy small,
.admin-brand small {
  color: var(--muted);
}

.public-nav,
.admin-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

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

.public-nav a,
.admin-nav a {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  color: var(--muted);
  transition: 0.2s ease;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid rgba(31, 41, 55, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.menu-toggle:hover {
  transform: translateY(-1px);
  color: white;
  background: linear-gradient(135deg, var(--accent) 0%, #ef4444 100%);
  box-shadow: 0 16px 34px rgba(185, 28, 28, 0.18);
}

.menu-toggle-bars {
  display: grid;
  gap: 0.24rem;
}

.menu-toggle-bars span {
  display: block;
  width: 1.2rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.public-nav a.active,
.public-nav a:hover,
.admin-nav a.active,
.admin-nav a:hover {
  color: white;
  background: linear-gradient(135deg, var(--accent) 0%, #dc2626 100%);
  box-shadow: 0 12px 30px rgba(185, 28, 28, 0.25);
}

.hero-panel,
.page-banner,
.message-panel,
.panel-card,
.registration-form,
.login-card,
.stat-card,
.winner-card,
.gallery-card,
.registration-card,
.info-card,
.detail-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  min-width: 0;
}

.hero-panel,
.page-banner,
.message-panel,
.panel-card,
.login-card {
  padding: 2.15rem;
}

.hero-home {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.95fr);
  gap: 1.75rem;
  position: relative;
  overflow: hidden;
}

.hero-home::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -40px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(185, 28, 28, 0.16), transparent 70%);
}

.hero-copy h1,
.page-banner h1,
.message-panel h1,
.login-card h1,
.admin-header-row h1 {
  margin: 0.2rem 0 0.8rem;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.12;
}

.hero-copy h1,
.page-banner h1 {
  white-space: pre-line;
}

.preserve-formatting {
  white-space: pre-wrap;
}

.contact-link {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.16em;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

.contact-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.hero-copy p,
.page-banner p,
.message-panel p,
.panel-card p,
.login-card p,
.admin-header-row p {
  margin: 0;
  color: var(--muted);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  color: var(--gold);
  font-weight: 700;
}

.hero-actions,
.field-grid,
.info-grid,
.detail-columns,
.registration-grid,
.winners-section,
.gallery-grid,
.year-grid,
.admin-grid,
.stats-grid,
.shirt-summary-grid {
  display: grid;
  gap: 1.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.primary-button,
.ghost-button,
.danger-button,
.success-button,
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.9rem 1.4rem;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.primary-button:hover,
.ghost-button:hover,
.danger-button:hover,
.success-button:hover,
.download-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--accent) 0%, #ef4444 100%);
  box-shadow: 0 14px 32px rgba(185, 28, 28, 0.28);
}

.primary-button:hover {
  background: linear-gradient(135deg, #111827 0%, #374151 100%);
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.22);
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(31, 41, 55, 0.1);
}

.ghost-button:hover {
  color: white;
  background: linear-gradient(135deg, var(--accent) 0%, #ef4444 100%);
  border-color: rgba(185, 28, 28, 0.28);
  box-shadow: 0 16px 34px rgba(185, 28, 28, 0.18);
}

.danger-button {
  color: white;
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
}

.danger-button:hover {
  background: linear-gradient(135deg, #7f1d1d 0%, #b91c1c 100%);
  box-shadow: 0 16px 34px rgba(153, 27, 27, 0.26);
}

.success-button {
  color: white;
  background: linear-gradient(135deg, var(--pine) 0%, #22c55e 100%);
  box-shadow: 0 14px 32px rgba(20, 83, 45, 0.24);
}

.success-button:hover {
  background: linear-gradient(135deg, #166534 0%, #15803d 100%);
  box-shadow: 0 16px 34px rgba(21, 128, 61, 0.24);
}

.download-button {
  color: var(--pine);
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.96) 0%, rgba(187, 247, 208, 0.96) 100%);
  border: 1px solid rgba(20, 83, 45, 0.14);
  box-shadow: 0 12px 26px rgba(20, 83, 45, 0.08);
}

.download-button:hover {
  color: white;
  background: linear-gradient(135deg, #166534 0%, #22c55e 100%);
  border-color: rgba(20, 83, 45, 0.28);
  box-shadow: 0 16px 34px rgba(20, 83, 45, 0.18);
}

.small-button {
  padding: 0.55rem 0.95rem;
  font-size: 0.88rem;
}

.status-card {
  align-self: stretch;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96) 0%, rgba(31, 41, 55, 0.92) 100%);
  color: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.status-card p,
.status-card small {
  color: rgba(255, 255, 255, 0.78);
}

.status-card .hero-actions {
  margin-top: 1rem;
}

.image-status-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  min-height: 280px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.status-feature-image {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
}

.status-image-trigger {
  display: block;
  width: 100%;
  height: 100%;
}

.status-image-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.25rem;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.8) 100%);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  margin: 0.8rem 0;
  font-weight: 800;
  width: fit-content;
}

.status-pill.open {
  background: rgba(20, 83, 45, 0.14);
  color: var(--pine);
}

.status-pill.closed {
  background: rgba(153, 27, 27, 0.14);
  color: var(--danger);
}

.winners-section,
.info-grid,
.detail-columns,
.registration-grid,
.gallery-year,
.year-grid,
.admin-grid,
.stats-grid,
.panel-card,
.message-panel {
  margin-top: 1.5rem;
}

.winners-section,
.info-grid,
.detail-columns,
.registration-grid,
.admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.winners-section {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.winner-card {
  padding: 1.5rem;
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.98) 0%, rgba(255, 255, 255, 0.92) 100%);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.info-card,
.detail-card,
.registration-card,
.stat-card {
  padding: 1.5rem;
}

.winner-card.compact h3,
.winner-card h2 {
  margin: 0.25rem 0;
  line-height: 1.2;
}

.winner-year {
  display: inline-flex;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.14);
  color: var(--gold);
  font-weight: 800;
}

.lane-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 236, 0.98)),
    repeating-linear-gradient(
      90deg,
      rgba(217, 119, 6, 0.1),
      rgba(217, 119, 6, 0.1) 60px,
      rgba(180, 83, 9, 0.14) 60px,
      rgba(180, 83, 9, 0.14) 120px
    );
}

.simple-list {
  margin: 0;
  padding-left: 1.15rem;
}

.simple-list li + li {
  margin-top: 0.5rem;
}

.form-page-wrap {
  margin-top: 1.5rem;
}

.registration-form {
  display: grid;
  gap: 1.4rem;
  padding: 2rem;
}

.info-card,
.registration-card,
.detail-card {
  display: grid;
  gap: 0.9rem;
  align-content: start;
  min-height: 100%;
}

.info-card h2,
.registration-card h2,
.detail-card h2 {
  margin: 0;
  line-height: 1.18;
}

.info-card-actions {
  margin-top: auto;
  padding-top: 0.35rem;
}

.location-card-layout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.location-copy {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
}

.location-copy h2 {
  margin: 0;
  line-height: 1.18;
}

.location-copy p {
  margin: 0;
}

.map-action-wrap {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}

.location-map-action {
  align-self: center;
  margin-right: 0.35rem;
}

.map-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  line-height: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(31, 41, 55, 0.08);
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.map-icon-button:hover {
  transform: translateY(-1px);
  border-color: rgba(185, 28, 28, 0.18);
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.14);
}

.map-icon-button:focus-visible,
.map-choice-action:focus-visible {
  outline: 2px solid transparent;
  box-shadow: 0 0 0 4px var(--ring);
}

.map-icon-button svg {
  display: block;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
}

.map-choice-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding:
    1rem
    max(1rem, env(safe-area-inset-right, 0px))
    calc(env(safe-area-inset-bottom, 0px) + 1rem)
    max(1rem, env(safe-area-inset-left, 0px));
  background: rgba(15, 23, 42, 0.4);
  z-index: 1400;
}

.map-choice-modal.open {
  display: flex;
}

.map-choice-modal-open {
  overflow: hidden;
}

.map-choice-sheet {
  width: min(100%, 24rem);
  padding: 1.2rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.8rem;
  text-align: center;
}

.map-choice-title {
  margin: 0;
  line-height: 1.15;
}

.map-choice-copy {
  margin: 0;
  color: var(--muted);
}

.map-choice-actions {
  display: grid;
  gap: 0.65rem;
}

.map-choice-action {
  width: 100%;
}

.map-choice-cancel {
  margin-top: 0.1rem;
}

.quick-link-stack {
  display: grid;
  gap: 0.9rem;
}

.quick-link-card {
  display: block;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(31, 41, 55, 0.08);
  font-weight: 700;
  box-shadow: var(--shadow-soft);
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease,
    border-color 0.18s ease;
}

.quick-link-card:hover {
  background: linear-gradient(135deg, var(--accent) 0%, #ef4444 100%);
  color: white;
  border-color: rgba(185, 28, 28, 0.32);
  transform: translateY(-2px);
}

.form-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.form-logo {
  display: block;
  width: clamp(480px, 24vw, 220px);
  height: clamp(160px, 24vw, 220px);
  object-fit: contain;
  margin: 0 auto;
}

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

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

.field-centered {
  text-align: center;
}

.field-centered input,
.field-centered select,
.field-centered textarea {
  text-align: center;
}

.team-name-field {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
}

.team-name-field input {
  font-size: 1.05rem;
  font-weight: 700;
}

.registration-page-banner {
  display: grid;
  justify-items: center;
  text-align: center;
}

.registration-page-banner p {
  max-width: 52rem;
}

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

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

.attendee-card {
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(248, 250, 252, 0.86);
  border: 1px solid rgba(31, 41, 55, 0.08);
  display: grid;
  gap: 0.8rem;
}

.gallery-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 1rem;
}

.gallery-card {
  overflow: hidden;
  height: 100%;
}

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

.gallery-copy {
  padding: 1rem;
}

.winner-team-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(31, 41, 55, 0.08);
  background: rgba(255, 255, 255, 0.7);
}

.lightbox-trigger {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 16px;
}

.lightbox-trigger img {
  display: block;
}

.year-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.year-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.6rem;
  display: grid;
  gap: 0.9rem;
}

.section-heading {
  display: grid;
  gap: 0.25rem;
  margin-top: 2rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  line-height: 1.12;
}

.message-panel {
  text-align: center;
}

.success-panel {
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.9), rgba(255, 255, 255, 0.94));
}

.error-panel {
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.96), rgba(255, 255, 255, 0.92));
}

.site-footer {
  padding: 0 0 2rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.footer-copy {
  grid-column: 2;
  text-align: center;
}

.footer-copy p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.footer-admin-link {
  grid-column: 3;
  justify-self: end;
}

.flash {
  width: min(1180px, calc(100% - 2rem));
  margin: 1rem auto 0;
  padding: 1rem 1.25rem;
  border-radius: 20px;
  font-weight: 600;
}

.flash-success {
  background: rgba(220, 252, 231, 0.92);
  color: var(--pine);
}

.flash-error {
  background: rgba(254, 226, 226, 0.94);
  color: var(--danger);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.login-card {
  width: min(540px, 100%);
  text-align: center;
}

.stack-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.admin-shell {
  width: min(1400px, calc(100% - 2rem));
  margin: 1rem auto 2rem;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1.25rem;
}

.admin-mobile-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-radius: 24px;
  background: rgba(17, 24, 39, 0.95);
  color: white;
  box-shadow: var(--shadow);
}

.admin-mobile-bar strong {
  font-size: 1rem;
}

.admin-sidebar {
  background: rgba(17, 24, 39, 0.95);
  color: white;
  padding: 1.5rem;
  border-radius: 30px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1.25rem;
  align-self: start;
  position: sticky;
  top: 1rem;
}

.admin-sidebar .admin-nav {
  display: grid;
}

.admin-sidebar .admin-nav a {
  color: rgba(255, 255, 255, 0.72);
}

.admin-nav-group {
  display: grid;
  gap: 0.35rem;
}

.admin-nav-group summary {
  list-style: none;
  cursor: pointer;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

.admin-nav-group summary::-webkit-details-marker {
  display: none;
}

.admin-nav-group summary.active,
.admin-nav-group summary:hover {
  color: white;
  background: linear-gradient(135deg, var(--accent) 0%, #dc2626 100%);
  box-shadow: 0 12px 30px rgba(185, 28, 28, 0.25);
}

.admin-subnav {
  display: grid;
  gap: 0.25rem;
  margin-left: 0.9rem;
  padding-left: 0.8rem;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-subnav a {
  padding: 0.55rem 0.8rem;
  border-radius: 14px;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.72);
}

.admin-subnav a.active,
.admin-subnav a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.admin-subnav-group {
  display: grid;
  gap: 0.25rem;
}

.admin-subnav-group summary {
  list-style: none;
  cursor: pointer;
  padding: 0.55rem 0.8rem;
  border-radius: 14px;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

.admin-subnav-group summary::-webkit-details-marker {
  display: none;
}

.admin-subnav-group summary.active,
.admin-subnav-group summary:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.admin-subnav-children {
  display: grid;
  gap: 0.25rem;
  margin-left: 0.8rem;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-subnav-children a {
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.68);
}

.admin-subnav-children a.active,
.admin-subnav-children a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.admin-main {
  width: 100%;
}

.admin-utility-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.admin-header-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.admin-table-header {
  display: block;
}

.admin-table-heading {
  max-width: 62rem;
}

.admin-table-actions {
  margin-top: 1.75rem;
  justify-content: flex-start;
  align-items: stretch;
}

.admin-table-actions .primary-button,
.admin-table-actions .ghost-button {
  min-width: 0;
}

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

.stat-card {
  padding: 1.5rem;
  display: grid;
  gap: 0.4rem;
}

.stat-card span {
  color: var(--muted);
}

.stat-card strong {
  font-size: 2rem;
}

.stat-card small {
  color: var(--muted);
}

.status-summary-value {
  display: block;
  font-size: 1rem !important;
}

.status-summary-value .status-pill {
  display: inline-flex;
}

.stat-card-form {
  margin-top: 0.9rem;
}

.panel-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.panel-card-heading h2 {
  margin: 0;
}

.table-panel {
  overflow: hidden;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 1rem;
  border-bottom: 1px solid rgba(31, 41, 55, 0.08);
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
}

th {
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.table-empty-state {
  color: var(--text);
}

.action-cell {
  min-width: 160px;
  display: grid;
  gap: 0.5rem;
}

.danger-zone {
  border: 1px solid rgba(153, 27, 27, 0.18);
}

.full-width {
  width: 100%;
}

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

.shirt-summary-card {
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(31, 41, 55, 0.08);
}

.shirt-summary-card strong {
  font-size: 1.8rem;
  display: block;
}

.gallery-admin-list,
.winner-admin-list,
.users-list,
.year-link-list {
  display: grid;
  gap: 1rem;
}

.nested-panel {
  margin-top: 0;
  box-shadow: var(--shadow-soft);
}

.upload-progress-panel {
  display: grid;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.88);
  border: 1px solid rgba(31, 41, 55, 0.08);
}

.upload-progress-bar {
  width: 100%;
  height: 0.8rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(31, 41, 55, 0.1);
}

.upload-progress-bar.is-processing {
  background: rgba(31, 41, 55, 0.08);
}

.upload-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent) 0%, #ef4444 100%);
  transition: width 0.18s ease;
}

.upload-progress-fill.is-processing {
  width: 100% !important;
  background:
    linear-gradient(
      90deg,
      rgba(185, 28, 28, 0.2) 0%,
      rgba(239, 68, 68, 0.85) 25%,
      rgba(185, 28, 28, 0.2) 50%,
      rgba(239, 68, 68, 0.85) 75%,
      rgba(185, 28, 28, 0.2) 100%
    );
  background-size: 220px 100%;
  animation: uploadProcessing 1s linear infinite;
}

.upload-progress-text,
.upload-progress-feedback {
  margin: 0;
  font-weight: 600;
}

.upload-progress-feedback.is-success {
  color: var(--pine);
}

.upload-progress-feedback.is-error {
  color: var(--danger);
}

.gallery-manager-tools {
  display: grid;
  gap: 1rem;
}

.gallery-year-filter-bar,
.gallery-selection-bar,
.gallery-selection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.gallery-selection-bar {
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.88);
  border: 1px solid rgba(31, 41, 55, 0.08);
}

.gallery-year-filter-bar .ghost-button.active {
  color: white;
  background: linear-gradient(135deg, var(--accent) 0%, #ef4444 100%);
  border-color: rgba(185, 28, 28, 0.28);
  box-shadow: 0 16px 34px rgba(185, 28, 28, 0.18);
}

.gallery-select-check {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: auto;
  font-size: 0.9rem;
}

.gallery-select-check input {
  width: 1rem;
  height: 1rem;
}

.gallery-admin-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.88);
}

.gallery-admin-media {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 0.6rem;
}

.gallery-admin-card img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(31, 41, 55, 0.08);
}

.gallery-admin-copy {
  display: grid;
  align-content: start;
  gap: 0.65rem;
}

.gallery-admin-copy p {
  margin: 0;
}

.admin-logo-preview {
  width: 160px;
  height: 160px;
  object-fit: contain;
  margin-bottom: 1rem;
}

.share-image-preview {
  width: min(100%, 320px);
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  margin-bottom: 1rem;
  border-radius: 20px;
  border: 1px solid rgba(31, 41, 55, 0.08);
  box-shadow: var(--shadow-soft);
}

.favicon-preview {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin-bottom: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.75rem;
  border: 1px solid rgba(31, 41, 55, 0.08);
}

.user-row-form {
  padding: 1rem;
  border-radius: 20px;
  background: rgba(248, 250, 252, 0.88);
  display: grid;
  gap: 1rem;
}

.user-account-card {
  padding: 1rem;
  border-radius: 22px;
  background: rgba(248, 250, 252, 0.88);
  border: 1px solid rgba(31, 41, 55, 0.08);
  display: grid;
  gap: 1rem;
}

.user-account-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.user-account-header h3 {
  margin: 0;
}

.user-account-header p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.user-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.user-role-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.user-role-pill.role-admin {
  background: rgba(185, 28, 28, 0.12);
  color: #991b1b;
}

.user-role-pill.role-user {
  background: rgba(14, 116, 144, 0.12);
  color: #0f766e;
}

.user-role-pill.role-default {
  background: rgba(71, 85, 105, 0.12);
  color: #334155;
}

.user-role-pill.role-reset {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
}

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

.user-meta-card {
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(31, 41, 55, 0.08);
  display: grid;
  gap: 0.35rem;
}

.user-meta-card span {
  color: var(--muted);
  font-size: 0.85rem;
}

.user-meta-card strong {
  font-size: 0.98rem;
}

.user-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.user-account-actions small {
  color: var(--muted);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}

.checkbox-row input {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
}

.footer-admin-link {
  display: flex;
  align-items: center;
}

.login-actions {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.hero-panel *,
.page-banner *,
.message-panel *,
.panel-card *,
.registration-form *,
.login-card *,
.stat-card *,
.winner-card *,
.gallery-card *,
.registration-card *,
.info-card *,
.detail-card *,
.gallery-admin-card *,
.user-row-form * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.empty-state {
  padding: 1.4rem;
  text-align: center;
}

.lightbox-open {
  overflow: hidden;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.84);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 9999;
}

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

.lightbox-frame {
  position: relative;
  max-width: min(1100px, 100%);
  max-height: 100%;
}

.lightbox-image {
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.lightbox-caption {
  margin: 0.9rem 0 0;
  text-align: center;
  color: white;
  font-weight: 600;
}

.lightbox-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.lightbox-close:hover {
  background: linear-gradient(135deg, var(--accent) 0%, #ef4444 100%);
}

@keyframes uploadProcessing {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 220px 0;
  }
}

@media (max-width: 980px) {
  .hero-home,
  .field-grid,
  .info-grid,
  .detail-columns,
  .registration-grid,
  .admin-grid,
  .stats-grid,
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .site-footer,
  .admin-header-row,
  .admin-utility-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-sidebar {
    position: static;
  }
}

@media (max-width: 900px) {
  .public-header,
  .site-footer,
  .site-main,
  .login-page,
  .admin-main {
    width: min(100%, calc(100% - 1rem));
  }

  .site-main {
    padding: 0.85rem 0 3rem;
  }

  .public-header {
    padding-top: 0.9rem;
  }

  .brand-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: center;
  }

  .brand-logo {
    width: 58px;
    height: 58px;
  }

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

  .public-nav {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    margin-left: 0;
    padding: 0.75rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-soft);
    gap: 0.45rem;
  }

  .public-nav.is-open {
    display: grid;
  }

  .public-nav a {
    width: 100%;
    text-align: left;
    color: var(--text);
  }

  .admin-shell {
    gap: 1rem;
  }

  .admin-mobile-bar {
    display: flex;
  }

  .admin-sidebar {
    display: none;
    position: static;
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 24px;
    padding: 1.25rem;
  }

  .admin-sidebar.is-open {
    display: grid;
  }

  .hero-actions {
    display: grid;
  }

  .hero-actions .primary-button,
  .hero-actions .ghost-button,
  .hero-actions .danger-button {
    width: 100%;
  }

  .admin-table-actions .primary-button,
  .admin-table-actions .ghost-button {
    width: 100%;
  }

  .panel-card-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-card-heading .ghost-button,
  .panel-card-heading .download-button {
    width: 100%;
  }

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

  .gallery-admin-media {
    justify-items: start;
  }

  .gallery-admin-card img {
    width: 88px;
    height: 88px;
  }

  .lightbox-overlay {
    padding: 1rem;
  }

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

@media (max-width: 680px) {
  .brand-copy strong,
  .admin-brand strong {
    font-size: 0.96rem;
  }

  .public-nav a,
  .admin-nav a,
  .admin-nav-group summary,
  .admin-subnav-group summary {
    width: 100%;
    text-align: left;
  }

  .hero-panel,
  .page-banner,
  .message-panel,
  .panel-card,
  .registration-form,
  .login-card,
  .stat-card,
  .winner-card,
  .registration-card,
  .info-card,
  .detail-card {
    padding: 1.35rem;
  }

  .location-card-layout {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .location-map-action {
    margin-right: 0;
    align-self: flex-start;
  }

  .hero-copy h1,
  .page-banner h1,
  .message-panel h1,
  .login-card h1,
  .admin-header-row h1 {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
  }

  .hero-actions {
    margin-top: 1.1rem;
  }

  .table-wrap {
    overflow: visible;
  }

  .responsive-admin-table,
  .responsive-admin-table tbody,
  .responsive-admin-table tr,
  .responsive-admin-table td {
    display: block;
    width: 100%;
  }

  .responsive-admin-table thead {
    display: none;
  }

  .responsive-admin-table tbody {
    display: grid;
    gap: 1rem;
  }

  .responsive-admin-table tbody tr {
    padding: 0.35rem 1rem;
    border: 1px solid rgba(31, 41, 55, 0.08);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
  }

  .responsive-admin-table tbody td {
    display: grid;
    grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(31, 41, 55, 0.08);
    font-size: 0.98rem;
  }

  .responsive-admin-table tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    overflow-wrap: normal;
  }

  .responsive-admin-table tbody td:last-child {
    border-bottom: 0;
  }

  .responsive-admin-table .table-empty-row {
    padding: 1rem;
  }

  .responsive-admin-table .table-empty-state {
    display: block;
    padding: 0;
    border-bottom: 0;
  }

  .responsive-admin-table .table-empty-state::before {
    content: none;
  }

  .responsive-admin-table td form,
  .responsive-admin-table td .small-button {
    width: 100%;
  }

  .quick-link-card,
  .year-card,
  .gallery-copy,
  .attendee-card,
  .stat-card,
  .info-card,
  .detail-card,
  .registration-card {
    padding: 1rem;
  }

  .status-card {
    padding: 1.15rem;
  }

  .status-feature-image {
    min-height: 220px;
  }

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

  .field-span-full,
  .team-name-field {
    max-width: none;
  }

  .site-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0.75rem;
  }

  .footer-copy,
  .footer-admin-link {
    grid-column: auto;
    justify-self: center;
    text-align: center;
  }

  .gallery-selection-bar {
    align-items: flex-start;
  }

  .gallery-selection-actions {
    width: 100%;
  }

  .gallery-selection-actions .ghost-button,
  .gallery-selection-actions .danger-button,
  .gallery-year-filter-bar .ghost-button {
    width: 100%;
  }

  .lightbox-image {
    max-height: calc(100vh - 5rem);
  }

  .lightbox-close {
    top: 0.65rem;
    right: 0.65rem;
  }
}
