/* Your Secret Naughty Santa
   A loud flat poster built around the hand-drawn Santa: his red, his mint
   beard, the cream of his vest, pine for the season and ink for the outline. */

@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('/type/cabinet-grotesk.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --pine: #14503f;
  --red: #cc3028;
  --mint: #8fd5c0;
  --cream: #f5efe3;
  --cream-2: #e8dfcd;
  --sheet: #fffdf8;
  --ink: #221c1a;
  --white: #ffffff;
  --muted: #5d544c;
  /* placeholder examples: lighter than any answer, still readable */
  --example: #8a7e72;

  --font: 'Cabinet Grotesk', 'Arial Black', 'Helvetica Neue', Arial, sans-serif;

  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2.5rem, 1.2rem + 5vw, 5.5rem);
  --step-display: clamp(4rem, 12vw, 13rem);

  --margin: clamp(16px, 2vw, 28px);
  --gap: clamp(16px, 2vw, 28px);
  --section: clamp(88px, 12vw, 190px);
  --r: 28px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--pine);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p,
ol,
ul,
figure,
blockquote,
fieldset {
  margin: 0;
  padding: 0;
}

ol,
ul {
  list-style: none;
}

fieldset {
  border: 0;
  min-width: 0;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

strong,
b {
  font-weight: 500;
}

::selection {
  background: var(--red);
  color: var(--white);
}

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.skip {
  position: fixed;
  left: var(--margin);
  top: -100px;
  z-index: 10;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
}

.skip:focus {
  top: 12px;
}

.hidden-label {
  position: absolute;
  width: 1px; /* taste-skill-ignore: visually hidden label */
  height: 1px; /* taste-skill-ignore */
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

/* ---------- type ---------- */

.display,
.head {
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.9;
  text-wrap: balance;
}

.display {
  /* --squeeze shrinks a headline whose translation runs longer than the English */
  font-size: calc(var(--step-display) * var(--squeeze, 1));
  line-height: 0.86;
}

.head {
  font-size: var(--step-head);
}

.lead {
  font-size: var(--step-lead);
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.small {
  font-size: var(--step-small);
}

.measure {
  max-width: 44ch;
}

/* ---------- panels ---------- */

.panel {
  position: relative;
  padding: var(--section) var(--margin);
  overflow: hidden;
}

.panel--pine {
  background: var(--pine);
  color: var(--cream);
}

.panel--cream {
  background: var(--cream);
  color: var(--ink);
}

.panel--red {
  background: var(--red);
  color: var(--white);
}

.panel--mint {
  background: var(--mint);
  color: var(--ink);
}

.panel--ink {
  background: var(--ink);
  color: var(--cream);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 64px;
  padding: 0 34px;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font-size: var(--step-lead);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 220ms var(--spring),
    background-color 160ms linear;
}

.btn:hover {
  transform: translateY(-3px) rotate(-1.5deg);
}

.btn:active {
  transform: scale(0.96);
}

.btn--ink {
  background: var(--ink);
  color: var(--cream);
}

.btn--cream {
  background: var(--cream);
  color: var(--ink);
}

.btn--small {
  min-height: 48px;
  padding: 0 22px;
  font-size: var(--step-body);
}

.btn[disabled] {
  cursor: progress;
  transform: none;
}

.link {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  transition: text-underline-offset 160ms var(--ease);
}

.link:hover {
  text-underline-offset: 0.38em;
}

.textbtn {
  padding: 0;
  border: 0;
  background: none;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.textbtn:hover {
  text-underline-offset: 0.38em;
}

/* ---------- top bar ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--margin) 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

/* the brand icon, shown as a small rounded chip beside the name */
.wordmark .mark {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.top nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 36px);
}

.top nav a {
  font-weight: 500;
  text-decoration: none;
}

/* the language menu */

.lang {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  /* a tint of whatever colour the bar's text has, so it shows on green and on cream */
  background: rgba(128, 128, 128, 0.2);
  background: color-mix(in srgb, currentColor 15%, transparent);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms linear;
}

.lang:hover {
  background: color-mix(in srgb, currentColor 26%, transparent);
}

.lang-now {
  padding-right: 18px;
}

.lang-code {
  display: none;
}

.lang select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.lang::after {
  content: '';
  position: absolute;
  right: 15px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-75%) rotate(45deg);
  pointer-events: none;
}

.lang:has(select:focus-visible) {
  outline: 3px solid currentColor;
  outline-offset: 4px;
}

@media (max-width: 700px) {
  .lang-name {
    display: none;
  }

  .lang-code {
    display: inline;
  }
}

.lang option {
  color: var(--ink);
  background: var(--sheet);
}

/* a translated page waits for its words instead of flashing English */

.i18n-wait body {
  visibility: hidden;
}

.top nav a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(41vw, 620px);
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  background: var(--pine);
  color: var(--cream);
  overflow: hidden;
}

.hero .top {
  grid-column: 1 / -1;
}

.hero h1 {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  padding: clamp(28px, 7svh, 84px) 0 0 var(--margin);
}

.hero h1 .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}

.hero h1 .line > span {
  display: block;
}

.hero-foot {
  grid-column: 1;
  grid-row: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  padding: 40px 0 clamp(28px, 5svh, 56px) var(--margin);
}

