:root {
  --gold: #c9a962;
  --gold-light: #e8d5a3;
  --gold-dark: #9a7b3c;
  --cream: #faf7f2;
  --blush: #f5e6e0;
  --sage: #8fa68a;
  --sage-dark: #6b8566;
  --text: #3d3d3d;
  --text-light: #6b6b6b;
  --white: #ffffff;
  --shadow: 0 4px 24px rgba(61, 61, 61, 0.08);
  --radius: 16px;
}

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

body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.6;
}

.sans { font-family: 'Montserrat', system-ui, sans-serif; }

.hero {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  background: linear-gradient(180deg, var(--blush) 0%, var(--cream) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '♥';
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  color: var(--gold);
  opacity: 0.5;
}

.hero h1 {
  font-size: clamp(2.2rem, 8vw, 3.5rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.hero .ampersand {
  font-style: italic;
  color: var(--gold-dark);
  font-size: 0.7em;
}

.hero .date {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-top: 0.5rem;
}

.hero .subtitle {
  font-size: 1.1rem;
  color: var(--sage-dark);
  margin-top: 1rem;
  font-style: italic;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.hidden-view { display: none; }

.name-field {
  margin: 1.5rem 0;
}

.name-field label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.4rem;
}

.name-field input {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--gold-light);
  border-radius: var(--radius);
  background: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.name-field input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.15);
}

.actions {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  width: 100%;
  font-family: inherit;
  color: inherit;
  box-shadow: var(--shadow);
}

.action-btn:hover, .action-btn:active {
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(201, 169, 98, 0.15);
}

.action-btn .icon {
  font-size: 1.6rem;
  width: 2.5rem;
  text-align: center;
  color: var(--gold-dark);
}

.action-btn .label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
}

.action-btn .hint {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.15rem;
}

.hidden-input { display: none; }

.media-choice {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.modal .media-choice .action-btn {
  margin: 0;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(61, 61, 61, 0.5);
  z-index: 100;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}

.modal.open { display: flex; }

.modal-content {
  background: var(--white);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 1.5rem;
  width: 100%;
  max-width: 480px;
  max-height: 85dvh;
  overflow-y: auto;
}

.modal h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  text-align: center;
}

.modal textarea {
  width: 100%;
  min-height: 120px;
  padding: 1rem;
  border: 1px solid var(--gold-light);
  border-radius: var(--radius);
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  resize: vertical;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn {
  flex: 1;
  padding: 0.9rem;
  border: none;
  border-radius: var(--radius);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--white);
}

.btn-secondary {
  background: var(--cream);
  color: var(--text);
  border: 1px solid var(--gold-light);
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.recording {
  text-align: center;
  padding: 2rem 0;
}

.recording .pulse {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--blush);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(201, 169, 98, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 12px rgba(201, 169, 98, 0); }
}

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--sage-dark);
  color: var(--white);
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  z-index: 200;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
}

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

.preview-area {
  margin: 1rem 0;
  text-align: center;
}

.preview-area img, .preview-area video {
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--radius);
  object-fit: contain;
}

.gallery-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem;
}

.gallery-header h2 {
  font-size: 1.8rem;
  font-weight: 500;
}

.gallery-grid {
  display: grid;
  gap: 0.8rem;
}

.gallery-card {
  background: var(--white);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius);
  padding: 0.75rem;
  box-shadow: var(--shadow);
}

.gallery-card img,
.gallery-card video {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 12px;
  background: #eee;
}

.gallery-meta {
  margin-top: 0.5rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  color: var(--text-light);
}

.footer {
  text-align: center;
  padding: 2rem 1rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  color: var(--text-light);
  letter-spacing: 0.05em;
}

.footer a { color: var(--gold-dark); text-decoration: none; }

.footer-heart {
  display: inline-block;
  color: var(--gold) !important;
  font-size: 1.05em;
  line-height: 1;
  margin: 0 0.1em;
  vertical-align: -0.05em;
  transition: transform 0.2s ease, color 0.2s ease, opacity 0.2s ease;
  opacity: 0.85;
}

.footer-heart:hover {
  color: var(--gold-dark) !important;
  transform: scale(1.25);
  opacity: 1;
}

.footer-cta {
  display: inline-block;
  margin-top: 0.85rem;
  max-width: 22rem;
  line-height: 1.45;
  letter-spacing: 0.02em;
  font-size: 0.72rem;
  border-bottom: 1px solid rgba(154, 123, 60, 0.35);
  padding-bottom: 0.1rem;
  transition: color 0.2s, border-color 0.2s;
}

.footer-cta:hover {
  color: var(--text);
  border-color: var(--gold-dark);
}
