:root {
  --navy: #1a2456;
  --navy-dark: #10173b;
  --gold: #cba135;
  --gold-light: #e6cd7d;
  --bg: #faf8f3;
  --card: #ffffff;
  --text: #262a3b;
  --text-muted: #6b6f80;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 40px;
}

.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: white;
  text-align: center;
  padding: 40px 20px 28px;
  border-bottom: 4px solid var(--gold);
}

.hero-photo {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--gold);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  margin-bottom: 16px;
}

.eyebrow {
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 12px;
  margin: 0 0 8px;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 30px;
  margin: 0;
}

.event-date-line {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.3px;
}

.event-date {
  margin: 6px 0 0;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
}

.tabs {
  display: flex;
  max-width: 520px;
  margin: 16px auto 0;
  padding: 0 16px;
  gap: 8px;
}

.tab {
  flex: 1;
  border: none;
  background: white;
  padding: 10px 6px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.tab.active {
  background: var(--navy);
  color: white;
}

main {
  max-width: 520px;
  margin: 20px auto;
  padding: 0 16px;
}

.panel { display: none; }
.panel.active { display: block; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.card.center { text-align: center; }

.field {
  display: block;
  margin-bottom: 16px;
}

.field span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.field input[type="text"],
.field textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e2e0d8;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

.file-field input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
}

.file-field { position: relative; }

.file-preview {
  border: 2px dashed #d9d5c8;
  border-radius: 10px;
  padding: 30px 10px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  overflow: hidden;
}

.file-preview img {
  max-width: 100%;
  max-height: 220px;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

.btn-primary, .btn-secondary {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy-dark);
}

.btn-primary:disabled { opacity: 0.6; }

.btn-secondary {
  background: var(--navy);
  color: white;
  margin-top: 10px;
}

.upload-status {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
  font-size: 14px;
}

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

.gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  background: #eee;
}

.qr-image {
  width: 220px;
  height: 220px;
  margin: 16px auto;
  border-radius: 10px;
  border: 6px solid white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.share-url {
  font-size: 13px;
  color: var(--text-muted);
  word-break: break-all;
  margin: 8px 0 4px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(16,23,59,0.92);
  z-index: 100;
  overflow-y: auto;
}

.modal.open { display: block; }

.modal-content {
  max-width: 520px;
  margin: 0 auto;
  padding: 16px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.15);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 16px;
  cursor: pointer;
  z-index: 2;
}

#modalImage {
  width: 100%;
  border-radius: 10px;
  display: block;
}

.modal-info {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  margin-top: -20px;
  position: relative;
}

.modal-uploader {
  font-size: 14px;
  margin: 0 0 6px;
}

.modal-uploader span {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 12px;
}

.modal-caption {
  font-size: 14px;
  margin: 0 0 14px;
}

.comments-list {
  border-top: 1px solid #eee;
  padding-top: 10px;
  margin-bottom: 10px;
  max-height: 180px;
  overflow-y: auto;
}

.comment-item {
  font-size: 13px;
  margin-bottom: 8px;
}

.comment-item strong { color: var(--navy); }

.comment-form {
  display: flex;
  gap: 8px;
}

.comment-form input {
  flex: 1;
  padding: 10px;
  border: 1px solid #e2e0d8;
  border-radius: 8px;
  font-size: 13px;
}

.comment-form button {
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 600;
  cursor: pointer;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--navy-dark);
  color: white;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 13px;
  transition: transform 0.25s ease;
  z-index: 200;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}
