:root {
  --bg: #f3efe9;
  --panel: #f8f6f3;
  --ink: #171613;
  --muted: #5d5852;
  --line: rgba(23, 22, 19, 0.15);
  --button: #1d1c1a;
  --button-text: #f4f1eb;
  --shadow: rgba(23, 22, 19, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", sans-serif;
}

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

.page-shell {
  width: min(900px, calc(100% - 36px));
  margin: 0 auto;
  padding: 72px 0 96px;
}

.home {
  display: grid;
  gap: 36px;
}

.intro {
  text-align: center;
  padding: 28px 0 8px;
}

.kicker,
.panel-label,
.album-meta {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
}

h1 {
  margin-top: 12px;
  font-family: "Libre Baskerville", serif;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  padding: 16px 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--button);
  color: var(--button-text);
  text-decoration: none;
  font-weight: 500;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  opacity: 0.96;
}

.panel {
  display: block;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 24px;
  box-shadow: 0 10px 30px var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.panel:hover,
.panel:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(23, 22, 19, 0.25);
  box-shadow: 0 14px 30px rgba(23, 22, 19, 0.1);
}

.panel-link {
  cursor: pointer;
}

.panel-title-link {
  display: inline-block;
  margin: 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}

.panel-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.centered-panel-header {
  justify-content: center;
  text-align: center;
  margin-bottom: 8px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-family: "Libre Baskerville", serif;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.latest-album {
  margin: 0 0 20px;
  text-align: center;
  font-size: 1rem;
  color: var(--muted);
}

.coming-soon {
  text-align: center;
  padding-top: 52px;
  padding-bottom: 52px;
}

.coming-soon h2 {
  margin-top: 10px;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.25;
}

.under-construction-text {
  margin: 20px 0 0;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.construction-page {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
  padding: 40px 0;
}

.construction-page h1 {
  max-width: 760px;
  font-family: "Libre Baskerville", serif;
  font-size: clamp(2.1rem, 4vw, 3.6rem);
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.construction-message {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.back-button {
  margin-top: 10px;
}

.album-page {
  display: grid;
  gap: 28px;
  padding-top: 16px;
}

.album-header {
  text-align: center;
}

.album-header h1 {
  margin-top: 12px;
  font-family: "Libre Baskerville", serif;
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.album-list-card {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 24px var(--shadow);
}

.album-cover {
  height: 320px;
}

.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-summary {
  padding: 18px 18px 20px;
}

.album-summary h2 {
  margin-top: 8px;
  font-family: "Libre Baskerville", serif;
  font-size: clamp(1.6rem, 2.3vw, 2.3rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.album-type {
  margin: 12px 0 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.placeholder {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
}

.placeholder-copy {
  text-align: center;
  padding: 18px;
}

.page-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.button-secondary {
  background: transparent;
  color: var(--ink);
}

.album-link {
  color: inherit;
  text-decoration: none;
}

.admin-page {
  display: grid;
  gap: 28px;
}

.admin-panel {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 10px 30px var(--shadow);
  padding: 24px;
}

.admin-local-note {
  margin: -4px 0 0;
  text-align: center;
  color: var(--muted);
  line-height: 1.7;
}

.admin-toolbar {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.album-form {
  display: grid;
  gap: 20px;
}

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

label {
  display: grid;
  gap: 8px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.full-width {
  grid-column: 1 / -1;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
}

.photo-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.photo-section-header h2 {
  font-size: 1.3rem;
}

.photo-entries {
  display: grid;
  gap: 14px;
}

.photo-entry {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.media-picker {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.media-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
}

.admin-albums {
  display: grid;
  gap: 12px;
}

.admin-album-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.admin-album-item p {
  margin: 6px 0 0;
  color: var(--muted);
}

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

.inline-header {
  margin-bottom: 18px;
}

@media (max-width: 640px) {
  .field-grid,
  .photo-entry,
  .media-picker-grid {
    grid-template-columns: 1fr;
  }

  .photo-section-header,
  .admin-album-item {
    display: grid;
    gap: 10px;
  }
}

.gallery-page {
  display: grid;
  gap: 38px;
}

.gallery-hero {
  display: grid;
  gap: 12px;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.gallery-hero h1 {
  margin: 0;
  font-family: "Libre Baskerville", serif;
  font-size: clamp(2.4rem, 4vw, 4rem);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.gallery-intro {
  display: grid;
  gap: 1em;
  width: 100%;
  margin: 0;
  padding-top: 8px;
  padding-bottom: 18px;
  color: var(--muted);
  line-height: 1.9;
  font-size: 1rem;
  text-align: justify;
  text-wrap: pretty;
  border-bottom: none;
}

.gallery-intro p {
  margin: 0;
}

.gallery-subtitle {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.gallery-item {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 22px var(--shadow);
  cursor: pointer;
  aspect-ratio: 4 / 3;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 9, 8, 0.9);
  z-index: 100;
  padding: 24px;
}

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

.lightbox-stage {
  width: min(1100px, 88vw);
  max-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-stage img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  cursor: pointer;
}

.lightbox-close {
  top: 22px;
  right: 26px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 2.2rem;
}

.lightbox-nav.prev {
  left: 24px;
}

.lightbox-nav.next {
  right: 24px;
}

.lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 48px));
  margin: 0;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(12, 10, 9, 0.78);
  color: #f4f1eb;
  text-align: center;
  line-height: 1.6;
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .album-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item {
    aspect-ratio: 4 / 3;
  }

  .lightbox-nav {
    top: auto;
    bottom: 80px;
    transform: none;
  }

  .lightbox-nav.prev {
    left: 24px;
  }

  .lightbox-nav.next {
    right: 24px;
  }

  .lightbox-caption {
    bottom: 18px;
    border-radius: 16px;
  }
}

.album-card {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 20px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.album-image {
  min-height: 320px;
}

.album-image img {
  height: 100%;
  object-fit: cover;
}

.album-copy {
  padding: 10px 22px 10px 0;
}

.album-copy h3 {
  margin-top: 8px;
  font-family: "Libre Baskerville", serif;
  font-size: clamp(2rem, 3vw, 2.8rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 24px, 900px);
    padding-top: 48px;
  }

  .panel {
    padding: 22px 18px;
  }

  .actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

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

  .album-copy {
    padding: 0 18px 18px;
  }
}
