:root {
  --sand: #e8d8c3;
  --gold: #d6b074;
  --ivory: #f8f5f1;
  --taupe: #a58d78;
  --ink: #2e2e2e;
  --line: rgba(165, 141, 120, 0.24);
  --card: rgba(248, 245, 241, 0.76);
  --card-strong: rgba(255, 252, 248, 0.88);
  --shadow: 0 26px 70px rgba(101, 72, 43, 0.12);
  --hero-shadow: 0 42px 90px rgba(92, 65, 38, 0.18);
  --success: #5c7e65;
  --error: #a65d54;
  --max-width: 72rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Montserrat", sans-serif;
  background:
    radial-gradient(circle at top center, rgba(214, 176, 116, 0.22), transparent 28%),
    linear-gradient(180deg, #f9f6f2 0%, #f4eee7 52%, #f2e7db 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.15)),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.55), transparent 18%),
    radial-gradient(circle at 80% 0%, rgba(214, 176, 116, 0.12), transparent 22%);
  mix-blend-mode: screen;
}

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

a,
button,
label,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

.site-shell {
  width: min(calc(100% - 1.5rem), var(--max-width));
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

.album-hero,
.subpage-hero,
.story-band,
.upload-section,
.album-links,
.site-footer,
.album-card {
  animation: fadeRise 900ms ease both;
}

.reveal {
  animation-delay: 80ms;
}

.album-hero {
  position: relative;
  overflow: hidden;
  min-height: 88vh;
  display: grid;
  align-items: end;
  border-radius: 2rem;
  box-shadow: var(--hero-shadow);
  background: #d9c3a5;
}

.hero-image-wrap {
  position: absolute;
  inset: 0;
}

.hero-image-wrap picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1.03);
  animation: driftZoom 18s ease-in-out infinite alternate;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(39, 31, 25, 0.02) 0%, rgba(39, 31, 25, 0.16) 62%, rgba(39, 31, 25, 0.42) 100%),
    linear-gradient(90deg, rgba(248, 245, 241, 0.2) 0%, rgba(248, 245, 241, 0.02) 52%);
}

.hero-copy,
.subpage-hero-copy {
  position: relative;
  z-index: 1;
}

.hero-copy {
  width: min(100%, 30rem);
  padding: 1.5rem 1.3rem 1.6rem;
  color: #fffaf3;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-title,
.subpage-title {
  margin: 0;
}

.script-line {
  display: block;
  font-family: "Great Vibes", cursive;
  font-size: clamp(3rem, 12vw, 5.6rem);
  font-weight: 400;
  line-height: 0.95;
}

.title-line {
  display: block;
  margin-top: 0.55rem;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(2rem, 7vw, 3.55rem);
  line-height: 1;
}

.hero-intro,
.section-copy,
.intro {
  font-size: 1rem;
  line-height: 1.9;
}

.hero-intro {
  max-width: 28rem;
  margin: 1rem 0 0;
  color: rgba(255, 250, 243, 0.88);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.ghost-link,
.inline-link,
.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.78rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 250, 243, 0.28);
  color: inherit;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    background-color 220ms ease;
}

.hero-link {
  background: rgba(34, 28, 24, 0.58);
  color: #fffaf3;
  border-color: rgba(255, 250, 243, 0.24);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px rgba(25, 20, 17, 0.18);
}

.hero-upload-link {
  cursor: pointer;
}

.ghost-link:hover,
.inline-link:hover,
.hero-link:hover,
.secondary-button:hover,
.upload-button:hover,
.filter-chip:hover,
.choice-card:hover {
  transform: translateY(-1px);
}

.story-band,
.album-links {
  display: grid;
  gap: 1rem;
  margin-top: 1.2rem;
}

.story-card,
.viewer-note,
.album-link-card,
.album-card,
.wall-photo-card,
.gallery-card {
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: var(--card);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.story-card {
  padding: 1.3rem;
  border-radius: 1.6rem;
}

.story-card h2,
.section-heading h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1;
}

