﻿:root {
  color-scheme: light;
  --ink: #292d29;
  --muted: #777b74;
  --green: #536b58;
  --cream: #f6f4ef;
  --line: #e5e2d9;
  --coral: #c27b66;
  --panel: #fffefa;
  --card-shadow: rgba(85, 81, 59, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--cream);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
}

body {
  min-height: 100vh;
}

button, input {
  font: inherit;
}

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

.shell {
  width: min(100% - 32px, 560px);
  margin: 0 auto;
  padding: 28px 0 20px;
}

.brand, footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 10px;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--muted);
}

.sparkle {
  color: var(--coral);
  font-size: 20px;
}

.card {
  margin: 26px 0 18px;
  background: var(--panel);
  border: 1px solid #eae7df;
  border-radius: 24px;
  padding: clamp(20px, 5vw, 36px);
  box-shadow: 0 18px 55px var(--card-shadow);
}

.eyebrow {
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--coral);
  font-weight: 700;
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(35px, 9vw, 48px);
  line-height: 1.08;
  text-align: center;
  margin: 16px 0 12px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.intro {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  max-width: 360px;
  margin: 0 auto 22px;
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 8px;
}

.field-label span {
  color: #9a9d96;
  font-weight: 400;
}

input[type='text'] {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 0 13px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}

input[type='text']:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(83, 107, 88, 0.12);
}

.dropzone {
  position: relative;
  margin-top: 18px;
  min-height: 160px;
  border: 1px dashed #b9c2b8;
  border-radius: 13px;
  background: #f8f9f5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  padding: 18px;
  cursor: pointer;
  transition: 0.18s ease;
}

.dropzone:hover,
.dropzone.active {
  border-color: var(--green);
  background: #f1f5ef;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #e8eee6;
  color: var(--green);
  font-size: 21px;
  margin-bottom: 3px;
}

.dropzone strong {
  font-size: 13px;
}

.dropzone span:last-of-type {
  font-size: 11px;
  color: var(--muted);
}

#photos {
  position: absolute;
  inset: -9999px;
  opacity: 0;
}

.preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  min-height: 20px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 9px;
  border-radius: 999px;
  background: #f3f3ef;
  border: 1px solid #ede6dc;
  color: #3d403d;
  font-size: 11px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.actions-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.submit,
.secondary {
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.submit {
  width: 100%;
  background: var(--green);
  color: #fff;
  box-shadow: 0 12px 24px rgba(83, 107, 88, 0.2);
}

.secondary {
  background: #f5efe8;
  color: var(--ink);
  border: 1px solid #e5dfd2;
}

.submit:hover,
.secondary:hover {
  transform: translateY(-1px);
}

.submit:disabled {
  opacity: 0.75;
  cursor: wait;
}

.status {
  display: none;
  min-height: 20px;
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 10px;
  padding: 10px 12px;
}

.status.visible {
  display: block;
}

.status.success {
  background: #edf8ec;
  border: 1px solid #cfeacf;
  color: #285a2a;
}

.status.error {
  background: #fff2f2;
  border: 1px solid #f3d4d4;
  color: #8d1d1d;
}

.status.info {
  background: #f6f4f0;
  border: 1px solid #e4decf;
  color: #5d625c;
}

.privacy {
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.hidden {
  display: none !important;
}

.album-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.album-card {
  border: 1px solid #e7e0d6;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.album-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f4f0ea;
}

.album-caption {
  display: block;
  padding: 10px 8px 12px;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-empty {
  border: 1px dashed #cdc4b6;
  border-radius: 14px;
  padding: 26px 18px;
  text-align: center;
  background: #faf7f2;
}

.album-empty p {
  margin: 0 0 8px;
  font-weight: 700;
}

.album-empty span {
  color: var(--muted);
  font-size: 13px;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(22, 18, 16, 0.78);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 30;
}

.lightbox img {
  max-width: min(90vw, 820px);
  max-height: 78vh;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
  background: rgba(255, 255, 255, 0.06);
}

.lightbox-nav,
.lightbox-close {
  position: absolute;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: white;
  width: 46px;
  height: 46px;
  font-size: 28px;
  cursor: pointer;
}

.lightbox-close {
  top: 22px;
  right: 22px;
}

.lightbox-prev {
  left: 18px;
}

.lightbox-next {
  right: 18px;
}

.lightbox-caption {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  background: rgba(0, 0, 0, 0.32);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  max-width: calc(100vw - 80px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .album-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .actions-row {
    flex-direction: row;
  }

  .submit {
    flex: 1;
    width: auto;
  }

  .secondary {
    min-width: 160px;
  }
}
