* {
  box-sizing: border-box;
}

:root {
  --gold: #d8b76a;
  --gold-dark: #a87d2c;
  --cream: #fff9f0;
  --beige: #eadcc7;
  --rose: #f3c9c9;
  --ink: #3e3328;
  --muted: #7d6e62;
  --card: rgba(255,255,255,.86);
  --shadow: 0 18px 45px rgba(86, 62, 32, .16);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(243, 201, 201, .55), transparent 36rem),
    linear-gradient(135deg, #fffaf4 0%, #f4e7d7 52%, #fff3f3 100%);
  min-height: 100vh;
}

.hero {
  padding: 32px 16px 18px;
}

.hero.small {
  padding-bottom: 6px;
}

.hero-card {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
  padding: 34px 18px;
  border: 1px solid rgba(216, 183, 106, .55);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(255,255,255,.9), rgba(255,246,238,.72));
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .24em;
  font-size: .78rem;
  color: var(--gold-dark);
  font-weight: 700;
}

h1 {
  margin: 6px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 12vw, 5.8rem);
  line-height: .95;
  color: #5a3e20;
}

h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 3vw, 1.25rem);
}

.container {
  width: min(1040px, calc(100% - 28px));
  margin: 0 auto 40px;
}

.upload-card,
.gallery-section {
  background: var(--card);
  border: 1px solid rgba(216,183,106,.42);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  margin-top: 18px;
}

label {
  display: block;
  font-weight: 700;
  margin: 0 0 8px;
}

label span {
  font-weight: 500;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  border: 1px solid rgba(168,125,44,.35);
  border-radius: 16px;
  padding: 14px 15px;
  font: inherit;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input:focus {
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 3px rgba(216,183,106,.22);
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 54px;
  border: 0;
  border-radius: 18px;
  display: grid;
  place-items: center;
  text-align: center;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  font: inherit;
}

.primary-button {
  background: linear-gradient(135deg, var(--gold), #f0d999);
  color: #3b2812;
}

.secondary-button {
  background: #fff;
  border: 1px solid rgba(168,125,44,.35);
  color: #5a3e20;
}

.ghost-button {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(125,110,98,.3);
  padding: 0 16px;
}

.real-button {
  width: 100%;
  margin-top: 14px;
}

input[type="file"] {
  display: none;
}

.status {
  min-height: 24px;
  margin-top: 12px;
  color: var(--muted);
  font-size: .95rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-actions .real-button {
  width: auto;
  margin-top: 0;
  padding: 0 18px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 12px;
}

.photo-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(216,183,106,.38);
  cursor: pointer;
}

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

.photo-meta {
  padding: 9px 10px 10px;
  font-size: .86rem;
  color: var(--muted);
}

.delete-button {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(70, 34, 20, .88);
  color: white;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 18px;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(35, 25, 18, .88);
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 22px;
}

.lightbox img {
  max-width: min(920px, 100%);
  max-height: 78vh;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.lightbox p {
  color: #fff;
  margin: 12px 0 0;
}

#closeLightbox {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: white;
  color: var(--ink);
  font-size: 30px;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

footer {
  text-align: center;
  padding: 18px;
}

footer a {
  color: var(--muted);
}

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

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

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

  .hero-card {
    padding: 26px 14px;
  }
}