.hero-santa {
  grid-column: 2;
  grid-row: 2 / 4;
  align-self: end;
  justify-self: end;
  width: 100%;
  margin: 0 var(--margin) clamp(12px, 3svh, 36px) 0;
  padding-right: var(--margin);
  transform-origin: 50% 100%;
}

.hero-santa img {
  width: 100%;
  max-height: 84svh;
  object-fit: contain;
  object-position: 50% 100%;
  transform: rotate(-4deg);
  transform-origin: 50% 100%;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto 1fr auto;
  }

  .hero h1 {
    font-size: 16.4vw;
    line-height: 0.9;
    padding-top: 5svh;
  }

  .hero-santa {
    grid-column: 1;
    grid-row: 3;
    align-self: center;
    justify-self: center;
    width: min(78vw, 560px);
    margin: 8px 0 0;
    padding-right: 0;
  }

  .hero-santa img {
    max-height: 46svh;
  }

  .hero-foot {
    grid-row: 4;
    gap: 18px;
    padding: 8px var(--margin) 24px;
  }
}

@media (max-width: 700px) {
  .hero-foot .btn {
    width: 100%;
  }

  /* on a phone the bar holds the name and the language; the sections are in the footer */
  .top nav a {
    display: none;
  }
}

/* ---------- the list ---------- */

.list-head {
  grid-column: 1 / span 7;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: clamp(40px, 6vw, 88px);
}

.sheet-wrap {
  grid-column: 1 / -1;
  position: relative;
}

.peek {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
}

/* The form: three numbered steps, each a band of the sheet. The number sits
   in a stamp on the left; it turns into a tick when that step has what it needs. */
.sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 4vw, 56px);
  border-radius: var(--r);
  background: var(--sheet);
}

.step {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  column-gap: clamp(24px, 4vw, 64px);
  padding-block: clamp(28px, 3.4vw, 44px);
  border-top: 3px dashed var(--cream-2);
}

.step:first-child {
  padding-top: 0;
  border-top: 0;
}

.step-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  align-self: start;
  position: sticky;
  top: 96px;
}

.step-n {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  transform: rotate(-6deg);
  box-shadow: 0 0 0 4px var(--sheet), 0 0 0 7px var(--red);
  transition:
    background-color 200ms linear,
    box-shadow 200ms linear,
    transform 320ms var(--spring);
}

.step-tick {
  position: absolute;
  width: 22px;
  height: 12px;
  margin-top: -6px;
  border-left: 4px solid currentColor;
  border-bottom: 4px solid currentColor;
  transform: rotate(-45deg) scale(0);
  transition: transform 320ms var(--spring);
}

.step.is-done .step-n {
  background: var(--pine);
  box-shadow: 0 0 0 4px var(--sheet), 0 0 0 7px var(--pine);
  transform: rotate(4deg);
}

.step.is-done .step-digit {
  opacity: 0;
}

.step.is-done .step-tick {
  transform: rotate(-45deg) scale(1);
}

.step-kicker {
  margin-bottom: 4px;
  font-size: var(--step-small);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
}

.sheet h3 {
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  text-wrap: balance;
}

.step-lead {
  max-width: 30ch;
  margin-top: 8px;
  color: var(--muted);
}

.step-body {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.sheet-go {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  padding-top: clamp(28px, 3.4vw, 44px);
  border-top: 3px dashed var(--cream-2);
}

.btn--big {
  min-height: 76px;
  padding: 0 44px;
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.875rem);
}

.rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: none;
}

.row {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 48px;
  column-gap: 10px;
  align-items: center;
  padding: 6px 6px 6px 10px;
  border-radius: 20px;
  background: var(--cream);
  transition: background-color 160ms linear;
}

.row:focus-within {
  background: var(--cream-2);
}

.row input {
  width: 100%;
  min-height: 48px;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  font-size: var(--step-lead);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.row input::placeholder {
  color: var(--example);
  font-style: italic;
  font-weight: 400;
  opacity: 1;
}

.row .alias {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  width: 60px;
  height: 64px;
  padding: 0;
  border: 0;
  background: none;
  transition: transform 220ms var(--spring);
}

.row .alias:hover {
  transform: rotate(-6deg) scale(1.08);
}

.row .alias img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.row .alias.is-empty img {
  opacity: 0.28;
}

.row input {
  grid-column: 2;
}

.row .remove {
  grid-column: 3;
  grid-row: 1;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: none;
  position: relative;
  transition:
    background-color 160ms linear,
    transform 220ms var(--spring);
}

.row .remove::before,
.row .remove::after {
  content: '';
  position: absolute;
  left: 14px;
  top: 20.5px;
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: var(--ink);
  transform: rotate(45deg);
}

.row .remove::after {
  transform: rotate(-45deg);
}

.row .remove:hover {
  background: var(--sheet);
  transform: rotate(90deg);
}

.row .mail {
  display: none;
  grid-column: 2 / -1;
  min-height: 40px;
  padding-bottom: 6px;
  font-size: var(--step-body);
  font-weight: 400;
  letter-spacing: 0;
}

.with-post .row .mail {
  display: block;
}

/* with an email line under the name, the alias stands beside both */
.with-post .row .alias {
  grid-row: 1 / span 2;
}

.row.is-new {
  animation: pop 320ms var(--spring) both;
}

/* "Email the invitations for me" */

.post {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post .small {
  max-width: 46ch;
  color: var(--muted);
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 12px;
  min-height: 44px;
  font-weight: 500;
  cursor: pointer;
}

.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch .track {
  position: relative;
  flex: none;
  width: 54px;
  height: 32px;
  border-radius: 999px;
  background: var(--cream-2);
  transition: background-color 160ms linear;
}

.switch .track::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  transition:
    transform 220ms var(--spring),
    background-color 160ms linear;
}

.switch:has(input:checked) .track {
  background: var(--red);
}

.switch:has(input:checked) .track::after {
  background: var(--white);
  transform: translateX(22px);
}

.switch:has(input:focus-visible) .track {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}

.rows-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: -8px;
}

