: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 – HERO (varianta 1: linka + srdce) */
/* ========================================================= */
.rsvp-header {
  margin-bottom: 26px;
  text-align: center;
  padding: 22px 18px 12px;
  position: relative;

  /* jemná linka pod hero */
  background-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(226, 152, 25, 0.28) 18%,
    rgba(226, 152, 25, 0.28) 82%,
    transparent 100%
  );
  background-repeat: no-repeat;
  background-size: 100% 1px;
  background-position: 50% calc(100% - 6px);
}

/* Headline (svatba) */
.couple-title {
  font-size: 2.1rem;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

/* jméno hosta */
.guest-names {
  margin-top: 16px;
  font-size: 1.1rem;      /* lehce větší */
  font-weight: 600;       /* čitelnější, ale ne headline */
  color: rgba(0, 0, 0, 0.68);
}

.guest-count {
  margin-top: 6px;
  font-size: 0.95rem;     /* blíž běžnému textu */
  color: rgba(0, 0, 0, 0.6);
}

/* srdíčko “překrývá” linku */
.rsvp-header::after {
  content: "♥";
  display: inline-block;
  margin-top: 14px;
  padding: 0 10px;
  font-size: 14px;
  color: rgba(226, 152, 25, 0.75);
  background: var(--card-bg);
}
/* ========================================================= */

/* 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;
}

/* mřížka dopravy */
.travel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 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);
}

/* Centrování textového upozornění pod dopravou – základ */
.travel-note.centered-note {
  text-align: center;
  margin-top: 14px;
  margin-bottom: 4px;
  width: 100%;
  display: block;
  opacity: 0.9;
}

/* mobile – kartičky pod sebe */
@media (max-width: 720px) {
  .travel-grid {
    grid-template-columns: 1fr;
  }
}

/* jemně vycentrovaná poznámka pod dopravou – finální override */
.travel-note.centered-note {
  text-align: center;
  margin: 16px auto 8px;
  font-size: 13px;
  color: #7f6a62;
  max-width: 520px;
  line-height: 1.5;
}

/* DÁRKY – karta přes celou šířku, jemně zvýrazněná */
.travel-card.gifts-card {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 12px;
  background: #fff4ee;
  border: 1px dashed rgba(215, 90, 24, 0.35);
}

.travel-card.gifts-card .gifts-icon {
  font-size: 32px;
  margin-bottom: 4px;
}

.travel-card.gifts-card h3 {
  margin-bottom: 4px;
}

.travel-card.gifts-card p {
  max-width: 420px;
  margin: 0 auto;
}

/* 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 – hezká 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);
}

/* footer pod pozvánkou (pokud se rozhodneš použít) */
.invite-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(215, 90, 24, 0.25);
  text-align: center;
  font-size: 14px;
  color: #6f5b53;
  line-height: 1.5;
}

.invite-footer-rsvp {
  margin-top: 6px;
  font-style: italic;
}

.invite-footer-sign {
  margin-top: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* 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 – mobil */
@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;
  }

  .details {
    margin-left: 1.1rem;
  }

  .details li {
    font-size: 14px;
    line-height: 1.4;
  }

  .map-wrapper {
    margin-top: 10px;
    margin-bottom: 18px;
  }

  iframe {
    border-radius: 14px;
  }
}

/* program v seznamu detailů – starší varianta (nevadí, když zůstane) */
.details li.program-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  flex-wrap: wrap;
}

.details li.program-line strong {
  margin-right: 4px;
  white-space: nowrap;
}

/* pill štítky pro program */
.program-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.program-pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.03);
  font-size: 13px;
  white-space: nowrap;
}

/* --- Venue blok pod „Místo“ (nový layout) --- */
.venue-card {
  display: inline-block;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.04);
}

.venue-name {
  font-weight: 600;
  color: #3a2f2b;
}

.venue-address {
  font-size: 14px;
  color: #6e5d57;
  margin-top: 2px;
}

.venue-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 14px;
  color: #b15f2f;
  font-weight: 600;
  text-decoration: none;
}

.venue-link:hover {
  text-decoration: underline;
}

/* --- Program pod mapou (nový blok) --- */
.program-block {
  margin-top: 6px;
}

.program-block .program-label {
  margin-bottom: 4px;
}

.program-block .program-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.program-block .program-pill {
  padding: 3px 10px;
}

/* drobné zmenšení na mobilu, ať se to tam vejde */
@media (max-width: 600px) {
  .program-block .program-pill {
    font-size: 12px;
  }
}
