:root {
  --bg: #000000;
  --bg-alt: #0d0d0d;
  --paper: #141414;
  --ink: #f8f7f4;
  --muted: #a7a49c;
  --line: #26262a;
  --accent: #d4af37;
  --accent-deep: #a8862c;
  --gold: #e6c56d;
  --green: #24362b;
  --ok: #5fd39c;
  --ok-bg: rgba(95, 211, 156, 0.16);
  --pending: #e6b84c;
  --pending-bg: rgba(230, 184, 76, 0.16);
  --reject: #ff7a6b;
  --reject-bg: rgba(255, 122, 107, 0.16);
  --danger: #ff5147;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.7);
  --maxw: 1080px;
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  letter-spacing: -0.01em;
  line-height: 1.25;
  font-weight: 600;
  color: var(--ink);
}

.kicker {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-serif);
  color: var(--accent);
  letter-spacing: 0.02em;
  font-size: 1.3rem;
  text-decoration: none;
  font-weight: 600;
}

.brand-cross {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  color: var(--gold);
  opacity: 0.95;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  font: 600 0.95rem/1.4 var(--font-sans);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  color: var(--ink);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-deep);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #d9443b;
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-media {
  width: 100%;
  display: block;
  object-fit: cover;
  border: 3px solid #f8f7f4;
}

.card-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.9rem 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
}

.status-pending {
  color: var(--pending);
  background: var(--pending-bg);
}

.status-approved {
  color: var(--ok);
  background: var(--ok-bg);
}

.status-rejected {
  color: var(--reject);
  background: var(--reject-bg);
}

.gallery-grid {
  column-count: 1;
  column-gap: 1rem;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.gallery-item .card-media {
  border-radius: 0;
}

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted);
  max-width: 40rem;
  margin-inline: auto;
}

.empty-state h2 {
  font-family: var(--font-serif);
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.field {
  display: block;
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--paper);
  font: inherit;
  color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.help {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.upload-drop {
  border: 2px dashed var(--gold);
  border-radius: var(--radius);
  background: var(--bg-alt);
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.upload-drop:hover {
  border-color: var(--accent);
}

.upload-drop.dragover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--accent);
}

.drop-icon {
  height: 2.5rem;
}

.dialog {
  border: 0;
  padding: 0;
  background: transparent;
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(94vw, 1000px);
  height: fit-content;
  max-height: 92dvh;
  overflow: visible;
  color: var(--ink);
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.lightbox-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem;
}

.lightbox-open {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  line-height: 0;
}

.lightbox-media {
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  display: block;
  margin-inline: auto;
  border: 3px solid #f8f7f4;
  border-radius: var(--radius);
  background: #0d0b08;
}

.lightbox-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  color: #eee;
  font-size: 0.9rem;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.9);
  color: #2d2a24;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.lightbox-nav.prev {
  left: 0.4rem;
}

.lightbox-nav.next {
  right: 0.4rem;
}

.toast {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: #232323;
  color: #f8f7f4;
  border: 1px solid #33333a;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  font-size: 0.9rem;
  font-weight: 500;
  animation: toast-in 0.25s ease;
}

.toast-error {
  background: var(--danger);
}

.toast-ok {
  background: var(--ok);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.loader {
  width: 34px;
  height: 34px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin-inline: auto;
  animation: spin 0.8s linear infinite;
}

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

.hero {
  text-align: center;
  padding: 3.5rem 1rem;
}

.hero-cross {
  display: block;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.9rem;
  color: var(--gold);
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.hero p {
  color: var(--muted);
  max-width: 34rem;
  margin-inline: auto;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 600px) {
  .container {
    padding-inline: 1.5rem;
  }

  .gallery-grid {
    column-count: 2;
  }

  .hero {
    padding-block: 4.5rem;
  }

  .toast {
    bottom: 1.5rem;
  }
}

@media (min-width: 900px) {
  .gallery-grid {
    column-count: 3;
  }

  .hero {
    padding-block: 5rem;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}