.count {
  color: var(--muted);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label,
.field legend,
.label {
  font-weight: 500;
}

.field .hint {
  font-weight: 400;
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border: 0;
  border-radius: 18px;
  background: var(--cream);
  transition: background-color 160ms linear;
}

.field textarea {
  min-height: 108px;
  resize: vertical;
  line-height: 1.4;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  background: var(--cream-2);
  outline: 3px solid var(--ink);
  outline-offset: 0;
}

.field ::placeholder {
  color: var(--example);
  font-style: italic;
  opacity: 1;
}

.pair {
  display: grid;
  /* minmax(0, …): a field may never push its column wider than half the row. */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  min-width: 0;
}

/* iOS Safari draws a date input at its own width and ignores width: 100% while it keeps the
   native look, so it ran into the budget beside it. Without that look it fills its column
   like every other field, and the date sits on the left like the other answers. */
.field input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  min-width: 0;
  max-width: 100%;
  text-align: left;
}

.field input[type="date"]::-webkit-date-and-time-value {
  margin: 0;
  text-align: left;
}

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

.vibe {
  position: relative;
  display: block;
  padding: 14px 18px;
  border-radius: 18px;
  background: var(--cream);
  cursor: pointer;
  transition:
    background-color 160ms linear,
    color 160ms linear,
    transform 220ms var(--spring);
}

.vibe:hover {
  transform: translateX(4px);
}

.vibe input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.vibe b {
  display: block;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.rules-field {
  margin-top: 10px;
}
.rules-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}
.rules-field textarea {
  min-height: 0;
}
.vibe:has(input:checked) {
  background: var(--red);
  color: var(--white);
}

.vibe:has(input:focus-visible) {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.apart summary {
  cursor: pointer;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  list-style: none;
}

.apart summary::-webkit-details-marker {
  display: none;
}

.apart-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
}

.apart-pick {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}

.pairs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pairs li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 16px;
  border-radius: 999px;
  background: var(--mint);
  font-weight: 500;
}

.pairs button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--mint);
  font-weight: 800;
  line-height: 1;
}

.error {
  flex-basis: 100%;
  padding: 16px 20px;
  border-radius: 18px;
  background: var(--ink);
  color: var(--cream);
  font-weight: 500;
}

.note {
  color: var(--muted);
  max-width: 40ch;
}

.mine {
  grid-column: 1 / -1;
  margin-top: 28px;
}

@media (max-width: 900px) {
  .list-head {
    grid-column: 1 / -1;
    padding-bottom: calc(clamp(190px, 30vw, 440px) * 0.6 + 28px);
  }

  .step {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 22px;
  }

  .step-head {
    position: static;
  }

  .step-lead {
    max-width: 46ch;
  }
}

