:root {
  --bg: #f6f3ea;
  --card: rgba(255, 255, 255, 0.8);
  --card-strong: rgba(255, 255, 255, 0.95);
  --text: #33402c;
  --subtext: #6f7d61;
  --moss: #4b7a54;
  --moss-soft: rgba(75, 122, 84, 0.12);
  --outline: rgba(110, 129, 96, 0.18);
  --shadow: rgba(62, 73, 48, 0.12);
  --warning: #b27d39;
  --warning-soft: rgba(178, 125, 57, 0.12);
  --danger: #b15c45;
  --danger-soft: rgba(177, 92, 69, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: ui-rounded, "SF Pro Rounded", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(174, 206, 184, 0.28), transparent 34%),
    linear-gradient(180deg, #f8f4ea 0%, #eef4ef 100%);
  color: var(--text);
}

body {
  min-height: 100vh;
}

.page-shell {
  width: min(100%, 34rem);
  margin: 0 auto;
  padding: max(1.25rem, env(safe-area-inset-top)) 1rem max(1.5rem, env(safe-area-inset-bottom));
}

.invite-card {
  background: var(--card);
  border: 1px solid var(--outline);
  border-radius: 2rem;
  box-shadow: 0 18px 48px var(--shadow);
  padding: 1.5rem;
  backdrop-filter: blur(16px);
}

.invite-layout > * + * {
  margin-top: 1.35rem;
}

.state-card,
.error-card {
  text-align: center;
}

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

.headline {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.subheadline {
  margin: 0.75rem 0 0;
  color: var(--subtext);
  font-size: 1.02rem;
  line-height: 1.45;
}

.trust-line {
  margin: 0.8rem 0 0;
  color: var(--subtext);
  font-size: 0.92rem;
}

.summary-panel,
.message-panel,
.response-module,
.confirmation-panel {
  background: var(--card-strong);
  border: 1px solid var(--outline);
  border-radius: 1.5rem;
  padding: 1.125rem;
}

.summary-panel {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.plant-badge {
  --plant-center: #e3b945;
  --plant-wash: rgba(236, 235, 192, 0.58);
  width: 5.75rem;
  height: 5.75rem;
  flex: 0 0 auto;
  border-radius: 50%;
  position: relative;
  background: linear-gradient(180deg, rgba(241, 246, 236, 0.94), rgba(224, 235, 217, 0.92));
  border: 2px solid rgba(122, 169, 119, 0.55);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.6);
}

.plant-badge::before,
.plant-badge::after {
  content: "";
  position: absolute;
  inset: 0.7rem;
  border-radius: 999px;
  background: radial-gradient(circle, var(--plant-wash), transparent 72%);
}

.plant-core {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  background: var(--plant-center);
  position: relative;
  z-index: 1;
}

.plant-core::before,
.plant-core::after {
  content: "";
  position: absolute;
  inset: -1.15rem;
  border-radius: 999px;
  background: radial-gradient(circle at center, rgba(214, 230, 178, 0.9) 0 48%, transparent 50%);
  transform: rotate(30deg);
}

.plant-core::after {
  transform: rotate(-24deg);
}

.hero-copy {
  min-width: 0;
}

.activity-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
}

.activity-date {
  margin: 0.3rem 0 0;
  font-size: 0.98rem;
  color: var(--moss);
  font-weight: 700;
  line-height: 1.35;
}

.activity-person {
  margin: 0.28rem 0 0;
  color: var(--subtext);
}

.section-label {
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--subtext);
}

.invite-quote,
.module-copy,
.confirmation-copy,
.detail-row {
  margin: 0;
  line-height: 1.45;
}

.invite-quote {
  font-size: 1.12rem;
}

.module-error {
  margin: 0.75rem 0 0;
  color: var(--danger);
  font-weight: 600;
}

.choice-grid {
  display: grid;
  gap: 0.75rem;
}

.choice-grid.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.choice-button {
  width: 100%;
  text-align: left;
  padding: 0.95rem 1rem;
  border-radius: 1.15rem;
  border: 1px solid var(--outline);
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.choice-button:active,
.primary-button:active,
.secondary-link:active {
  transform: scale(0.99);
}

.choice-button.is-selected {
  border-color: rgba(75, 122, 84, 0.48);
  background: rgba(232, 241, 233, 0.94);
  box-shadow: 0 0 0 3px rgba(75, 122, 84, 0.08);
}

.choice-button[data-action="proposedNewTime"].is-selected {
  border-color: rgba(178, 125, 57, 0.45);
  background: rgba(250, 240, 226, 0.95);
  box-shadow: 0 0 0 3px rgba(178, 125, 57, 0.08);
}

.choice-button[data-action="declined"].is-selected {
  border-color: rgba(177, 92, 69, 0.42);
  background: rgba(255, 244, 240, 0.94);
  box-shadow: 0 0 0 3px rgba(177, 92, 69, 0.08);
}

.choice-title {
  display: block;
  color: var(--text);
  font-weight: 700;
  font-size: 1.02rem;
}

.choice-copy {
  display: block;
  margin-top: 0.22rem;
  color: var(--subtext);
  font-size: 0.94rem;
}

.response-fields {
  margin-top: 1rem;
}

.response-fields.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.field-group + .field-group {
  margin-top: 0.95rem;
}

.date-input,
.response-text {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid var(--outline);
  background: rgba(255, 255, 255, 0.9);
  padding: 0.9rem 1rem;
  font: inherit;
  color: var(--text);
}

.response-text {
  min-height: 7rem;
  resize: vertical;
  line-height: 1.45;
}

.primary-button,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.25rem;
  margin-top: 1rem;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}

.primary-button {
  border: 0;
  background: var(--moss);
  color: white;
  font-weight: 700;
}

.primary-button:disabled {
  opacity: 0.65;
  cursor: default;
}

.secondary-link {
  border: 1px solid var(--outline);
  background: transparent;
  color: var(--moss);
  font-weight: 700;
}

.response-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  background: var(--moss-soft);
  color: var(--moss);
}

.response-pill.state-proposedNewTime {
  background: var(--warning-soft);
  color: var(--warning);
}

.response-pill.state-declined {
  background: var(--danger-soft);
  color: var(--danger);
}

.confirmation-title {
  margin: 0.8rem 0 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.confirmation-copy {
  margin-top: 0.5rem;
  color: var(--subtext);
}

.confirmation-details {
  margin-top: 1rem;
  display: grid;
  gap: 0.45rem;
}

.detail-row {
  color: var(--text);
  font-size: 0.96rem;
}

@media (min-width: 640px) {
  .page-shell {
    padding-top: 2rem;
  }

  .invite-card {
    padding: 1.75rem;
  }
}
