/* Charlie's 1st Picnic — vintage pink gingham + florals */
:root {
  --rose: #b56576;
  --rose-deep: #9c4a5c;
  --blush: #f7e1e6;
  --cream: #fbf6f0;
  --sage: #6d7b53;
  --ink: #5a4a4d;
  --gingham: rgba(201, 122, 143, 0.38);
  --card-shadow: 0 18px 50px rgba(156, 74, 92, 0.18);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 20px;
  line-height: 1.5;
  /* Gingham: two overlapping stripe sets over white give the 3-tone weave */
  background-color: #fff;
  background-image:
    repeating-linear-gradient(0deg, var(--gingham) 0 22px, transparent 22px 44px),
    repeating-linear-gradient(90deg, var(--gingham) 0 22px, transparent 22px 44px);
  background-attachment: fixed;
}

.page {
  max-width: 620px;
  margin: 0 auto;
  padding: 28px 18px 64px;
}

/* ---- Invite image centerpiece ---- */
.invite-frame {
  background: var(--cream);
  padding: 14px;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(181, 101, 118, 0.25);
}
.invite-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* ---- Cards ---- */
.card {
  background: var(--cream);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(181, 101, 118, 0.25);
  padding: 30px 26px;
  margin-top: 26px;
}

.script {
  font-family: "Parisienne", cursive;
  color: var(--rose);
  font-weight: 400;
  line-height: 1.1;
}

h1.script { font-size: 3rem; margin: 0 0 6px; text-align: center; }
h2.script { font-size: 2.1rem; margin: 0 0 14px; text-align: center; }

.subhead {
  text-align: center;
  color: var(--sage);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin: 0 0 22px;
}

.divider {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; color: var(--rose); margin: 18px 0;
}
.divider::before, .divider::after {
  content: ""; height: 1px; width: 60px; background: rgba(181,101,118,.5);
}

/* ---- Quick details / action buttons ---- */
.actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: "Cormorant Garamond", serif; font-size: 1.05rem;
  padding: 11px 20px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--rose); text-decoration: none;
  background: transparent; color: var(--rose-deep); transition: all .15s ease;
}
.btn:hover { background: var(--blush); }
.btn-primary {
  background: var(--rose); color: #fff; border-color: var(--rose);
  font-size: 1.15rem; padding: 14px 34px;
}
.btn-primary:hover { background: var(--rose-deep); }
.center { text-align: center; }

/* ---- Form ---- */
label {
  display: block; font-size: 1.05rem; color: var(--ink);
  margin: 18px 0 6px; font-weight: 600;
}
.req { color: var(--rose); }
input[type="text"], input[type="number"], input[type="email"], textarea {
  width: 100%; padding: 12px 14px; font-size: 1rem;
  font-family: "Cormorant Garamond", serif;
  border: 1.5px solid rgba(181,101,118,.4); border-radius: 12px;
  background: #fff; color: var(--ink); transition: border-color .15s;
}
input:focus, textarea:focus {
  outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px var(--blush);
}
textarea { resize: vertical; min-height: 80px; }

/* Yes / No attendance toggle */
.attend { display: flex; gap: 14px; margin-top: 6px; }
.attend label {
  flex: 1; margin: 0; text-align: center; cursor: pointer;
  border: 1.5px solid rgba(181,101,118,.4); border-radius: 14px;
  padding: 16px 10px; font-size: 1.15rem; transition: all .15s ease;
  background: #fff;
}
.attend input { position: absolute; opacity: 0; pointer-events: none; }
.attend label:hover { background: var(--blush); }
.attend input:checked + span { font-weight: 700; }
.attend label:has(input:checked) {
  border-color: var(--rose); background: var(--blush);
  box-shadow: 0 0 0 3px rgba(181,101,118,.15);
}
.attend .yes { color: var(--sage); }
.attend .no { color: var(--rose-deep); }

.hint { font-size: 0.9rem; color: #8a7a7d; margin-top: 4px; }

.msg {
  margin-top: 16px; padding: 12px 14px; border-radius: 12px;
  font-size: 1rem; display: none;
}
.msg.show { display: block; }
.msg.error { background: #fdecef; color: var(--rose-deep); border: 1px solid var(--rose); }

/* Success state */
.thanks { text-align: center; display: none; }
.thanks.show { display: block; }

.footer-note {
  text-align: center; color: var(--rose); font-family: "Parisienne", cursive;
  font-size: 1.5rem; margin-top: 34px; line-height: 1.3;
}

/* ---- Admin table ---- */
.stats { display: flex; gap: 14px; flex-wrap: wrap; margin: 8px 0 20px; }
.stat {
  flex: 1; min-width: 120px; text-align: center; background: var(--blush);
  border-radius: 14px; padding: 16px 10px;
}
.stat .num { font-size: 2.4rem; color: var(--rose-deep); font-weight: 700; line-height: 1; }
.stat .lbl { font-size: 0.8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--sage); }
table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid rgba(181,101,118,.2); vertical-align: top; }
th { color: var(--sage); text-transform: uppercase; font-size: 0.75rem; letter-spacing: .05em; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; }
.pill.yes { background: #e6efd8; color: var(--sage); }
.pill.no { background: #fbe0e6; color: var(--rose-deep); }
.table-wrap { overflow-x: auto; }

@media (max-width: 480px) {
  body { font-size: 18px; }
  h1.script { font-size: 2.4rem; }
  .card { padding: 24px 18px; }
}
