@import url("https://fonts.googleapis.com/css2?family=Syne:wght@600;700&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600&display=swap");

:root {
  --ink: #3a3834;
  --muted: #6f6b65;
  --paper: #faf9f7;
  --stone: #eceae6;
  --sand: #e4e1db;
  --mist: #dfe4e6;
  --sage-wash: #e6ebe8;
  --accent: #5a534d;
  --accent-soft: #7a726a;
  --highlight: #d4dae0;
  --cream: #f3f1ed;

  --radius-lg: 28px;
  --radius-xl: 40px;
  --stroke: 1px solid #c8c4bc;

  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--stone);
  min-height: 100dvh;
  margin: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(155deg, var(--mist) 0%, var(--mist) 40%, transparent 40%),
    linear-gradient(22deg, var(--sage-wash) 0%, var(--sage-wash) 36%, transparent 36%),
    var(--stone);
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
  min-height: 100dvh;
  padding: clamp(1.25rem, 5vw, 2rem);
  display: flex;
  flex-direction: column;
}

.page--invite {
  max-width: 30rem;
}

.page-header {
  text-align: left;
  padding-top: 0.5rem;
}

.page-header--center {
  text-align: center;
}

.page-header--center .subcopy {
  margin-left: auto;
  margin-right: auto;
}

.badge {
  display: inline-block;
  padding: 0.4rem 0.95rem;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--sand);
  color: var(--ink);
  border: var(--stroke);
  border-radius: var(--radius-lg);
}

.headline {
  margin: 1.1rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 8.5vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.98;
  color: var(--ink);
}

.headline--sm {
  font-size: clamp(1.8rem, 5.5vw, 2.25rem);
}

.subcopy {
  margin-top: 0.8rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 28ch;
}

.subcopy strong {
  font-weight: 600;
  color: var(--ink);
  background: var(--cream);
  padding: 0 0.25em;
  border-radius: 6px;
}

.card {
  background: var(--paper);
  border: var(--stroke);
  border-radius: var(--radius-xl);
}

.card--pad {
  padding: 1.35rem 1.4rem;
}

.steps {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.step-pill {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  border: var(--stroke);
  border-radius: var(--radius-lg);
  background: var(--paper);
  color: var(--muted);
}

.step-pill.is-active {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}

.step-pill.is-done {
  background: var(--highlight);
  color: var(--ink);
  border-color: #bcc4ca;
}

.playfield {
  position: relative;
  width: 100%;
  min-height: min(52dvh, 380px);
  margin-top: 1.75rem;
  border-radius: var(--radius-xl);
  background: var(--sage-wash);
  border: var(--stroke);
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.button-anchor {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  z-index: 2;
  pointer-events: none;
}

.button-anchor .btn-yes {
  pointer-events: auto;
}

.no-slot {
  flex-shrink: 0;
  display: none;
}

.btn-yes {
  padding: 0.88rem 1.75rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--paper);
  border: var(--stroke);
  border-radius: var(--radius-lg);
  cursor: pointer;
  background: var(--accent);
  border-color: var(--accent);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-yes:hover {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
}

.btn-yes:active {
  opacity: 0.92;
}

.btn-no--paired {
  position: relative;
  pointer-events: auto;
}

.btn-no.is-physics {
  position: absolute;
  z-index: 4;
  margin: 0;
  left: 0;
  top: 0;
}

.btn-no {
  padding: 0.88rem 1.5rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  border: var(--stroke);
  border-radius: var(--radius-lg);
  cursor: not-allowed;
  background: var(--paper);
  will-change: left, top, transform;
  touch-action: none;
  pointer-events: auto;
}

.btn-no.is-fleeing {
  background: var(--cream);
  border-color: #b8b4ac;
}

.btn-primary {
  width: 100%;
  padding: 0.95rem 1.25rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--paper);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  cursor: pointer;
  background: var(--accent);
  transition: background 0.15s ease, opacity 0.15s;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-ghost {
  padding: 0.5rem 1rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--paper);
  border: var(--stroke);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-ghost:hover {
  background: var(--cream);
  border-color: #b8b4ac;
}

.input-field {
  width: 100%;
  margin-top: 0.6rem;
  padding: 0.88rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--cream);
  border: var(--stroke);
  border-radius: var(--radius-lg);
  outline: none;
}

.input-field:focus {
  background: var(--paper);
  border-color: #a8a49c;
}

.activity-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

@media (min-width: 480px) {
  .activity-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.activity-option {
  padding: 1rem 1.1rem;
  text-align: left;
  font-family: inherit;
  color: var(--ink);
  background: var(--paper);
  border: var(--stroke);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.activity-option:hover {
  background: var(--cream);
  border-color: #b8b4ac;
}

.activity-option.is-selected {
  background: var(--highlight);
  border-color: #b0b8be;
}

.activity-option__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.activity-option__desc {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.activity-option--wide {
  grid-column: 1 / -1;
}

.confirm-row + .confirm-row {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: var(--stroke);
}

.confirm-label {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.confirm-value {
  margin-top: 0.3rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}

.spacer-flex {
  flex: 1;
  min-height: 0.75rem;
}

.nav-row {
  margin-bottom: 0.25rem;
}

.btn-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-stack .btn-ghost {
  width: 100%;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .btn-no {
    transition: none;
  }
}
