:root {
  --purple: #4c044c;
  --purple-soft: #6b2a6b;
  --rose: #c4748c;
  --rose-soft: #f6e6ec;
  --bg: #fbf7f9;
  --card: #ffffff;
  --text: #2d1a2d;
  --muted: #6f5d6f;
  --line: #e8dbe2;
  --error: #a61b3b;
  --ok: #2d6a4f;
  --radius: 16px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.top {
  background: var(--purple);
  color: #fff;
  padding: 18px 20px;
  text-align: center;
}
.top .brand {
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
}
.top .brand span { color: var(--rose); }

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 16px 64px;
}

h1 {
  font-size: 1.55rem;
  line-height: 1.25;
  margin: 0 0 8px;
  color: var(--purple);
  font-weight: 600;
}
h2 { font-size: 1.1rem; margin: 0 0 6px; color: var(--purple); font-weight: 600; }
.lead { margin: 0 0 22px; color: var(--muted); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin-bottom: 16px;
}

label { display: block; font-weight: 500; font-size: 0.92rem; margin: 0 0 6px; }
.field { margin-bottom: 16px; }

input[type="text"], input[type="email"] {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
}
input:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 2px;
}

.btn {
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 2px solid var(--purple);
  background: var(--purple);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.btn:hover:not(:disabled) { background: var(--purple-soft); border-color: var(--purple-soft); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--purple); }
.btn.ghost:hover:not(:disabled) { background: var(--rose-soft); color: var(--purple); border-color: var(--purple); }
.btn.danger { background: transparent; color: var(--error); border-color: var(--error); }
.btn.danger:hover:not(:disabled) { background: #fbe9ed; color: var(--error); border-color: var(--error); }
.btn.small { padding: 8px 16px; font-size: 0.9rem; }

.link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.note { font-size: 0.86rem; color: var(--muted); margin: 10px 0 0; }

.msg {
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 16px;
  font-size: 0.95rem;
}
.msg.error { background: #fbe9ed; color: var(--error); border: 1px solid #f1c2cd; }
.msg.ok { background: #e7f4ec; color: var(--ok); border: 1px solid #bfe0cd; }
.msg.info { background: var(--rose-soft); color: var(--purple); border: 1px solid #ecc9d5; }

/* Escolha de dia e horário */
.days {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  margin: 0 -2px 8px;
  scroll-snap-type: x proximity;
}
.day {
  flex: 0 0 auto;
  min-width: 74px;
  scroll-snap-align: start;
  font: inherit;
  text-align: center;
  padding: 10px 8px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
.day .wd { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.day .dn { display: block; font-size: 1.25rem; font-weight: 600; line-height: 1.2; }
.day .mo { display: block; font-size: 0.72rem; color: var(--muted); }
.day[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: #fff; }
.day[aria-pressed="true"] .wd, .day[aria-pressed="true"] .mo { color: #f0d9e2; }

.times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}
.time {
  font: inherit;
  font-weight: 500;
  padding: 11px 6px;
  border-radius: 12px;
  border: 1.5px solid var(--rose);
  background: #fff;
  color: var(--purple);
  cursor: pointer;
}
.time:hover:not(:disabled) { background: var(--rose-soft); }
.time[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: #fff; }

.summary {
  background: var(--rose-soft);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.summary .when { font-weight: 600; color: var(--purple); text-transform: capitalize; }

.guest-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
@media (max-width: 520px) {
  .guest-row { grid-template-columns: 1fr; }
}

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.booking { display: grid; gap: 4px; }
.booking .when { font-weight: 600; color: var(--purple); text-transform: capitalize; }
.booking .meta { color: var(--muted); font-size: 0.9rem; }
.booking .actions { margin-top: 12px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid var(--rose-soft); border-top-color: var(--purple);
  animation: spin 0.8s linear infinite; margin: 24px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

footer { text-align: center; color: var(--muted); font-size: 0.82rem; padding: 0 16px 32px; }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
  * { transition: none !important; }
}
