:root {
  --bg: #f4f0e8;
  --fg: #2a3328;
  --primary: #8a9b7a;
  --secondary: #4f5e45;
  --muted: #6b7568;
  --card: #fff;
  --radius: 1rem;
  --font: 'DM Sans', system-ui, sans-serif;
  --display: 'Cormorant Garamond', Georgia, serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
}

html.is-embed,
html.is-embed body {
  background: transparent;
  min-height: 0;
}

.wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

html.is-embed .wrap {
  max-width: 560px;
  padding: 0.25rem 0 1.5rem;
}

html.is-embed .chrome {
  display: none;
}

html.is-embed .card {
  box-shadow: none;
  border: 1px solid rgba(42, 51, 40, 0.1);
  background: rgba(255, 255, 255, 0.72);
}

html.is-embed .back {
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--secondary);
  margin: 0 0 0.5rem;
}

h1, h2 {
  font-family: var(--display);
  font-weight: 500;
  margin: 0 0 0.75rem;
  line-height: 1.15;
}

.lead { color: var(--muted); margin: 0 0 1.5rem; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 12px 32px rgba(79, 94, 69, 0.1);
  margin-bottom: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.35rem;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  background: var(--secondary);
  color: #fff;
  text-decoration: none;
}

.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--secondary); border: 1px solid var(--primary); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.field { margin-bottom: 1rem; }
label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.35rem; }

input, select, textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(42,51,40,0.18);
  border-radius: 0.6rem;
  font: inherit;
  background: #fff;
}

.event-item {
  margin-bottom: 0.6rem;
}

.event-item:last-child {
  margin-bottom: 0;
}

.product, .slot {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(42,51,40,0.12);
  background: #fff;
  border-radius: 0.75rem;
  padding: 0.9rem 1rem;
  margin-bottom: 0.6rem;
  cursor: pointer;
  font: inherit;
}

.event-item > .product {
  margin-bottom: 0;
}

.event-item.is-open > .product {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.product.is-selected, .slot.is-selected {
  border-color: var(--secondary);
  box-shadow: 0 0 0 2px rgba(79, 94, 69, 0.15);
}

.event-slots {
  border: 1px solid rgba(42,51,40,0.12);
  border-top: 0;
  border-radius: 0 0 0.75rem 0.75rem;
  background: rgba(138, 155, 122, 0.08);
  padding: 0.75rem 0.75rem 0.35rem;
}

.event-item.is-open .product.is-selected {
  box-shadow: none;
  border-bottom-color: transparent;
}

.event-slots__label {
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.event-slots__loading {
  margin: 0 0 0.4rem;
}

.event-slots .slot {
  margin-bottom: 0.5rem;
  background: #fff;
}

.event-slots .slot:last-child {
  margin-bottom: 0.4rem;
}

.muted { color: var(--muted); }
.error { color: #9b4d4d; }
.success { color: #4f7a5a; }
.code {
  font-family: ui-monospace, monospace;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  background: rgba(138,155,122,0.15);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  display: inline-block;
}

.back { display: inline-block; margin-bottom: 1rem; color: var(--secondary); }

#paypal-slot {
  margin-top: 0.25rem;
}

#paypal-buttons {
  min-height: 45px;
}
