:root {
  --bg: #f7d7d2;
  --bg-2: #fbe9d8;
  --card: #fffaf4;
  --ink: #4a2c2a;
  --accent: #e57a7a;
  --accent-dark: #d45c5c;
  --shadow: 0 18px 40px rgba(180, 90, 90, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 12%, #ffe8ef 0, transparent 36%),
    radial-gradient(circle at 90% 18%, #ffe3c8 0, transparent 32%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  overflow: hidden;
}

.app {
  height: 100dvh;
  height: 100svh;
}

.page {
  display: none;
  height: 100%;
  align-items: center;
  justify-content: center;
  padding:
    max(24px, env(safe-area-inset-top))
    22px
    max(24px, env(safe-area-inset-bottom));
}

.page.is-active {
  display: flex;
}

.page-inner {
  width: min(100%, 430px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 5vw, 28px);
  text-align: center;
}

.gif-row {
  display: flex;
  gap: 14px;
  width: min(92vw, 360px);
  justify-content: center;
}

.gif-card {
  width: min(86vw, 340px);
  flex: 0 0 auto;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
  border: 6px solid #fff;
}

.gif-row .gif-card {
  width: auto;
  flex: 1 1 0;
  min-width: 0;
}

.gif-card--sm {
  border-radius: 22px;
  border-width: 5px;
}

.gif-card .gif {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.caption {
  font-family: "Shantell Sans", "Nunito", cursive;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.7rem, 7.4vw, 2.35rem);
  line-height: 1.25;
  max-width: 16ch;
  text-wrap: balance;
}

.caption--caps {
  font-style: normal;
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  max-width: none;
}

.caption--wide {
  max-width: 18ch;
}

.next-btn {
  appearance: none;
  border: 0;
  min-width: 190px;
  padding: 16px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: clamp(1rem, 4.2vw, 1.15rem);
  letter-spacing: 0.02em;
  max-width: 92%;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(213, 92, 92, 0.32);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.next-btn:active {
  transform: scale(0.97);
  background: var(--accent-dark);
}

.next-btn--arrow {
  min-width: 0;
  width: 64px;
  height: 64px;
  padding: 0;
  display: grid;
  place-items: center;
}

.next-btn--arrow svg {
  width: 28px;
  height: 28px;
}

.page--invite {
  overflow-y: auto;
  align-items: flex-start;
}

.page--invite .page-inner {
  gap: 16px;
  padding: 8px 0 12px;
  justify-content: flex-start;
  min-height: 100%;
}

.gif-card--invite {
  width: min(52vw, 180px);
  border-width: 4px;
  border-radius: 22px;
}

.invite {
  width: min(100%, 360px);
  padding: 18px 18px 16px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, #fffdf8 0%, #fff4ea 100%);
  border: 2px dashed #e7b7a8;
  box-shadow: var(--shadow);
  text-align: left;
}

.invite-seal {
  text-align: center;
  color: var(--accent);
  font-size: 1.15rem;
  line-height: 1;
  margin-bottom: 2px;
}

.invite-title {
  font-family: "Shantell Sans", "Nunito", cursive;
  font-style: italic;
  font-weight: 700;
  text-align: center;
  font-size: clamp(1.45rem, 6vw, 1.85rem);
  margin-bottom: 14px;
  letter-spacing: 0.03em;
}

.invite-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.invite-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px dotted #e4c4b8;
}

.invite-row dt {
  font-size: 0.82rem;
  font-weight: 800;
  color: #a56a62;
  white-space: nowrap;
}

.invite-row dd {
  font-family: "Shantell Sans", "Nunito", cursive;
  font-style: italic;
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.3;
}

.invite-row--long {
  align-items: start;
}

.invite-row--long dt {
  padding-top: 2px;
}

.invite-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
