:root {
  --bg: #ffffff;
  --ink: #17161d;
  --soft: #6e6c7a;
  --going: #6457f0;
  --maybe: #e59a1f;
  --no: #8a8894;
  --tone: var(--going);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 16px;
}

/* ---- the pill ---- */
.rsvp {
  position: relative;
  width: min(316px, calc(100vw - 28px));
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 99px;
  isolation: isolate;
  box-shadow:
    0 0 0 1px rgba(23, 22, 29, 0.08),
    0 1px 2px rgba(23, 22, 29, 0.08),
    0 12px 24px -12px rgba(23, 22, 29, 0.22),
    0 28px 48px -30px rgba(23, 22, 29, 0.3);
  transition: box-shadow 0.5s ease;
}
.rsvp[data-answer="maybe"] { --tone: var(--maybe); }
.rsvp[data-answer="no"] { --tone: var(--no); }
.rsvp.is-said {
  box-shadow:
    0 0 0 1.5px color-mix(in srgb, var(--tone) 55%, transparent),
    0 1px 2px rgba(23, 22, 29, 0.08),
    0 14px 28px -12px color-mix(in srgb, var(--tone) 42%, transparent),
    0 28px 48px -30px color-mix(in srgb, var(--tone) 46%, transparent);
}
.rsvp__body { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; background: linear-gradient(180deg, #ffffff, #f4f4f8); box-shadow: inset 0 1px 0 #ffffff, inset 0 -1px 0 rgba(23, 22, 29, 0.05); z-index: -1; }
.rsvp__wash { position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 16%, transparent), transparent 58%); opacity: 0; }

/* ---- the question: the sign and the words ---- */
.main {
  flex: 1 1 0;
  min-width: 42px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.main:focus-visible { outline: none; }
.main:focus-visible .seat { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--going); }
.seat {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 0%, #33313f, #17161d 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 2px 5px rgba(23, 22, 29, 0.25);
  display: grid;
  place-items: center;
  transition: background 0.4s ease;
}
.rsvp.is-said .seat { background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--tone) 70%, #ffffff), var(--tone) 70%); }
.seat svg { width: 23px; height: 23px; overflow: visible; }
.seat rect, .seat path { fill: none; stroke: #ffffff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.seat .seat__mark { stroke-width: 2.3; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.label { flex: 1; min-width: 0; height: 22px; overflow: hidden; font-size: 15.5px; line-height: 22px; font-weight: 620; font-stretch: 104%; letter-spacing: -0.008em; }
.label__word { display: block; white-space: nowrap; }

/* ---- the three answers, closed at rest ---- */
.opts { flex: none; display: flex; gap: 5px; width: 0; overflow: hidden; }
.opts button {
  flex: none;
  width: 72px;
  height: 42px;
  border: 0;
  border-radius: 99px;
  background: rgba(23, 22, 29, 0.06);
  box-shadow: inset 0 0 0 1px rgba(23, 22, 29, 0.07);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 620;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.opts button.is-hot, .opts button:focus-visible { outline: none; background: var(--going); color: #ffffff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.opts button[data-opt="maybe"].is-hot, .opts button[data-opt="maybe"]:focus-visible { background: var(--maybe); }
.opts button[data-opt="no"].is-hot, .opts button[data-opt="no"]:focus-visible { background: var(--no); }
@media (hover: hover) {
  .opts button:hover { background: var(--going); color: #ffffff; }
  .opts button[data-opt="maybe"]:hover { background: var(--maybe); }
  .opts button[data-opt="no"]:hover { background: var(--no); }
}

/* ---- who is coming ---- */
.guests { flex: none; display: flex; align-items: center; height: 42px; padding-right: 4px; overflow: hidden; }
.face {
  flex: none;
  width: 30px;
  height: 30px;
  margin-right: -9px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #f8f8fb;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.face b { font-weight: inherit; }
.face--a { background: linear-gradient(140deg, #ffb37a, #f2683c); }
.face--b { background: linear-gradient(140deg, #7fd6c2, #1c9a86); }
.face--c { background: linear-gradient(140deg, #f2a6d2, #cf4f97); }
.face--me { width: 0; margin-right: 0; background: linear-gradient(140deg, #a59bff, var(--going)); box-shadow: 0 0 0 2px #f8f8fb, 0 4px 8px -2px color-mix(in srgb, var(--going) 70%, transparent); overflow: hidden; opacity: 0; font-size: 9.5px; }
.guests__n { margin-left: 15px; min-width: 20px; height: 18px; overflow: hidden; font-size: 13px; line-height: 18px; font-weight: 680; color: var(--soft); }
.guests__n span { display: block; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #14151a;
  stroke: #ffffff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 4px rgba(20, 21, 26, 0.3));
  opacity: 0;
  visibility: hidden;
  z-index: 5;
}

@media (max-width: 360px) {
  .opts button { width: 66px; font-size: 13.5px; }
  .label { font-size: 14.5px; }
}
