:root {
  --bg: #f6f0e7;
  --paper: #fffaf4;
  --ink: #241915;
  --muted: #6e6259;
  --ember: #a6482d;
  --ember-dark: #823520;
  --line: rgba(36, 25, 21, 0.12);
}

body {
  background:
    radial-gradient(circle at top right, rgba(166, 72, 45, 0.1), transparent 30%),
    linear-gradient(180deg, #f9f4ed 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
}

h1, h2, h3, h4, .navbar-brand {
  font-family: "Fraunces", serif;
}

.navbar {
  padding: 1rem 0;
}

.navbar-brand {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.7rem;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
  line-height: 1;
}

.site-logo {
  width: 2.15rem;
  height: 2.15rem;
  flex: 0 0 auto;
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(249, 244, 237, 0.9);
  border-bottom: 1px solid var(--line);
}

.hero-shell {
  padding-top: 1.5rem;
}

.hero-title {
  line-height: 1;
  max-width: 18ch;
}

.hero-visual,
.hero-card,
.panel-card,
.artist-card {
  background: rgba(255, 250, 244, 0.88);
  border-radius: 1.5rem;
}

.hero-visual {
  position: relative;
  overflow: hidden;
  min-height: 24rem;
  background: #1f1713;
}

.hero-image {
  width: 100%;
  height: 100%;
  min-height: 24rem;
  display: block;
  object-fit: cover;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 8, 6, 0) 0%, rgba(12, 8, 6, 0.18) 72%, rgba(12, 8, 6, 0.34) 100%);
}