@media (max-width: 700px) {
  .list-head {
    padding-bottom: calc(27vw + 24px);
  }

  .peek-clip {
    width: 46vw;
    right: 4px;
  }

  .sheet {
    padding: 22px 14px 24px;
  }

  .vibes {
    grid-template-columns: minmax(0, 1fr);
  }

  /* On a phone, gift day and budget each get the whole width, one under the other. */
  .pair {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .sheet-go .btn {
    width: 100%;
    white-space: normal;
    padding-block: 14px;
  }

  .step-n {
    width: 46px;
    height: 46px;
    font-size: 1.4rem;
  }

  .pair--sign {
    grid-template-columns: minmax(0, 1fr);
  }

  .apart-pick {
    grid-template-columns: 1fr 1fr;
  }

  .apart-pick .btn {
    grid-column: 1 / -1;
  }
}

/* ---------- how it works: one bar ---------- */

.how h2 {
  margin-bottom: 64px;
}

.bar {
  display: flex;
  gap: 6px;
  height: 22vh;
  min-height: 170px;
}

.seg {
  flex: var(--grow) 1 0;
  min-width: 13%;
  padding: 20px;
  border-radius: var(--r);
  font-size: clamp(1.25rem, 2vw, 1.875rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  transform-origin: 0 50%;
}

.seg--ink {
  background: var(--ink);
  color: var(--cream);
}

.seg--cream {
  background: var(--cream);
  color: var(--ink);
}

.seg--red {
  background: var(--red);
  color: var(--white);
}

.seg--pine {
  background: var(--pine);
  color: var(--cream);
}

.steps {
  display: flex;
  gap: 6px;
  margin-top: 18px;
}

.steps li {
  flex: var(--grow) 1 0;
  min-width: 13%;
  padding-right: 12px;
}

.steps li span {
  display: block;
  max-width: 24ch;
}

/* the heading stops short of the penguin standing on the bar, in every language */
.how h2 {
  max-width: 56%;
}

@media (max-width: 900px) {
  .how h2 {
    max-width: none;
    margin-bottom: 40px;
  }

  .how-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .bar,
  .steps {
    display: contents;
  }

  .seg {
    min-height: calc(72px + var(--grow) * 7px);
    margin-top: 6px;
    order: var(--n);
  }

  .steps li {
    order: var(--n);
    padding: 10px 0 18px 20px;
  }

  .steps li span {
    max-width: none;
  }
}

/* characters standing on the bar */

.seg {
  position: relative;
}

.on-bar {
  position: absolute;
  right: 6%;
  bottom: calc(100% - 10px);
  width: auto;
  height: clamp(120px, 15vw, 230px);
  max-width: none;
  pointer-events: none;
}

.seg--pine .on-bar {
  right: 12%;
}

@media (max-width: 900px) {
  .on-bar {
    height: 118px;
    bottom: 8px;
    right: 14px;
  }

  .seg--pine .on-bar {
    right: 14px;
  }

  .seg:has(.on-bar) {
    min-height: 136px;
    padding-right: 130px;
  }
}

/* ---------- the usual suspects ---------- */

.lineup {
  padding-bottom: clamp(56px, 7vw, 110px);
}

.lineup h2 {
  grid-column: 1 / span 7;
}

.lineup .lead {
  grid-column: 8 / -1;
  align-self: end;
  max-width: 30ch;
}

.parade {
  margin: clamp(40px, 6vw, 88px) calc(var(--margin) * -1) 0;
  overflow: hidden;
}

.parade-track {
  display: flex;
  align-items: flex-end;
  gap: clamp(28px, 4vw, 64px);
  width: max-content;
  padding: 0 clamp(14px, 2vw, 32px);
}

.parade.is-looping .parade-track {
  animation: parade 70s linear infinite;
}

.parade.is-looping:hover .parade-track,
.parade.is-looping:focus-within .parade-track {
  animation-play-state: paused;
}

@keyframes parade {
  to {
    transform: translateX(-50%);
  }
}

.parade li {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.parade li img {
  width: auto;
  height: clamp(220px, 28vw, 420px);
  max-width: none;
  transform-origin: 50% 100%;
  transition: transform 320ms var(--spring);
}

.parade li:nth-child(even) img {
  height: clamp(190px, 24vw, 360px);
}

.parade li:hover img {
  transform: rotate(-4deg) scale(1.05);
}

.parade li b {
  display: block;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.parade li span {
  display: block;
  color: var(--muted);
}

@media (max-width: 800px) {
  .lineup h2,
  .lineup .lead {
    grid-column: 1 / -1;
  }

  .lineup .lead {
    margin-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .parade {
    overflow-x: auto;
  }
}

/* ---------- one name each ---------- */

.secret {
  padding-bottom: 0;
}

.secret-text {
  grid-column: 1 / span 6;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: var(--section);
}

.secret-art {
  grid-column: 7 / -1;
  align-self: end;
  margin-bottom: -7%;
}

.secret-art img {
  width: 100%;
  transform-origin: 50% 100%;
}

.card {
  width: min(100%, 440px);
  margin-top: 20px;
  padding: 28px;
  border-radius: var(--r);
  background: var(--sheet);
  color: var(--ink);
}

.card {
  position: relative;
}

.card .alias-art {
  position: absolute;
  right: 18px;
  top: -64px;
  width: auto;
  height: 170px;
  transform: rotate(5deg);
}

.card .for {
  color: var(--muted);
}

.card .who {
  font-size: var(--step-head);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.card .alias-line {
  margin-top: 10px;
}

.card .btn {
  margin-top: 24px;
}

.card .after {
  margin-top: 16px;
  color: var(--muted);
}

/* what kind of gift to buy: the one thing a guest needs spelled out */
.gift-kind {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 18px;
  background: var(--mint);
  color: var(--ink);
}

.facts {
  display: flex;
  flex-direction: column;
  margin-top: 18px;
}

.facts div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 14px;
}

.facts div:nth-child(odd) {
  background: var(--cream);
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
}

.swap {
  animation: swap 420ms var(--spring) both;
}

@keyframes swap {
  from {
    opacity: 0;
    transform: translateY(14px) rotate(-2deg) scale(0.97);
  }
}

@media (max-width: 800px) {
  .secret-text {
    grid-column: 1 / -1;
    padding-bottom: 40px;
  }

  .secret-art {
    grid-column: 3 / -1;
  }
}

/* ---------- ho ho / oh no ---------- */

.pair-words {
  padding-bottom: 0;
}

.pair-words .intro h2 {
  grid-column: 1 / span 5;
  max-width: 27ch;
  font-size: var(--step-lead);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.pair-words .intro p {
  grid-column: 7 / -1;
  max-width: 56ch;
}

.specimens {
  margin-top: 12vh;
  height: clamp(190px, 21vw, 360px);
  overflow: hidden;
}

.specimen {
  grid-column: span 6;
}

.specimen div {
  font-size: calc(clamp(6rem, 18.4vw, 19rem) * var(--squeeze, 1));
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.8;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .pair-words .intro h2,
  .pair-words .intro p {
    grid-column: 1 / -1;
  }

  .pair-words .intro p {
    margin-top: 18px;
  }

  .specimens {
    display: block;
    height: auto;
    margin: 56px calc(var(--margin) * -1) 0;
  }

  .specimen {
    height: 34svh;
    overflow: hidden;
    padding: 20px var(--margin) 0;
  }

  .specimen div {
    font-size: calc(36vw * var(--squeeze, 1));
  }

  .specimen + .specimen {
    background: var(--cream);
    color: var(--ink);
  }
}

/* ---------- how naughty: one gift tag on wrapping paper ---------- */

/* The pattern is the whole point here, so it gets room: a single solid tag lies
   on it and nothing else. The tile is stored at more than twice the size it is
   shown at, so it stays sharp. */
.wrap {
  display: grid;
  place-items: center;
  padding-block: clamp(72px, 11vw, 170px);
  background: var(--cream) url('/art/pattern.webp') center top / 520px auto;
}

.tag {
  position: relative;
  width: min(100%, 760px);
  padding: clamp(56px, 6vw, 76px) clamp(20px, 4vw, 56px) clamp(28px, 4vw, 52px);
  border-radius: var(--r);
  background: var(--ink);
  color: var(--cream);
  rotate: -1.5deg;
}

/* the hole the ribbon would go through */
.tag::before {
  content: '';
  position: absolute;
  left: 50%;
  top: clamp(18px, 2vw, 26px);
  width: 22px;
  height: 22px;
  margin-left: -11px;
  border-radius: 50%;
  background: var(--cream);
}

.tag h2 {
  text-align: center;
}

.tones {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: clamp(24px, 3vw, 40px) 0 clamp(24px, 3vw, 36px);
}

.tone {
  display: grid;
  grid-template-columns: minmax(0, 15ch) minmax(0, 1fr);
  align-items: center;
  gap: 4px 28px;
  padding: 18px 24px;
  border-radius: 18px;
}

.tone b {
  font-size: var(--step-lead);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.tone--nice {
  background: var(--mint);
  color: var(--ink);
}

.tone--cheeky {
  background: var(--cream);
  color: var(--ink);
}

.tone--naughty {
  background: var(--red);
  color: var(--white);
  font-weight: 500;
}

.tone--own {
  background: var(--pine);
  color: var(--cream);
}

.tag .btn {
  display: flex;
  width: fit-content;
  margin-inline: auto;
}

@media (max-width: 700px) {
  .wrap {
    background-size: 380px auto;
  }

  .tag {
    rotate: none;
  }

  .tone {
    grid-template-columns: minmax(0, 1fr);
  }

  .tag .btn {
    width: 100%;
  }
}

/* ---------- questions ---------- */

.faq h2 {
  grid-column: 1 / span 4;
  align-self: start;
  position: sticky;
  top: 96px;
  font-size: clamp(2.5rem, 4.6vw, 5.5rem);
}

.tiles {
  grid-column: 5 / -1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tile {
  border-radius: var(--r);
  background: var(--cream-2);
  transition:
    background-color 200ms linear,
    color 200ms linear;
}

.tile summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 16px 24px;
  font-size: var(--step-lead);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  cursor: pointer;
  list-style: none;
}

.tile summary::-webkit-details-marker {
  display: none;
}

.tile summary:focus-visible {
  outline-offset: -5px;
  border-radius: var(--r);
}

.plus {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
}

.plus::before,
.plus::after {
  content: '';
  position: absolute;
  left: 0;
  top: 6.5px;
  width: 16px;
  height: 3px;
  background: currentColor;
  transition: transform 260ms var(--spring);
}

.plus::after {
  transform: rotate(90deg);
}

.tile[open] {
  background: var(--red);
  color: var(--white);
}

.tile[open] .plus::after {
  transform: rotate(0deg);
}

.tile p {
  max-width: 52ch;
  padding: 0 24px 26px;
}

.tile[open] p {
  animation: answer 300ms var(--ease) both;
}

@keyframes answer {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@media (max-width: 800px) {
  .faq h2 {
    grid-column: 1 / -1;
    position: static;
    font-size: 9vw;
    margin-bottom: 32px;
  }

  .tiles {
    grid-column: 1 / -1;
    gap: 6px;
  }

  .tile summary {
    min-height: 64px;
    padding: 14px 20px;
  }

  .tile p {
    padding: 0 20px 22px;
  }
}

/* ---------- the close ---------- */

.close {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(36vw, 520px);
  grid-template-rows: 1fr auto;
  column-gap: var(--gap);
  min-height: 90svh;
  padding-top: clamp(64px, 9vw, 130px);
  padding-bottom: 0;
}

.close h2 {
  grid-column: 1;
  grid-row: 1;
  font-size: clamp(3.6rem, 10.4vw, 12rem);
  line-height: 0.9;
}

.close h2 span {
  display: block;
}

.close-foot {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  padding: 56px 0 clamp(32px, 5vw, 56px);
}

.close-art {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: end;
}

.close-art img {
  width: 100%;
  transform-origin: 50% 100%;
  animation: sway2 5s ease-in-out infinite alternate;
}

@media (max-width: 700px) {
  .close {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    min-height: 0;
  }

  .close h2 {
    font-size: 15vw;
  }

  .close-foot {
    padding: 28px 0 8px;
    align-items: stretch;
  }

  .close-art {
    grid-column: 1;
    grid-row: 3;
    width: 64vw;
    justify-self: end;
  }
}

/* ---------- footer ---------- */

.foot {
  padding: clamp(72px, 9vw, 130px) var(--margin) 28px;
  background: var(--ink);
  color: var(--cream);
}

/* the drawn logo, centred, with the links and the small print under it */
.foot-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 44px;
  text-align: center;
}

/* shown at half the size it was drawn at, so it stays sharp */
.foot-logo {
  width: min(100%, 540px);
}

.foot-logo img {
  width: 100%;
  height: auto;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px clamp(24px, 4vw, 48px);
}

.foot-links ul {
  display: contents;
}

.foot-links a {
  text-decoration: none;
}

.foot-links a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

.foot-links .about {
  order: -1;
  flex: 0 0 100%;
  padding-inline: max(0px, calc((100% - 46ch) / 2));
  padding-bottom: 14px;
}

.foot-last p {
  min-width: 0;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.foot-last a:not(.btn) {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.foot-last {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 72px;
}

/* ---------- motion ---------- */

.js [data-rise] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 600ms var(--ease),
    transform 700ms var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}

.js [data-rise].in {
  opacity: 1;
  transform: none;
}

.js [data-grow] {
  transform: scaleX(0);
  transition: transform 800ms var(--ease);
  transition-delay: calc(var(--i, 0) * 110ms);
}

.js [data-grow].in {
  transform: none;
}

.js [data-stack] {
  transform: scaleY(0);
  transition: transform 620ms var(--spring);
  transition-delay: calc(var(--i, 0) * 45ms);
}

.js [data-stack].in {
  transform: none;
}

.js .hero h1 .line > span {
  transform: translateY(105%);
  animation: unmask 900ms var(--ease) 80ms forwards;
}

.js .hero h1 .line + .line > span {
  animation-delay: 190ms;
}

@keyframes unmask {
  to {
    transform: none;
  }
}

.js .hero-santa {
  animation: arrive 900ms var(--spring) 320ms both;
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(18%) rotate(6deg);
  }
}

.hero-santa img {
  animation: sway 5.5s ease-in-out 1.4s infinite alternate;
}

@keyframes sway {
  from {
    transform: rotate(-4deg);
  }

  to {
    transform: rotate(-1.5deg);
  }
}

.js .peek {
  transform: translateY(100%);
  transition: transform 900ms var(--spring) 200ms;
}

.js .peek.in {
  transform: none;
}

/* Santa rises from behind the sheet. The box that hides him below the sheet's
   edge takes its shape from the picture itself, so his hat is never cropped. */
.peek-clip {
  position: absolute;
  right: clamp(8px, 4vw, 72px);
  bottom: 100%;
  width: clamp(190px, 30vw, 440px);
  aspect-ratio: 1000 / 600;
  overflow: hidden;
  pointer-events: none;
}

.secret-art img {
  animation: nudge 4.5s ease-in-out infinite alternate;
}

@keyframes nudge {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(-3deg);
  }
}

.wiggle {
  animation: wiggle 420ms var(--ease);
}

@keyframes wiggle {
  25% {
    transform: rotate(-2deg);
  }

  60% {
    transform: rotate(1.5deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }

  .js [data-rise],
  .js [data-grow],
  .js [data-stack],
  .js .peek,
  .js .hero h1 .line > span {
    opacity: 1;
    transform: none;
  }
}

/* ---------- invitation and organiser pages ---------- */

.page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.page main {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-content: start;
  padding: clamp(32px, 6vw, 88px) var(--margin) clamp(48px, 8vw, 120px);
}

.page--pine {
  background: var(--pine);
  color: var(--cream);
}

.page--cream {
  background: var(--cream);
  color: var(--ink);
}

.page .foot-mini {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 20px var(--margin) 24px;
}

.page .foot-mini a {
  text-decoration: none;
}

.page .foot-mini a:hover {
  text-decoration: underline;
}

.state {
  grid-column: 1 / span 8;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

/* invitation */

.inv-art {
  grid-column: 8 / -1;
  grid-row: 1 / span 3;
  align-self: start;
  justify-self: end;
  width: min(100%, 460px);
  position: sticky;
  top: 24px;
}

.inv-art img {
  width: 100%;
  transform: rotate(3deg);
  animation: sway2 5s ease-in-out infinite alternate;
  transform-origin: 50% 100%;
}

@keyframes sway2 {
  from {
    transform: rotate(3deg);
  }

  to {
    transform: rotate(0.5deg);
  }
}

.inv {
  grid-column: 1 / span 7;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.inv h1 {
  overflow-wrap: anywhere;
}

.inv .name-fit {
  font-size: var(--fit, var(--step-display));
}

.envelope {
  width: 100%;
  margin-top: 20px;
  padding: clamp(22px, 3.4vw, 44px);
  border-radius: var(--r);
  background: var(--sheet);
  color: var(--ink);
}

.envelope h2 {
  font-size: var(--step-lead);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.envelope .target {
  margin: 6px 0 4px;
  font-size: var(--fit, var(--step-head));
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.95;
  color: var(--red);
  overflow-wrap: anywhere;
}

.envelope .facts {
  margin-top: 24px;
}

.quote {
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--mint);
}

.quote cite {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-weight: 500;
}

.wishbox {
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--cream);
}

.wishbox p + p {
  margin-top: 6px;
}

.wishbox .wish-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.own {
  width: 100%;
  padding: clamp(22px, 3.4vw, 44px);
  border-radius: var(--r);
  background: var(--mint);
  color: var(--ink);
}

.own h2 {
  font-size: var(--step-lead);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 6px;
}

.own .field {
  margin-top: 16px;
}

.own .field textarea {
  background: var(--sheet);
}

.own .field textarea:focus {
  background: var(--sheet);
}

.own-go {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 16px;
}

.reseal {
  margin-top: 4px;
}

@media (max-width: 860px) {
  .state,
  .inv {
    grid-column: 1 / -1;
  }

  .inv-art {
    grid-column: 1 / -1;
    grid-row: auto;
    position: static;
    justify-self: end;
    width: 54vw;
    margin: -8px 0 -30px;
    order: -1;
  }

  .inv .btn {
    width: 100%;
  }

  .own-go .btn {
    width: 100%;
  }
}

/* organiser */

.org-head {
  grid-column: 1 / span 8;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: clamp(36px, 5vw, 72px);
}

.org-head h1 {
  font-size: var(--step-head);
  overflow-wrap: anywhere;
}

.org-art {
  grid-column: 9 / -1;
  align-self: end;
  justify-self: end;
  width: min(100%, 380px);
  margin-bottom: -2px;
  overflow: hidden;
}

.keep {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  padding: 22px clamp(20px, 3vw, 36px);
  border-radius: var(--r);
  background: var(--ink);
  color: var(--cream);
}

.keep p {
  max-width: 56ch;
}

.keep-go {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-status {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 8px;
  padding: 18px clamp(18px, 3vw, 36px);
  border-radius: var(--r);
  background: var(--mint);
  font-weight: 500;
}

.post-status.is-bad {
  background: var(--ink);
  color: var(--cream);
}

.mail-form {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.mail-form[hidden] {
  display: none;
}

.mail-form input {
  flex: 1 1 220px;
  min-width: 0;
  min-height: 48px;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--cream);
  transition: background-color 160ms linear;
}

.mail-form input:focus {
  background: var(--cream-2);
  outline: 3px solid var(--ink);
  outline-offset: 0;
}

.mail-form ::placeholder {
  color: var(--muted);
  opacity: 1;
}

.mail-said {
  flex-basis: 100%;
  color: var(--muted);
}

.mail-said:empty {
  display: none;
}

.mail-form--keep {
  flex-basis: 100%;
}

.mail-form--keep input,
.mail-form--keep input:focus {
  background: var(--sheet);
}

.mail-form--keep input:focus {
  outline-color: var(--mint);
}

.mail-form--keep .btn {
  background: var(--mint);
  color: var(--ink);
}

.mail-form--keep .mail-said {
  color: var(--cream);
}

.people {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.person {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 24px;
  padding: 18px clamp(18px, 3vw, 36px);
  border-radius: var(--r);
  background: var(--sheet);
}

.person .face {
  width: 56px;
  height: 64px;
  object-fit: contain;
}

.person .who {
  font-size: var(--step-lead);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.person .status {
  color: var(--muted);
}

.person .status.is-open {
  color: var(--pine);
  font-weight: 500;
}

.send {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.send .btn--small {
  background: var(--cream);
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0;
}

.send .btn--small.is-main {
  background: var(--red);
  color: var(--white);
  font-weight: 800;
}

.send .btn--small.did {
  background: var(--pine);
  color: var(--cream);
}

.org-more {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 40px;
}

@media (max-width: 860px) {
  .org-head {
    grid-column: 1 / -1;
    padding-bottom: 150px;
  }

  .org-art {
    grid-column: 1 / -1;
    width: 48vw;
    margin-top: -140px;
  }

  .person {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .person .send {
    grid-column: 1 / -1;
  }

  .send .btn--small {
    flex: 1 1 40%;
  }
}

/* ---------- the cookie question ---------- */

/* A card just under the top bar, in the normal flow: it pushes the page down a
   little instead of lying over it, so it never covers a headline or a button.
   Its two answers are the same size. */
.top:has(.consent) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  row-gap: 16px;
}

.consent {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 20px;
  padding: 14px 18px;
  border-radius: 22px;
  background: var(--ink);
  color: var(--cream);
  font-size: var(--step-small);
  line-height: 1.45;
  animation: consent-in 360ms var(--ease) both;
}

.consent-art {
  width: 50px;
  height: 54px;
  object-fit: contain;
}

.consent h2,
.consent p {
  display: inline;
}

.consent h2 {
  font-size: inherit;
  font-weight: 800;
}

.consent-go {
  display: flex;
  gap: 8px;
}

.consent-go .btn {
  min-height: 44px;
  padding-inline: 20px;
  font-size: var(--step-small);
}

.consent.is-leaving {
  animation: consent-out 200ms var(--ease) both;
}

@keyframes consent-in {
  from {
    opacity: 0;
  }
}

@keyframes consent-out {
  to {
    opacity: 0;
  }
}

@media (max-width: 800px) {
  .consent {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .consent-go {
    grid-column: 1 / -1;
  }

  .consent-go .btn {
    flex: 1 1 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .consent,
  .consent.is-leaving {
    animation: none;
  }
}

/* plain text pages */

.prose {
  grid-column: 1 / span 8;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.prose h1 {
  margin-bottom: 20px;
}

.prose h2 {
  margin-top: 28px;
  font-size: var(--step-lead);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.prose p,
.prose li {
  max-width: 62ch;
}

.prose ul {
  list-style: disc;
  padding-left: 1.2em;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 860px) {
  .prose {
    grid-column: 1 / -1;
  }
}

/* ---------- sticker packs ---------- */
.sticker-heading {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--gap);
  align-items: end;
}
.sticker-heading .head { max-width: 14ch; }
.sticker-language {
  margin: 36px 0 18px;
  font-weight: 800;
}
.sticker-packs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}
.sticker-pack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: clamp(16px, 2vw, 28px);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--r);
}
.sticker-pack:nth-child(2) { background: #f4d5c7; }
.sticker-pack:nth-child(3) { background: #e7e4b8; }
.sticker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin-bottom: 22px;
}
.sticker {
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 18px;
  cursor: pointer;
  transition: transform 220ms var(--spring);
}
.sticker img { display: block; width: 100%; height: auto; }
.sticker:hover { transform: rotate(-3deg) scale(1.05); }
.sticker:active { transform: scale(0.94); }
.sticker:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.sticker-pack h3 { font-size: clamp(1.5rem, 2.5vw, 2.5rem); line-height: 1.05; margin: 0 0 12px; }
.sticker-pack p { margin: 0 0 20px; }
.sticker-pack .sticker-format { margin-top: auto; font-weight: 700; padding-top: 8px; }
.sticker-pack .btn { width: 100%; text-align: center; justify-content: center; }
.sticker-how {
  margin-top: var(--gap);
  padding: clamp(16px, 2vw, 28px);
  background: var(--sheet);
  border: 2px solid var(--ink);
  border-radius: var(--r);
}
.sticker-how h3 { font-size: clamp(1.5rem, 2.5vw, 2.5rem); line-height: 1.05; margin: 0 0 16px; }
.sticker-how__ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.sticker-how h4 { margin: 0 0 6px; font-size: 1.15em; }
.sticker-how p { margin: 0; max-width: 60ch; }
.sticker-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  margin: 0;
  padding: 12px 20px;
  max-width: calc(100vw - 32px);
  background: var(--ink);
  color: var(--cream);
  font-weight: 800;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 200ms ease, transform 200ms var(--ease);
}
.sticker-toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 850px) {
  .sticker-heading { grid-template-columns: 1fr; }
  .sticker-packs { grid-template-columns: 1fr; }
  .sticker-grid { max-width: 420px; align-self: center; }
  .sticker-how__ways { grid-template-columns: 1fr; }
}

/* ---------- the studio's other apps ---------- */
.apps-heading {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--gap);
  align-items: end;
}
.apps-heading .head { max-width: 13ch; }
.apps-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: clamp(32px, 4vw, 56px);
}
.app-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 2.4vw, 32px);
  padding: clamp(18px, 2.4vw, 32px);
  border-radius: var(--r);
  background: var(--cream);
  color: var(--ink);
  text-decoration: none;
  transition: transform 260ms var(--spring);
}
.app-card:nth-child(2) { background: var(--mint); }
/* Map Poster is a gift, not a game: on the front page it gets the whole row, in red. */
.app-card--gift { grid-column: 1 / -1; background: var(--red); color: var(--white); }
.app-card--gift .app-text > span:not(.app-get) { max-width: 52ch; }
.app-card:hover { transform: rotate(-1deg) translateY(-3px); }
.app-card:focus-visible { outline: 3px solid var(--cream); outline-offset: 4px; }
/* The icon carries its own rounded shape, reflection and rim; this adds the shadow it sits on. */
.app-icon {
  width: clamp(96px, 11vw, 150px);
  height: auto;
  filter: drop-shadow(0 10px 14px rgb(34 28 26 / 0.28)) drop-shadow(0 2px 3px rgb(34 28 26 / 0.22));
  transition: transform 320ms var(--spring);
}
.app-card:hover .app-icon { transform: rotate(-6deg) scale(1.04); }
.app-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.app-name {
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.app-get {
  margin-top: 6px;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* On an opened invitation: one card, two quieter rows. */
.apps--small {
  width: 100%;
  padding: clamp(22px, 3.4vw, 44px);
  border-radius: var(--r);
  background: var(--ink);
  color: var(--cream);
}
.apps--small h2 {
  font-size: var(--step-lead);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 6px;
}
.apps--small .apps-list { grid-template-columns: 1fr; gap: 10px; margin-top: 20px; }
.apps--small .app-card { padding: 14px 18px; border-radius: 18px; gap: 18px; }
.apps--small .app-icon { width: 76px; }
.apps--small .app-name { font-size: 1.3rem; }
.apps--small .app-text { gap: 4px; font-size: 0.92em; line-height: 1.35; }
.apps--small .app-get { margin-top: 2px; }

@media (max-width: 850px) {
  .apps-heading { grid-template-columns: 1fr; }
  .apps-list { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .app-card { grid-template-columns: 1fr; justify-items: start; }
  .apps--small .app-card { grid-template-columns: auto minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .app-card, .app-icon { transition: none; }
}