.story-card p:last-child {
  margin: 0.7rem 0 0;
  color: rgba(46, 46, 46, 0.72);
  line-height: 1.8;
}

.story-card-accent {
  background:
    linear-gradient(145deg, rgba(255, 252, 247, 0.92), rgba(232, 216, 195, 0.66));
}

.upload-section,
.site-footer {
  margin-top: 1.4rem;
}

.composer-screen {
  margin-top: 1.2rem;
}

.section-heading {
  max-width: 36rem;
  margin-bottom: 1rem;
}

.composer-kicker {
  margin: 0 0 0.55rem;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.45rem;
  color: rgba(46, 46, 46, 0.72);
}

.section-copy {
  margin: 0.8rem 0 0;
  color: rgba(46, 46, 46, 0.72);
}

.album-card {
  padding: 1.15rem;
  border-radius: 1.8rem;
}

.composer-card {
  max-width: 44rem;
  margin: 0 auto;
}

.composer-heading {
  margin-bottom: 0.25rem;
}

.upload-panel,
.meta-form,
.status-box,
.preview-grid {
  margin-top: 1rem;
}

.composer-actions {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.upload-actions {
  display: grid;
  gap: 0.8rem;
}

.upload-button,
.secondary-button {
  display: grid;
  gap: 0.25rem;
  width: 100%;
  padding: 1.15rem 1rem;
  border: 1px solid transparent;
  border-radius: 1.25rem;
  background: linear-gradient(180deg, #d8b57a 0%, #c39a60 100%);
  color: #fffdf8;
  text-align: center;
  font: inherit;
  font-weight: 700;
  box-shadow: 0 18px 40px rgba(190, 148, 80, 0.22);
  cursor: pointer;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    background-color 220ms ease;
}

.upload-button span {
  font-size: 1.08rem;
}

.upload-button small {
  font-size: 0.88rem;
  font-weight: 500;
  opacity: 0.92;
}

.secondary-button.ghost {
  background: rgba(255, 252, 248, 0.76);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: none;
}

#photo-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#camera-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-button-secondary,
.secondary-hero-link {
  background: rgba(255, 252, 248, 0.96);
  color: var(--ink);
  border-color: rgba(165, 141, 120, 0.34);
  box-shadow: 0 12px 28px rgba(109, 82, 51, 0.08);
}

.upload-button-secondary small,
.secondary-hero-link {
  color: inherit;
}

.upload-button-secondary span,
.upload-button-secondary small {
  color: var(--ink);
}

.tips,
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tips {
  margin-top: 0.9rem;
}

.tips span,
.filter-chip {
  min-height: 2.8rem;
  padding: 0.72rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.52);
  color: rgba(46, 46, 46, 0.72);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
}

.meta-form,
.privacy-fieldset {
  display: grid;
  gap: 0.95rem;
}

.privacy-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.privacy-fieldset legend,
.meta-form span {
  margin-bottom: 0.15rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(46, 46, 46, 0.72);
}

.choice-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.48);
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    background-color 220ms ease;
}

.choice-card input {
  margin-top: 0.28rem;
  accent-color: #c59e63;
  transform: scale(1.14);
}

.choice-card strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
}

.choice-card span {
  display: block;
  margin-top: 0.2rem;
  color: rgba(46, 46, 46, 0.66);
  font-size: 0.86rem;
  line-height: 1.65;
}

.meta-form label {
  display: grid;
}

.meta-form input,
.meta-form textarea {
  width: 100%;
  padding: 1rem 1rem 0.95rem;
  border: 1px solid rgba(165, 141, 120, 0.28);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  font: inherit;
  line-height: 1.6;
}

.meta-form textarea {
  resize: vertical;
  min-height: 6.25rem;
}

.meta-form input:focus,
.meta-form textarea:focus,
.choice-card:has(input:focus),
.filter-chip:focus,
.secondary-button:focus,
.upload-button:focus,
.hero-link:focus,
.ghost-link:focus,
.inline-link:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(214, 176, 116, 0.14);
}

