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

:root {
  --bg:       #07131a;
  --bg-card:  rgba(8, 19, 26, 0.92);
  --card-line: rgba(255, 255, 255, 0.09);
  --text:     #F5F0E6;
  --muted:    #b6c2c4;
  --accent:   #FF006B;
  --champagne:#D4B885;
  --input:    rgba(255, 255, 255, 0.06);
  --shadow:   0 30px 80px rgba(0, 0, 0, 0.45);
  --surface:  rgba(255,255,255,0.04);
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .serif { font-family: "Playfair Display", serif; }

/* ── Page shell ─────────────────────────────────────────── */
.shell {
  max-width: 480px;
  margin: 0 auto;
  padding: 36px 20px 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Brand pill ─────────────────────────────────────────── */
.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border: 1px solid rgba(255, 0, 107, 0.35);
  border-radius: 999px;
  background: rgba(255, 0, 107, 0.08);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 36px;
}
.brand-pill .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ── Card ───────────────────────────────────────────────── */
.card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--card-line);
  border-radius: 28px;
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
  padding: 36px 32px;
}
@media (max-width: 400px) {
  .card { padding: 28px 20px; }
}

/* ── Typography ─────────────────────────────────────────── */
h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 1.2;
  margin-bottom: 12px;
}

.subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 32px;
}

/* ── Form ───────────────────────────────────────────────── */
form { width: 100%; }

.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.field input {
  width: 100%;
  background: var(--input);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none;
}
.field input:focus {
  border-color: rgba(255, 0, 107, 0.5);
  background: rgba(255, 0, 107, 0.04);
}
.field input::placeholder { color: rgba(182,194,196,0.5); }

.btn-primary {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 16px;
  cursor: pointer;
  margin-top: 6px;
  letter-spacing: 0.03em;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-primary:hover  { opacity: 0.9; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.error-inline {
  color: #ff8d84;
  font-size: 0.83rem;
  margin-top: 12px;
  text-align: center;
  display: none;
}

/* ── Confirm state ──────────────────────────────────────── */
.check-ring {
  width: 68px; height: 68px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: rgba(255,0,107,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  color: var(--accent);
  margin: 0 auto 24px;
}

/* ── App nudge ──────────────────────────────────────────── */
.app-nudge {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--card-line);
  text-align: center;
  width: 100%;
}
.app-nudge p {
  color: var(--muted);
  font-size: 0.83rem;
  margin-bottom: 14px;
  line-height: 1.5;
}
.app-badge img { height: 40px; }

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--card-line);
  margin: 28px 0;
}

/* ═══════════════════════════════════════════════════════════
   GALLERY PAGE
   ═══════════════════════════════════════════════════════════ */
.gallery-shell {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 16px 80px;
}

.gallery-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 12px;
  flex-wrap: wrap;
}

.gallery-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-mark {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1;
}
.logo-mark span { color: var(--accent); }

.guest-tag .label {
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.guest-tag .name {
  font-weight: 700;
  color: var(--champagne);
  font-size: 0.95rem;
  font-family: "Playfair Display", serif;
}

.gallery-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.count-badge {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 6px 14px;
  border: 1px solid var(--card-line);
  border-radius: 999px;
}

.btn-outline {
  background: none;
  border: 1px solid rgba(255,0,107,0.4);
  color: var(--accent);
  border-radius: 10px;
  padding: 9px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
  letter-spacing: 0.02em;
}
.btn-outline:hover { background: rgba(255,0,107,0.08); }

/* Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  width: 100%;
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 14px;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--card-line);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
  display: block;
}
.gallery-item:hover img { transform: scale(1.05); }

.gallery-item .dl-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(7,19,26,0.85);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 600;
  font-family: inherit;
  padding: 5px 10px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  text-decoration: none;
  letter-spacing: 0.04em;
}
.gallery-item:hover .dl-btn { opacity: 1; }

/* Loading / error states */
.state-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  width: 100%;
}
.state-center .icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  opacity: 0.4;
}
.state-center h2 {
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 8px;
}
.state-center p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 300px;
}

/* Spinner */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-bottom: 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(7,19,26,0.96);
  z-index: 300;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lightbox.open { display: flex; }

.lightbox img {
  max-width: 92vw;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 10px;
}
.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.lightbox-close:hover { color: var(--text); }

.lightbox-actions {
  margin-top: 18px;
  display: flex;
  gap: 12px;
}
.lightbox-actions a {
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: 11px 28px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  font-family: inherit;
  letter-spacing: 0.03em;
  transition: opacity 0.2s;
}
.lightbox-actions a:hover { opacity: 0.88; }
