:root {
  --bg-from: #f5e1c4;
  --bg-mid: #fff6ea;
  --bg-to: #ffe8f0;
  --card-bg: #fffdf9;
  --card-border: rgba(255, 255, 255, 0.7);
  --accent: #e29819;
  --accent-dark: #b56f09;
  --text-main: #2c1f1a;
  --text-muted: #8b7a74;
}

/* reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* body */
body {
  margin: 0;
  padding: 20px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background: radial-gradient(circle at top, var(--bg-from) 0, var(--bg-mid) 45%, var(--bg-to) 100%);
  color: var(--text-main);
  line-height: 1.5;
}

/* layout */
.page {
  max-width: 960px;
  margin: 0 auto 40px;
}

/* card */
.card {
  max-width: 620px;
  margin: 0 auto 22px;
  padding: 26px 24px 22px;
  border-radius: 24px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.18);
  display: none;
}

.card.show {
  display: block;
}

.card-title {
  font-size: 1.2rem;
  margin: 16px 0 8px;
}

/* intro header – titul, srdíčka, countdown */
.intro-header {
  text-align: center;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 4px;
}

/* srdíčka */
.floating-hearts {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px;
  height: 24px;
  pointer-events: none;
}

.floating-hearts span {
  font-size: 20px;
  opacity: 0.85;
  animation: floatUp 3.5s ease-in-out infinite;
}

.floating-hearts span:nth-child(2) { animation-delay: 0.8s; }
.floating-hearts span:nth-child(3) { animation-delay: 1.6s; }

@keyframes floatUp {
  0%   { transform: translate3d(0, 8px, 0); opacity: 0; }
  30%  { opacity: 1; }
  60%  { opacity: 0.9; }
  100% { transform: translate3d(0, -10px, 0); opacity: 0; }
}

/* countdown */
.countdown {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 8px;
  padding: 10px 18px;
  border-radius: 18px;
  background: rgba(255, 249, 246, 0.95);
  border: 1px solid rgba(215, 90, 24, 0.18);
}

.countdown-label {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.countdown-value {
  font-size: 1.7rem;
  font-weight: 650;
  color: #5e6a4f;
}

/* inputs */
.code-row {
  display: flex;
  gap: 10px;
  margin: 12px 0 6px;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  border-radius: 999px;
  border: 1px solid #f0c8a2;
  padding: 10px 14px;
  font-size: 0.95rem;
  outline: none;
  background: #fffdf9;
}

textarea {
  border-radius: 14px;
  resize: vertical;
  min-height: 90px;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(226, 152, 25, 0.15);
}

/* buttons */
button {
  font: inherit;
}

#unlock,
.actions .yes,
.actions .no,
.secondary {
  border-radius: 999px;
  padding: 10px 18px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

#unlock {
  background: var(--accent);
  color: #fff;
  min-width: 150px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

#unlock:hover {
  background: var(--accent-dark);
}

.secondary {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-main);
}

.actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.actions .yes {
  background: #5e6a4f;
  color: #fff;
}

.actions .no {
  background: #d93b4a;
  color: #fff;
}

/* texty */
.helper {
  font-size: 0.85rem;
  color: #c13737;
}

.details {
  padding-left: 20px;
  margin: 4px 0 14px;
}

.details li {
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.small {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* RSVP hlavička */
.rsvp-header {
  margin-bottom: 26px;
  text-align: left;
}

.guest-names,
.couple-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
}

.couple-title {
  margin-top: 4px;
}

.guest-count {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* mapa */
.map-wrapper {
  margin: 8px 0 20px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.14);
}

/* travel sekce */
.travel {
  margin: 12px 0 26px;
}

.travel h2 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.travel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.travel-card {
  border-radius: 16px;
  background: rgba(255, 249, 246, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.04);
  padding: 10px 12px 12px;
  font-size: 0.9rem;
}

.travel-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.travel-card h3 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.travel-note {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* field */
.field {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* members (chipy) – kompatibilní s app.js */
.member {
  border-radius: 16px;
  background: rgba(255, 249, 246, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.04);
  padding: 10px 12px;
  margin: 8px 0;
}

.member-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.member .name {
  font-weight: 600;
}

.attend-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.attend-label input {
  margin-right: 4px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.chip {
  border-radius: 999px;
  border: 1px solid #f0c8a2;
  padding: 4px 10px;
  font-size: 0.85rem;
  cursor: pointer;
  background: #fffdf9;
}

.chip.active {
  background: #ffe2c4;
  border-color: var(--accent);
}

/* ICS */
.ics-row {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

/* after message */
.after-msg {
  margin-top: 10px;
  text-align: center;
  font-size: 0.9rem;
}

/* popup */
#popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
  z-index: 999;
}

#popup.show {
  opacity: 1;
  pointer-events: auto;
}

.popup-inner {
  background: #fffdf9;
  padding: 18px 20px;
  border-radius: 18px;
  max-width: 310px;
  text-align: center;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.4);
}

#popup-close {
  margin-top: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* confetti canvas */
#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

/* responsive */
@media (max-width: 640px) {
  body {
    padding: 12px;
  }

  .card {
    margin: 10px auto;
    padding: 20px 16px 18px;
    border-radius: 20px;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .countdown-value {
    font-size: 1.5rem;
  }

  .guest-names,
  .couple-title {
    font-size: 1.6rem;
  }
}

/* Hezká thank-you / info kartička pod tlačítky */
.after-msg {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 249, 246, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.04);
  text-align: center;
  font-size: 0.95rem;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
}