.status-box,
.viewer-note {
  padding: 1rem 1.05rem;
  border-radius: 1.2rem;
  border: 1px solid var(--line);
  background: var(--card-strong);
}

.status-box {
  color: rgba(46, 46, 46, 0.72);
}

.status-box.success {
  color: var(--success);
  border-color: rgba(92, 126, 101, 0.22);
  background: rgba(244, 249, 244, 0.96);
}

.status-box.error {
  color: var(--error);
  border-color: rgba(166, 93, 84, 0.22);
  background: rgba(255, 246, 244, 0.96);
}

.hidden {
  display: none;
}

.preview-grid,
.gallery-grid,
.wall-grid {
  display: grid;
  gap: 0.9rem;
}

.preview-card,
.gallery-card,
.wall-photo-card {
  overflow: hidden;
  border-radius: 1.35rem;
}

.preview-card {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.9rem;
  align-items: center;
  padding: 0.8rem;
}

.preview-card img {
  width: 5rem;
  height: 5rem;
  border-radius: 1rem;
  object-fit: cover;
}

.preview-meta strong,
.gallery-name,
.wall-photo-name {
  font-size: 0.98rem;
  font-weight: 700;
}

.preview-meta span,
.gallery-message,
.gallery-meta,
.wall-photo-message,
.wall-photo-time,
.viewer-note p {
  color: rgba(46, 46, 46, 0.68);
  line-height: 1.7;
}

.viewer-note strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
}

.viewer-note p {
  margin: 0.3rem 0 0;
  font-size: 0.92rem;
}

.inline-link,
.ghost-link {
  color: #9a7750;
  border-color: rgba(165, 141, 120, 0.22);
}

.hero-link.ghost-link,
.hero-upload-link {
  color: #fffaf3;
}

.inline-link {
  margin-top: 0.8rem;
}

.album-link-card {
  display: grid;
  gap: 0.35rem;
  padding: 1.15rem 1.1rem;
  border-radius: 1.35rem;
  color: inherit;
  text-decoration: none;
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    background-color 220ms ease;
}

.album-link-card strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.65rem;
  line-height: 1.05;
}

.album-link-card span:last-child {
  color: rgba(46, 46, 46, 0.68);
  line-height: 1.7;
  font-size: 0.92rem;
}

.album-link-card:hover {
  border-color: rgba(214, 176, 116, 0.35);
  box-shadow: 0 24px 48px rgba(101, 72, 43, 0.14);
}

