:root {
  color-scheme: light;
  --ink: #17213a;
  --secondary: #65708a;
  --primary: #3d69f5;
  --primary-dark: #2c51cf;
  --sky: #e8eeff;
  --mint: #37b99a;
  --mint-soft: #e5f7f2;
  --amber: #e7a62c;
  --amber-soft: #fff4d8;
  --coral: #e96972;
  --coral-soft: #fff0f1;
  --canvas: #f6f7fb;
  --line: #e6e8f0;
  --white: #fff;
  font-family: Inter, ui-rounded, "SF Pro Rounded", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
}

button, a, input { font: inherit; }
button { cursor: pointer; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 800;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(23, 33, 58, 0.1);
}

.privacy-chip {
  padding: 8px 12px;
  color: var(--mint);
  background: var(--mint-soft);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.demo-banner {
  max-width: 660px;
  margin: 0 auto;
  padding: 10px 16px;
  color: var(--primary-dark);
  background: var(--sky);
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.demo-banner[hidden] { display: none; }

.screen {
  width: min(100% - 36px, 920px);
  margin: 0 auto;
  padding: 60px 0 130px;
}

.screen--narrow { max-width: 660px; text-align: center; }
.screen[hidden] { display: none; }

.loading { color: var(--secondary); font-weight: 700; }

.invite-mark { margin-bottom: 28px; }

.invite-mark img {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(23, 33, 58, 0.12);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  overflow-wrap: anywhere;
}

.eyebrow:empty { display: none; }

h1 {
  margin: 0;
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  line-height: 1.18;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.lede {
  max-width: 590px;
  margin: 22px auto 34px;
  color: var(--secondary);
  font-size: 1rem;
  line-height: 1.85;
  text-wrap: pretty;
}

.lede:empty { display: none; }

.name-form { margin: 0 auto; text-align: left; }

.guest-name-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 18px;
}

.guest-name-form label {
  display: block;
  margin: 0 0 6px 4px;
  color: var(--secondary);
  font-size: 0.76rem;
  font-weight: 800;
}

.guest-name-form input {
  width: 100%;
  padding: 15px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: var(--white);
}

.guest-name-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--sky); }
.form-error { margin: -6px 0 16px; color: var(--coral); font-size: 0.8rem; font-weight: 750; text-align: left; }
.form-error[hidden] { display: none; }
.footnote { margin-top: 22px; color: var(--secondary); font-size: 0.76rem; line-height: 1.7; }

.answer-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: 32px;
}

.answer-heading h1 { font-size: clamp(1.9rem, 4vw, 3rem); }

.answerer { margin: 16px 0 0; color: var(--secondary); font-size: 0.86rem; }
.answerer[hidden] { display: none; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  color: var(--secondary);
  font-size: 0.72rem;
}

.legend span { display: inline-flex; align-items: center; gap: 5px; }
.answer-dot { font-size: 1rem; }
.answer-dot--yes { color: var(--mint); }
.answer-dot--maybe { color: var(--amber); }
.answer-dot--no { color: var(--coral); }

.notice {
  margin: 0 0 18px;
  padding: 13px 16px;
  color: var(--primary-dark);
  background: var(--sky);
  border-radius: 14px;
  font-size: 0.86rem;
  font-weight: 700;
}

.notice[hidden] { display: none; }

.candidate-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.candidate-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 8px 28px rgba(23, 33, 58, 0.04);
}

.candidate-date {
  display: grid;
  width: 62px;
  height: 66px;
  place-items: center;
  align-content: center;
  border-radius: 15px;
  background: var(--sky);
  color: var(--primary);
}

.candidate-date small { color: var(--secondary); font-size: 0.67rem; }
.candidate-date strong { font-size: 1.45rem; line-height: 1.1; }
.candidate-time { margin-bottom: 12px; font-size: 0.95rem; font-weight: 800; }
.answer-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }

.answer-option {
  padding: 9px 4px;
  color: var(--secondary);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--canvas);
  font-weight: 850;
}

.answer-option[data-answer="yes"].is-selected { color: var(--mint); border-color: var(--mint); background: var(--mint-soft); }
.answer-option[data-answer="maybe"].is-selected { color: var(--amber); border-color: var(--amber); background: var(--amber-soft); }
.answer-option[data-answer="no"].is-selected { color: var(--coral); border-color: var(--coral); background: var(--coral-soft); }

