:root {
  color-scheme: light;
  --bg: #f7eadf;
  --ink: #443931;
  --muted: #725d6c;
  --pink: #ee8791;
  --rose: #f7c4cd;
  --coral: #f29aa2;
  --mint: #9be7d1;
  --sky: #a9d9ff;
  --shadow: 0 22px 48px rgba(103, 72, 48, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background: #f7eadf;
  color: var(--ink);
  font-family: "Trebuchet MS", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  display: block;
  background-image: url("/static/bg.png");
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  content: "";
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

a {
  color: inherit;
}

.shell {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: 0;
}

.invite-card {
  position: relative;
  display: flex;
  width: min(1420px, 100%);
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  padding: clamp(54px, 8vw, 118px) clamp(24px, 6vw, 90px) clamp(84px, 10vw, 138px);
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.invite-content {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin-top: clamp(28px, 7vh, 86px);
}

.eyebrow,
.modal-kicker {
  position: relative;
  z-index: 1;
  margin: 0 0 14px;
  color: #9b486c;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  letter-spacing: 0;
}

h1 {
  color: #453b35;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.7rem, 6.1vw, 7.15rem);
  font-weight: 500;
  line-height: 0.98;
  text-shadow: 0 3px 12px rgba(255, 255, 255, 0.45);
}

h1 span {
  color: var(--pink);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 3.5rem);
  line-height: 1;
}

.subtitle {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 26px auto 0;
  color: #5d514a;
  font-size: clamp(1.25rem, 1.8vw, 1.9rem);
  line-height: 1.34;
}

.actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  margin-top: clamp(26px, 4vh, 42px);
  gap: clamp(18px, 3vw, 34px);
}

.answer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(190px, 17vw, 300px);
  min-height: clamp(64px, 6vw, 88px);
  border-radius: 26px;
  padding: 0 clamp(32px, 4vw, 62px);
  font-size: clamp(1.9rem, 3vw, 3rem);
  font-weight: 400;
  line-height: 1;
  box-shadow: 0 12px 24px rgba(89, 65, 50, 0.18), inset 0 0 0 2px rgba(255, 255, 255, 0.38);
  transition:
    transform 160ms ease,
    background 160ms ease,
    color 160ms ease,
    left 220ms ease,
    top 220ms ease;
}

.yes,
.primary-button {
  background: linear-gradient(135deg, #f28b9b, #ed7f8d);
  color: white;
}

.no {
  position: relative;
  background: rgba(255, 250, 244, 0.76);
  color: #4f453f;
}

.no.is-running {
  position: absolute;
  z-index: 10;
  margin: 0;
}

.answer:focus-visible,
.primary-button:focus-visible,
.time-grid button:focus-visible {
  outline: 4px solid rgba(244, 127, 168, 0.35);
  outline-offset: 4px;
}

.modal-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  overflow-y: auto;
  background: rgba(43, 29, 40, 0.3);
  backdrop-filter: blur(10px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  width: min(520px, 100%);
  max-height: calc(100svh - 44px);
  overflow-y: auto;
  border-radius: 24px;
  padding: clamp(28px, 6vw, 44px);
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.modal p:not(.modal-kicker):not(.chosen-time) {
  margin: 18px auto 26px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.55;
}

.primary-button {
  min-height: 54px;
  min-width: 146px;
  border-radius: 999px;
  padding: 0 28px;
  font-weight: 800;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 28px;
}

.time-grid button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 14px;
  background: #fff2f6;
  color: var(--ink);
  font-weight: 800;
  transition: transform 150ms ease, background 150ms ease;
}

.time-grid button:hover,
.time-grid button.is-selected {
  background: var(--rose);
  transform: translateY(-2px);
}

.chosen-time {
  margin: 24px 0 0;
  color: #8f3b60;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.45;
}

.confirm-time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
}

.confirm-time[hidden] {
  display: none;
}

