[hidden] { display: none !important; }

:root {
  --bg: #faf7f2;
  --card: #ffffff;
  --text: #2c2a27;
  --muted: #7a756e;
  --accent: #b08d6a;
  --accent-dark: #8c6b4a;
  --line: #e8e0d6;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Jost', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
}

.loader {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--bg);
  z-index: 100;
}

.loader__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
}

.error-screen__inner { max-width: 480px; }

.ornament {
  font-size: 32px;
  color: var(--accent);
  margin-bottom: 16px;
}

.error-screen__title { font-size: 32px; margin: 0 0 12px; }
.error-screen__text { color: var(--muted); line-height: 1.6; }

.page { padding: 24px 16px 64px; }

.card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero {
  padding: 48px 32px 32px;
  text-align: center;
  background: linear-gradient(180deg, #fdfbf8 0%, #ffffff 100%);
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: 12px;
  color: var(--accent);
  margin: 0 0 16px;
}

.hero__names {
  font-size: 44px;
  line-height: 1.2;
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.hero__amp { color: var(--accent); font-style: italic; }

.hero__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px auto;
  max-width: 240px;
  color: var(--accent);
}

.hero__divider span { flex: 1; height: 1px; background: var(--line); }
.hero__divider i { font-style: normal; font-size: 18px; }

.hero__date {
  font-size: 20px;
  letter-spacing: .05em;
  color: var(--muted);
  margin: 8px 0 24px;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.countdown__item {
  min-width: 64px;
  background: #faf7f2;
  border-radius: 12px;
  padding: 10px 8px;
}

.countdown__item b {
  display: block;
  font-size: 24px;
  font-family: 'Cormorant Garamond', serif;
}

.countdown__item small {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}

.section {
  padding: 32px;
  border-top: 1px solid var(--line);
}

.section__title {
  font-size: 28px;
  margin: 0 0 8px;
  text-align: center;
}

.section__hint {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 24px;
}

.greeting { text-align: center; }

.greeting__name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  margin: 0 0 8px;
}

.greeting__text {
  color: var(--muted);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto;
}

.details__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.details__item {
  text-align: center;
  padding: 16px;
  background: #faf7f2;
  border-radius: 12px;
}

.details__icon {
  font-size: 24px;
  display: block;
  margin-bottom: 8px;
}

.details__item h3 { font-size: 18px; margin: 0 0 6px; }

.details__item p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.rsvp__note {
  background: #fff8e6;
  border: 1px solid #f0e0b8;
  color: #8a6d3b;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 20px;
}

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.choice { cursor: pointer; }

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 12px;
  border: 2px solid var(--line);
  border-radius: 14px;
  transition: .2s;
  text-align: center;
}

.choice input:checked + .choice__inner {
  border-color: var(--accent);
  background: #fdf8f3;
  box-shadow: 0 0 0 3px rgba(176, 141, 106, .12);
}

.choice__emoji { font-size: 28px; }
.choice__title { font-weight: 500; font-size: 18px; }
.choice__desc { font-size: 13px; color: var(--muted); }

.reveal { animation: fadeIn .3s ease; }
.reveal--soft { margin-top: 12px; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.field { margin-bottom: 20px; }

.field__label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text);
}

.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(176, 141, 106, .12);
}

.input--area { resize: vertical; min-height: 80px; }

.switch {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.switch input { position: absolute; opacity: 0; }

.switch__track {
  width: 44px;
  height: 24px;
  background: var(--line);
  border-radius: 99px;
  position: relative;
  transition: .2s;
  flex-shrink: 0;
}

.switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

.switch input:checked + .switch__track { background: var(--accent); }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(20px); }

.switch__label { font-size: 15px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; }

.chip span {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 14px;
  transition: .2s;
}

.chip input:checked + span {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn {
  width: 100%;
  padding: 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s, transform .1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn:hover { background: var(--accent-dark); }
.btn:active { transform: scale(.99); }
.btn:disabled { opacity: .7; cursor: not-allowed; }

.btn__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.form-status {
  text-align: center;
  margin: 12px 0 0;
  font-size: 14px;
  min-height: 20px;
}

.form-status--success { color: #2e7d32; }
.form-status--error { color: #c62828; }

.footer {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.footer__contacts { margin-top: 8px; }
.footer a { color: var(--accent); text-decoration: none; }

@media (max-width: 520px) {
  .hero { padding: 32px 20px 24px; }
  .hero__names { font-size: 34px; }
  .section { padding: 24px 20px; }
  .choices { grid-template-columns: 1fr; }
  .countdown { gap: 8px; }
  .countdown__item { min-width: 56px; padding: 8px 4px; }
  .countdown__item b { font-size: 20px; }
}

/* ── Палитра ───────────────────────────────────────────── */
.palette__list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.palette__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.palette__swatch {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--c, #ccc);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, .05),
    0 4px 12px rgba(0, 0, 0, .08);
  transition: transform .2s ease;
}

.palette__item:hover .palette__swatch {
  transform: translateY(-3px) scale(1.03);
}

.palette__name {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.3;
}

.palette__note {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  font-style: italic;
}

@media (max-width: 520px) {
  .palette__list {
    gap: 8px;
  }
  .palette__name {
    font-size: 11px;
  }
}