:root {
  --sage: #8fa377;
  --sage-dark: #4f6141;
  --cream: #fbf9f3;
  --cream-dark: #efeae0;
  --ink: #3a3a32;
  --font-script: 'Alex Brush', cursive;
  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Jost', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100%;
}

#app { width: 100%; }

.script { font-family: var(--font-script); }

.section-title {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  color: var(--sage-dark);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  display: block;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
  color: var(--ink);
  font-size: 0.98rem;
}

.edit-field {
  width: 100%;
  background: #fff;
  border: 1.5px dashed var(--sage);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: inherit;
  color: inherit;
  font-size: inherit;
  outline: none;
}
.edit-field:focus { border-style: solid; }

.wedding-section { padding: 4.5rem 1.25rem; }
@media (min-width: 768px) { .wedding-section { padding: 6rem 2rem; } }

.card {
  background: #fff;
  border: 1px solid var(--cream-dark);
  border-radius: 10px;
}

.btn-primary {
  background: var(--sage-dark);
  color: #fff;
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: opacity 0.15s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-outline {
  border: 1.5px solid var(--sage);
  color: var(--sage-dark);
  border-radius: 999px;
  padding: 0.65rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: transparent;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}
.btn-outline:disabled { opacity: 0.5; cursor: not-allowed; }

input.plain, select.plain, textarea.plain {
  border: 1px solid var(--cream-dark);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.92rem;
  background: #fff;
  outline: none;
}
input.plain:focus, textarea.plain:focus { border-color: var(--sage); }

.image-slot {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  background: var(--cream-dark);
}
.image-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-slot .placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; border: 1px dashed var(--sage);
}
.image-slot .placeholder span {
  font-size: 0.75rem; padding: 0 1rem; text-align: center; color: var(--sage-dark);
  font-family: var(--font-body);
}
.image-slot .overlay {
  position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 12px; transition: opacity 0.15s;
}
.image-slot .overlay .pill {
  display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  font-size: 0.75rem; background: var(--sage-dark); color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.image-slot:hover .overlay { opacity: 1; }

.aspect-4-5 { aspect-ratio: 4 / 5; }
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-16-6 { aspect-ratio: 16 / 6; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,249,243,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--cream-dark);
}

.eyebrow-line { height: 1px; width: 2rem; background: var(--sage); }

.countdown-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 8px;
}
@media (min-width: 768px) { .countdown-box { width: 80px; height: 80px; } }

.hero-upload-btn {
  position: absolute; top: 12px; right: 12px; z-index: 20;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; font-size: 0.75rem;
  color: #fff; border: none; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  font-family: var(--font-body);
}

.color-swatch {
  width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--cream-dark);
  display: inline-block;
}

.fade-in { animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: translateY(0);} }

[data-lucide] { display: inline-block; vertical-align: middle; }

.login-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(58,58,50,0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.login-modal {
  position: relative;
  background: var(--cream);
  border-radius: 14px;
  padding: 2rem 1.75rem;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}
.login-close {
  position: absolute; top: 10px; right: 10px;
  background: none; border: none; cursor: pointer; color: var(--sage-dark);
  padding: 4px;
}