.confetti {
  position: fixed;
  z-index: 60;
  top: -28px;
  border-radius: 3px;
  pointer-events: none;
  animation: confetti-fall 3.6s cubic-bezier(0.18, 0.72, 0.28, 1) forwards;
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translate3d(0, -40px, 0) rotate(0deg);
  }

  55% {
    opacity: 1;
    transform: translate3d(calc(var(--drift) * 0.45), 55vh, 0) rotate(calc(var(--rotation) * 0.55));
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--drift), 108vh, 0) rotate(var(--rotation));
  }
}

.results-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 70px) 20px;
}

.results-header {
  margin-bottom: 28px;
}

.results-header h1 {
  font-size: clamp(2.4rem, 8vw, 5.5rem);
}

.results-header .subtitle {
  margin-left: 0;
  text-align: left;
}

.results-panel {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.results-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 20px;
  border-top: 1px solid rgba(155, 72, 108, 0.16);
  text-align: left;
}

th {
  color: #9b486c;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

td {
  color: var(--ink);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 14px;
  background: linear-gradient(135deg, var(--pink), var(--coral));
  color: #fff;
  font-weight: 900;
}

@media (min-width: 1181px) {
  body::before {
    background-position: center center;
    background-size: 100% 100%;
  }

  .invite-card {
    padding: 72px 72px 88px;
  }

  .invite-content {
    max-width: 980px;
    margin-top: 54px;
  }

  h1 {
    font-size: clamp(4.2rem, 4.7vw, 5.9rem);
    line-height: 1.02;
  }

  h2 {
    font-size: clamp(2rem, 2.7vw, 3rem);
  }

  .subtitle {
    margin-top: 22px;
    font-size: clamp(1.35rem, 1.45vw, 1.65rem);
  }

  .actions {
    min-height: 88px;
    margin-top: 34px;
  }

  .answer {
    min-width: clamp(220px, 15vw, 280px);
    min-height: clamp(68px, 5vw, 82px);
    font-size: clamp(2rem, 2.5vw, 2.7rem);
  }

  .modal {
    width: min(620px, calc(100% - 48px));
  }
}

@media (min-width: 641px) and (max-width: 1180px) {
  body::before {
    background-position: center center;
    background-size: auto 100%;
  }

  .invite-card {
    padding: 92px 42px 92px;
  }

  .invite-content {
    max-width: 760px;
    margin-top: 82px;
  }

  h1 {
    font-size: clamp(4.4rem, 7.4vw, 5.6rem);
    line-height: 1.02;
  }

  h2 {
    font-size: clamp(3rem, 5.4vw, 4.2rem);
  }

  .subtitle {
    max-width: 640px;
    margin-top: 28px;
    font-size: clamp(1.55rem, 2.8vw, 2rem);
  }

  .actions {
    min-height: 112px;
    margin-top: 48px;
    gap: 34px;
  }

  .answer {
    min-width: 250px;
    min-height: 82px;
    font-size: 2.7rem;
  }

  .modal {
    width: min(760px, calc(100% - 72px));
    border-radius: 34px;
    padding: 56px;
  }

  .modal p:not(.modal-kicker):not(.chosen-time) {
    font-size: 1.35rem;
  }

  .primary-button {
    min-height: 66px;
    min-width: 190px;
    font-size: 1.25rem;
  }

  .time-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 34px;
  }

  .time-grid button {
    min-height: 70px;
    border-radius: 18px;
    font-size: 1.25rem;
  }

  .chosen-time {
    font-size: 1.25rem;
  }
}

@media (max-width: 640px) {
  body {
    overflow-y: hidden;
  }

  body::before {
    background-position: center center;
    background-size: cover;
  }

  .shell {
    min-height: 100svh;
    padding: 0;
  }

  .invite-card {
    min-height: 100svh;
    border-radius: 0;
    padding: clamp(54px, 8svh, 82px) 18px clamp(34px, 7svh, 62px);
  }

  .actions {
    min-height: 170px;
    gap: 16px;
  }

  .answer {
    width: min(300px, 100%);
    min-width: 0;
    min-height: 76px;
    border-radius: 24px;
  }

  .no.is-running {
    width: min(300px, calc(100% - 36px));
  }

  .time-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .results-toolbar {
    flex-direction: column;
  }
}