.hero-visual-caption {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1;
  color: #fff8f1;
  max-width: 28rem;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.hero-card {
  padding: 1.2rem;
}

.eyebrow {
  color: var(--ember);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.stat-card,
.story-card {
  height: 100%;
  border-radius: 1.1rem;
  border: 1px solid var(--line);
  background: white;
  padding: 1rem;
}

.hero-story-card {
  background: rgba(255, 250, 244, 0.72);
  backdrop-filter: blur(10px);
}

.stat-value {
  display: block;
  font-family: "Fraunces", serif;
  font-size: 2rem;
}

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

.btn-ember {
  background: var(--ember);
  border-color: var(--ember);
  color: white;
}

.btn-ember:hover,
.btn-ember:focus {
  background: var(--ember-dark);
  border-color: var(--ember-dark);
  color: white;
}

.upload-status {
  min-height: 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  display: none;
  align-items: center;
  gap: 0.55rem;
}

.upload-status.is-visible {
  display: flex;
}

.upload-status::before {
  content: "";
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  border: 2px solid rgba(166, 72, 45, 0.22);
  border-top-color: var(--ember);
  animation: upload-spin 0.8s linear infinite;
  flex: 0 0 auto;
}

@keyframes upload-spin {
  to {
    transform: rotate(360deg);
  }
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 991.98px) {
  .hero-visual,
  .hero-image {
    min-height: 18rem;
  }
}

.artist-card {
  overflow: hidden;
}

.artist-image-wrap {
  position: relative;
}

.artist-image,
.artist-detail-image,
.gallery-image,
.preview-image {
  width: 100%;
  object-fit: cover;
  display: block;
}

.artist-image {
  height: 16rem;
}

.artist-detail-image {
  border-radius: 1.5rem;
  height: min(70vw, 32rem);
}

.gallery-image {
  border-radius: 1rem;
  height: 11rem;
}

.gallery-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.gallery-modal-content {
  background: rgba(20, 15, 12, 0.96);
  color: white;
}

.gallery-modal-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 18rem;
  overflow: hidden;
}

.gallery-carousel {
  width: 100%;
  overflow: hidden;
  touch-action: pan-y;
}

.gallery-carousel.is-opening {
  opacity: 0;
}

.gallery-carousel-track {
  display: flex;
  width: 100%;
}

.gallery-carousel-track.is-animating {
  transition: transform 220ms ease;
}

.gallery-slide {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.35rem;
}

.gallery-modal-image {
  max-width: 100%;
  max-height: 75vh;
  width: auto;
  border-radius: 1rem;
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-caption {
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 245, 236, 0.86);
  line-height: 1.6;
  min-height: 1.5rem;
  display: none;
}

.gallery-caption.is-visible {
  display: block;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  font-size: 2rem;
  line-height: 1;
}

.gallery-nav-prev {
  left: 0.5rem;
}

.gallery-nav-next {
  right: 0.5rem;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
}

.gallery-dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.gallery-dot.is-active {
  background: white;
  transform: scale(1.15);
}

.preview-image {
  height: 16rem;
  border-radius: 1rem;
  background: #eadfce;
}

.saved-gallery-thumb {
  position: relative;
  width: 100%;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 1rem;
  overflow: hidden;
  background: #eadfce;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.saved-gallery-thumb:hover,
.saved-gallery-thumb:focus {
  transform: translateY(-1px);
  border-color: rgba(166, 72, 45, 0.45);
  box-shadow: 0 10px 24px rgba(36, 25, 21, 0.12);
}

.saved-gallery-thumb.is-selected {
  border-color: var(--ember);
  opacity: 0.72;
}

.saved-gallery-thumb.is-selected::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(166, 72, 45, 0.26);
}

.saved-gallery-thumb-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.saved-gallery-thumb-label {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  z-index: 1;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(36, 25, 21, 0.76);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.image-field-thumb {
  max-width: 12rem;
  cursor: default;
}

.featured-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.artist-self-badge {
  position: absolute;
  right: 1rem;
  bottom: -2.25rem;
  width: 4.75rem;
  height: 4.75rem;
  object-fit: cover;
  border-radius: 999px;
  border: 4px solid rgba(255, 250, 244, 0.98);
  background: #f0e4d5;
  box-shadow: 0 12px 25px rgba(36, 25, 21, 0.2);
}

.artist-self-badge-detail {
  bottom: 1rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: capitalize;
}

.status-approved {
  background: rgba(50, 139, 95, 0.15);
  color: #1d6d43;
}

.status-pending {
  background: rgba(166, 116, 45, 0.16);
  color: #8c5c1f;
}

.status-rejected {
  background: rgba(164, 58, 48, 0.14);
  color: #8f2f2a;
}

.admin-actions {
  min-width: 11rem;
  display: grid;
  gap: 0.5rem;
}

.year-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.25rem 0.5rem;
}

.current-year-note {
  background: rgba(255, 255, 255, 0.96);
}

.group-photo-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(36, 25, 21, 0.08);
}

.group-photo-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: #eadfce;
}

.group-photo-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.group-photo-admin-form {
  margin: 0;
}

.group-photo-owner-tools {
  display: grid;
  gap: 0.85rem;
  padding: 0 1rem 1rem;
  border-top: 1px solid rgba(36, 25, 21, 0.08);
}

.group-photo-caption-form,
.group-photo-delete-form {
  margin: 0;
}

.group-photo-owner-actions {
  display: flex;
  justify-content: flex-end;
}

.event-list,
.event-admin-list {
  display: grid;
  gap: 1rem;
}

.event-card,
.event-admin-card {
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: white;
  padding: 1rem 1.1rem;
}

.event-card-past {
  background: rgba(255, 250, 244, 0.75);
}

.event-date {
  color: var(--ember);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.event-time {
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.admin-group-photo-thumb {
  width: 7rem;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0.9rem;
  border: 1px solid var(--line);
  display: block;
  background: #eadfce;
}

.empty-state-card,
.upload-sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 248, 241, 0.94) 100%);
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
}

.footer-link {
  color: var(--ember);
  text-decoration: none;
  font-weight: 700;
}

@media (min-width: 768px) {
  .section-heading {
    align-items: end;
    justify-content: space-between;
    flex-direction: row;
  }
}