.album-link-eyebrow {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-footer {
  padding: 0.6rem 0 1rem;
  text-align: center;
}

.footer-quote {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.55rem;
  color: rgba(46, 46, 46, 0.72);
}

.footer-credit {
  margin: 0.85rem 0 0;
  color: rgba(46, 46, 46, 0.58);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}

.footer-admin-link {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
}

.footer-admin-link a {
  color: #9a7750;
  text-decoration: none;
  font-weight: 600;
}

.footer-credit a {
  color: #9a7750;
  text-decoration: none;
  font-weight: 600;
}

.subpage-hero {
  display: grid;
  gap: 1rem;
  margin-top: 0.4rem;
}

.subpage-image-frame {
  overflow: hidden;
  border-radius: 1.8rem;
  box-shadow: var(--hero-shadow);
}

.subpage-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.subpage-title .title-line {
  color: var(--ink);
}

.subpage-title .script-line {
  color: #97734d;
}

.admin-card,
.wall-card {
  margin-top: 1.15rem;
}

.admin-login-form {
  display: grid;
  gap: 0.95rem;
}

.toolbar,
.wall-toolbar {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.filter-chip {
  cursor: pointer;
  transition:
    transform 220ms ease,
    background-color 220ms ease,
    color 220ms ease,
    border-color 220ms ease;
}

.filter-chip.active {
  color: #fffdf8;
  border-color: transparent;
  background: linear-gradient(180deg, #d8b57a 0%, #c39a60 100%);
  box-shadow: 0 14px 28px rgba(190, 148, 80, 0.16);
}

.gallery-card img,
.wall-photo-card img {
  width: 100%;
  object-fit: cover;
}

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

.wall-photo-card img {
  aspect-ratio: 4 / 5;
}

.gallery-copy,
.wall-photo-copy {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem 0.9rem 1rem;
}

.gallery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.mini-action {
  min-height: 2.5rem;
  padding: 0.62rem 0.9rem;
  border: 1px solid rgba(165, 141, 120, 0.26);
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.92);
  color: var(--ink);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.delete-action-button {
  color: #8f433d;
  border-color: rgba(166, 93, 84, 0.26);
}

.mini-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(70, 49, 29, 0.08);
}

.gallery-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  color: rgba(46, 46, 46, 0.58);
  font-size: 0.8rem;
}

.visibility-badge {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  background: rgba(214, 176, 116, 0.16);
  color: #9a7750;
  font-size: 0.74rem;
  font-weight: 700;
}

.visibility-badge[data-visibility="public"] {
  background: rgba(92, 126, 101, 0.12);
  color: var(--success);
}

.gallery-link {
  color: #9a7750;
  font-weight: 700;
  text-decoration: none;
}

.gallery-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

@keyframes fadeRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes driftZoom {
  from {
    transform: scale(1.02);
  }

  to {
    transform: scale(1.08);
  }
}

@media (min-width: 720px) {
  .site-shell {
    width: min(calc(100% - 2.5rem), var(--max-width));
    padding-top: 1.25rem;
  }

  .album-hero {
    min-height: 92vh;
  }

  .hero-image {
    object-position: 58% center;
  }

  .hero-copy {
    padding: 2.4rem;
  }

  .story-band,
  .album-links,
  .subpage-hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .album-card {
    padding: 1.35rem;
  }

  .toolbar,
  .wall-toolbar,
  .admin-login-form {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

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

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

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

@media (min-width: 1024px) {
  .site-shell {
    padding-bottom: 5rem;
  }

  .album-hero {
    min-height: 0;
    grid-template-columns: minmax(22rem, 0.88fr) minmax(0, 1.22fr);
    align-items: stretch;
    gap: 1.4rem;
    padding: 1.35rem;
    background: rgba(248, 245, 241, 0.78);
  }

  .hero-image-wrap {
    position: relative;
    min-height: 34rem;
    border-radius: 1.65rem;
    overflow: hidden;
    box-shadow: var(--hero-shadow);
  }

  .hero-image-wrap picture {
    height: 100%;
  }

  .hero-copy {
    width: 100%;
    margin: 0;
    padding: 2rem 1.7rem 2rem 0.5rem;
    color: var(--ink);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    backdrop-filter: none;
    box-shadow: none;
  }

  .hero-copy .eyebrow {
    color: #b4874a;
  }

  .hero-title {
    display: block;
    margin-top: 0.2rem;
  }

  .hero-intro {
    margin-top: 1rem;
    max-width: none;
    color: rgba(46, 46, 46, 0.78);
    font-size: 1.04rem;
  }

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

  .hero-link {
    min-width: 12.5rem;
  }

  .hero-image {
    object-position: center center;
    object-fit: cover;
    transform: none;
  }

  .hero-overlay {
    background: linear-gradient(
      180deg,
      rgba(39, 31, 25, 0.01) 0%,
      rgba(39, 31, 25, 0.03) 100%
    );
  }

  .upload-section .album-card {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 1.25rem;
    align-items: start;
  }

  .upload-panel {
    margin-top: 0;
    position: sticky;
    top: 1.25rem;
  }

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

  .preview-grid,
  .status-box {
    grid-column: 1 / -1;
  }

  .subpage-hero {
    grid-template-columns: 0.88fr 1.12fr;
    align-items: end;
  }

  .subpage-image-frame {
    min-height: 28rem;
  }

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

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