.install-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  margin-top: 22px;
  padding: 17px;
  border: 1px solid rgba(61, 105, 245, 0.2);
  border-radius: 18px;
  background: var(--sky);
}

.install-banner[hidden] { display: none; }
.install-banner__icon { display: block; width: 40px; height: 40px; border-radius: 12px; object-fit: cover; box-shadow: 0 8px 20px rgba(23, 33, 58, 0.1); }
.install-banner strong { font-size: 0.86rem; }
.install-banner p { margin: 3px 0 0; color: var(--secondary); font-size: 0.72rem; }

.text-button, .link-button {
  padding: 7px;
  color: var(--primary);
  border: 0;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

.link-button--inline { padding: 0 0 0 6px; }

.submit-bar {
  position: fixed;
  bottom: 18px;
  left: 50%;
  z-index: 5;
  display: flex;
  width: min(calc(100% - 36px), 640px);
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 14px 14px 14px 20px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 16px 55px rgba(23, 33, 58, 0.16);
}

.submit-error {
  position: fixed;
  bottom: 104px;
  left: 50%;
  z-index: 5;
  width: min(calc(100% - 36px), 640px);
  margin: 0;
  padding: 12px 16px;
  transform: translateX(-50%);
  background: var(--coral-soft);
  border-radius: 14px;
}

#answer-count { color: var(--secondary); font-size: 0.75rem; font-weight: 750; }
.progress { width: 150px; height: 5px; margin-top: 7px; overflow: hidden; border-radius: 99px; background: var(--line); }
.progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--primary); }

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  color: var(--white);
  border: 0;
  border-radius: 13px;
  background: var(--primary);
  box-shadow: 0 9px 22px rgba(23, 33, 58, 0.1);
  font-weight: 800;
  text-decoration: none;
}

.primary-button:hover { background: var(--primary-dark); }
.primary-button:disabled { cursor: not-allowed; opacity: 0.38; box-shadow: none; }
.primary-button[hidden] { display: none; }
.primary-button--wide { width: 100%; padding: 15px 20px; }
.submit-bar .primary-button { flex-shrink: 0; white-space: nowrap; }

.completion { padding-top: 80px; }

.completion-mark, .status-mark {
  display: grid;
  width: 104px;
  height: 104px;
  margin: 0 auto 28px;
  place-items: center;
  border-radius: 50%;
  font-size: 2.9rem;
  font-weight: 900;
}

.completion-mark { color: var(--mint); background: var(--mint-soft); }
.status-mark { color: var(--primary); background: var(--sky); }
.status-mark--confirmed, .status-mark--completed { color: var(--mint); background: var(--mint-soft); }
.status-mark--cancelled, .status-mark--not_found, .status-mark--full, .status-mark--error { color: var(--coral); background: var(--coral-soft); }

.decided {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 0.4em;
  margin: 22px auto 0;
  padding: 16px 18px;
  max-width: 460px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 1.15rem;
  font-weight: 800;
}

.decided[hidden] { display: none; }

.answer-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 28px 0; }
.summary-item { padding: 13px; border-radius: 14px; background: var(--white); border: 1px solid var(--line); }
.summary-item strong { display: block; margin-bottom: 3px; font-size: 1.15rem; }
.summary-item small { color: var(--secondary); }
.summary-item--yes strong { color: var(--mint); }
.summary-item--maybe strong { color: var(--amber); }
.summary-item--no strong { color: var(--coral); }

@media (max-width: 700px) {
  .site-header { padding: 18px; }
  .privacy-chip { display: none; }
  .demo-banner { margin: 0 18px; }
  .screen { padding-top: 32px; }
  .candidate-list { grid-template-columns: 1fr; }
  .answer-heading { display: block; }
  .legend { justify-content: flex-start; margin-top: 18px; }
  .install-banner { grid-template-columns: auto 1fr; }
  .install-banner .text-button { grid-column: 2; justify-self: start; padding-left: 0; }
  .submit-bar { bottom: 10px; }
  .submit-error { bottom: 92px; }
  .progress { width: 110px; }
}

@media (max-width: 380px) {
  .guest-name-form { grid-template-columns: 1fr; }
  .submit-bar { gap: 12px; padding: 12px 12px 12px 16px; }
  .submit-bar .primary-button { padding: 12px 16px; }
  .progress { width: 84px; }
}
