/*
 * Secret Santa pages (/santa, /g/<id> and the landing pages).
 *
 * The look is the Keepwell app's own (KeepTheme.swift): a paper-notebook
 * cream, forest ink, a New York serif for headings, and the hand-drawn App
 * Store art on a peach-to-sage panel. One main action per screen, pinned at
 * the bottom where a thumb reaches it.
 */

:root {
  --ink: #0E2923;
  --text-2: #33402F;
  --text-3: #4A5148;
  --muted: #5C6359;
  --faint: #6B7166;
  --cream: #F7F2E7;
  --paper: #FEFCF7;
  --raised: #FBF8F0;
  --hair: rgba(199, 189, 166, 0.36);
  --line: rgba(199, 189, 166, 0.7);
  --forest: #133B34;
  --green: #296147;
  --mint: #D6E3D1;
  --mint-soft: #E4ECDF;
  --bubble: #DCEADA;
  --gold-soft: #F3E8D6;
  --gold-ink: #6E4A17;
  --peach-soft: #F5E2D3;
  --peach-ink: #6B3E22;
  --wait-ink: #8A5A1C;
  --red: #A0352C;
  --red-soft: #F6E3DF;
  --panel: linear-gradient(180deg, #F2DBCA 0%, #EED8C6 50%, #D3D9CF 100%);
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-card: 0 14px 32px rgba(14, 41, 35, 0.06), 0 1px 3px rgba(14, 41, 35, 0.04);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: radial-gradient(520px 380px at 100% 0%, rgba(214, 227, 209, 0.75), rgba(214, 227, 209, 0) 70%) no-repeat, var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
::selection { background: var(--bubble); color: var(--ink); }
a { color: var(--green); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid rgba(41, 97, 71, 0.4); outline-offset: 2px; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i.s12 { width: 12px; height: 12px; }
.i.s14 { width: 14px; height: 14px; }
.i.s16 { width: 16px; height: 16px; }
.i.s18 { width: 18px; height: 18px; }
.i.s22 { width: 22px; height: 22px; }
.i.bold { stroke-width: 2.6; }

/* MARK: Page frame */

.page {
  position: relative;
  max-width: 460px;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.content { padding: 0 20px; }
.spread { flex: 1; }

.brand { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 20px; }
.wordmark { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-family: var(--serif); font-weight: 600; font-size: 21px; letter-spacing: -0.5px; text-decoration: none; }
.wordmark .leaf { width: 22px; height: 22px; color: #99AA98; }

.top { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; min-height: 56px; padding: 0 6px; }
.top .t { overflow: hidden; text-align: center; font-size: 16px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.iconbtn {
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 22px; background: transparent;
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink); cursor: pointer;
  transition: background-color 160ms ease;
}
.iconbtn:active { background: rgba(14, 41, 35, 0.06); }

.stage { margin: 4px 16px 0; padding: 10px 8px 0; border-radius: 28px; background: var(--panel); overflow: hidden; }
.stage.loose { padding-top: 22px; }
.art { display: block; width: 100%; height: auto; overflow: visible; }

h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 31px;
  line-height: 1.12;
  letter-spacing: -0.4px;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.1px; }
.lede { margin: 10px 0 0; font-size: 16px; line-height: 1.5; color: var(--text-3); text-wrap: pretty; }
.small { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.hint { margin: 10px 4px 0; }
.headline { margin-top: 22px; }
.section { margin-top: 28px; }
.heading-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.count { flex: none; font-size: 13px; font-weight: 600; color: var(--green); font-variant-numeric: tabular-nums; }
.quote { margin: 14px 0 0; font-family: var(--serif); font-size: 18px; font-style: italic; line-height: 1.4; color: var(--text-2); overflow-wrap: anywhere; }

/* The bar holds the one main action, where a thumb reaches it. */
.bar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: auto;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, rgba(247, 242, 231, 0), var(--cream) 30%);
}
.bar .small { text-align: center; }
.after-bar { height: 8px; }

.section-sm { margin-top: 14px; }
.section-xs { margin-top: 8px; }
.center-text { text-align: center; }
.stage-gap { margin-top: 26px; }
.center-text .i { vertical-align: -2px; }

/* MARK: Buttons */

.btn, .ghost {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 56px; padding: 0 20px; border-radius: 18px;
  font-size: 17px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease), box-shadow 160ms ease, opacity 160ms ease;
  touch-action: manipulation;
}
.btn { border: 0; background: var(--forest); color: var(--paper); box-shadow: 0 10px 24px rgba(19, 59, 52, 0.22); }
.ghost { min-height: 52px; border: 1px solid rgba(19, 59, 52, 0.18); background: rgba(254, 252, 247, 0.6); color: var(--forest); font-size: 16px; }
.btn:active, .ghost:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.42; box-shadow: none; cursor: default; transform: none; }
.btn[aria-busy="true"], .ghost[aria-busy="true"] { opacity: 0.6; cursor: progress; }
.btn.danger { background: var(--red); box-shadow: 0 10px 24px rgba(160, 53, 44, 0.2); }
.textbtn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 2px;
  border: 0; background: transparent; color: var(--green); font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.pill {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(19, 59, 52, 0.2);
  background: transparent; color: var(--forest); font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.pill:active { background: rgba(19, 59, 52, 0.06); }
.x {
  flex: none; width: 44px; height: 44px; margin: -2px -4px -2px 0; padding: 0; border: 0; border-radius: 22px;
  background: transparent; color: #7A8076; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.x:active { background: rgba(14, 41, 35, 0.06); }
.right { display: flex; justify-content: flex-end; }
.center { display: flex; justify-content: center; }

/* MARK: Lists */

.list {
  margin: 12px 0 0; padding: 0; list-style: none; border-radius: 24px; background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.9); box-shadow: var(--shadow-card); overflow: hidden;
}
.row { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 10px 8px 14px; border-top: 1px solid var(--hair); }
.row:first-child { border-top: 0; }
.row.me { background: #F8FAF4; }
.row.flash { animation: flash 900ms var(--ease); }
@keyframes flash { from { background-color: #EAF2E4; } to { background-color: transparent; } }
.grow { flex: 1; min-width: 0; }
.name { display: block; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.status { display: flex; align-items: center; gap: 5px; margin-top: 2px; font-size: 13px; color: var(--muted); }
.status.ok { color: var(--green); font-weight: 600; }
.status.wait { color: var(--wait-ink); font-weight: 600; }

.av {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 17px; font-weight: 600;
}
.t0 { background: var(--mint); color: var(--forest); }
.t1 { background: var(--peach-soft); color: var(--peach-ink); }
.t2 { background: var(--gold-soft); color: var(--gold-ink); }
.av.empty { border: 1.5px dashed #C7BDA6; background: transparent; color: #8A8172; }
.tag { flex: none; padding: 4px 9px; border-radius: 999px; background: var(--mint-soft); color: #1F4A36; font-size: 12px; font-weight: 700; }

.row input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0; border: 0; background: transparent;
  color: var(--ink); font: inherit; font-size: 16px; font-weight: 600;
}
.row input::placeholder { color: var(--faint); font-weight: 500; }
.row input:focus { outline: none; }
.row:focus-within:not(.me) { background: #FBFAF4; }
.me-input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-size: 16px; font-weight: 600;
}
.me-input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(41, 97, 71, 0.14); }
.me-input::placeholder { color: var(--faint); font-weight: 500; }
.me-line { display: flex; align-items: center; gap: 8px; }
.row.out .av { opacity: 0.5; }
.row.out { background: transparent; }

.disclose {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 12px 10px 14px;
  border: 0; border-top: 1px solid var(--hair); background: transparent; color: inherit; text-align: left; text-decoration: none; cursor: pointer;
}
.disclose:first-child { border-top: 0; }
.disclose:active { background: rgba(14, 41, 35, 0.03); }
.disclose .chev { color: #9AA095; }
.ic {
  flex: none; width: 36px; height: 36px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center; background: var(--gold-soft); color: var(--gold-ink);
}
.ic.mint { background: var(--mint-soft); color: var(--green); }
.ic.peach { background: var(--peach-soft); color: var(--peach-ink); }
.ic.red { background: var(--red-soft); color: var(--red); }
.val { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.danger-text { color: var(--red); }

.track { height: 6px; margin-top: 8px; border-radius: 3px; background: rgba(199, 189, 166, 0.42); overflow: hidden; }
.track span { display: block; width: 0; height: 100%; border-radius: 3px; background: var(--green); transition: width 400ms var(--ease); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; min-height: 34px; padding: 0 13px; border-radius: 999px; background: #ECEADF; color: var(--text-2); font-size: 14px; font-weight: 600; }
.chip.gold { background: var(--gold-soft); color: var(--gold-ink); }

/* MARK: Forms */

.field { display: flex; flex-direction: column; gap: 7px; }
.field + .field { margin-top: 16px; }
.field label, .label { font-size: 14px; font-weight: 600; color: var(--text-2); }
.label-row { display: flex; align-items: center; justify-content: space-between; min-height: 32px; }
.label-row .x { width: 36px; height: 36px; margin: -6px -8px -6px 0; }
[tabindex="-1"]:focus { outline: none; }
.input {
  width: 100%; min-height: 52px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); font: inherit; font-size: 17px; line-height: 1.4;
}
textarea.input { resize: none; overflow: hidden; }
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(41, 97, 71, 0.14); }
.input[aria-invalid="true"] { border-color: var(--red); }
.input.title { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.counter { min-height: 18px; font-size: 12px; color: var(--muted); text-align: right; }
.counter:empty { display: none; }
.error { margin: 8px 4px 0; font-size: 14px; line-height: 1.4; color: var(--red); font-weight: 500; }
.status-line { min-height: 20px; margin: 4px 0 0; font-size: 14px; color: var(--green); text-align: center; }
.fallback { margin: 6px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--paper); font-size: 14px; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }

/* MARK: The message to the group */

.bubble {
  margin: 18px 0 0 34px; padding: 14px 16px; border-radius: 20px 20px 6px 20px; background: var(--bubble);
  color: #14302A; font-size: 15.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere;
}
.bubble .link { display: block; margin-top: 2px; color: #1F5C43; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; word-break: break-all; white-space: normal; }
.bubble-edit {
  display: block; width: calc(100% - 34px); margin: 18px 0 0 34px; padding: 14px 16px; resize: none; overflow: hidden;
  border: 1.5px solid var(--green); border-radius: 20px 20px 6px 20px; background: var(--bubble);
  color: #14302A; font: inherit; font-size: 15.5px; line-height: 1.45; box-shadow: 0 0 0 3px rgba(41, 97, 71, 0.14);
}
.bubble-edit:focus { outline: none; }
.msg-actions { display: flex; justify-content: flex-end; gap: 16px; margin-top: 4px; }

/* MARK: Sheets */

.sheet {
  position: fixed; inset: auto 0 0 0; width: 100%; max-width: 460px; max-height: 92dvh; margin: 0 auto; padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
  border: 0; border-radius: 30px 30px 0 0; background: var(--raised); color: var(--ink);
  box-shadow: 0 -12px 40px rgba(14, 41, 35, 0.18); overflow-y: auto;
}
.sheet[open] { animation: sheet-in 320ms var(--ease); }
.sheet::backdrop { background: rgba(14, 41, 35, 0.34); animation: fade 240ms ease; }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.grab { width: 40px; height: 5px; margin: 0 auto 14px; border-radius: 3px; background: rgba(14, 41, 35, 0.18); }
.sheet h2.title { font-family: var(--serif); font-size: 24px; font-weight: 500; letter-spacing: -0.2px; }
.sheet .lede { font-size: 14px; margin-top: 4px; }
.sheet .btn { margin-top: 20px; }
.sheet .ghost { margin-top: 12px; }
.sheet-fields { margin-top: 18px; }

.pair-prompt { margin: 20px 0 10px; font-size: 16px; font-weight: 600; }
.pair-names { display: flex; flex-wrap: wrap; gap: 10px; }
.pairbtn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 15px 0 6px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, opacity 160ms ease;
}
.pairbtn .av { width: 32px; height: 32px; font-size: 14px; }
.pairbtn[aria-pressed="true"] { border-color: #B9784B; background: var(--peach-soft); color: var(--peach-ink); }
.pairbtn:disabled { opacity: 0.35; cursor: default; }
.pairs:empty { display: none; }
.row.added { animation: rise 320ms var(--ease) backwards; }

/* MARK: Which one is you */

.names { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.namebtn {
  display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 8px 12px; border-radius: 18px;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font-size: 16px; font-weight: 600; text-align: left; cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms var(--ease);
}
.namebtn:active { transform: scale(0.98); }
.namebtn .av { width: 32px; height: 32px; font-size: 15px; }
.namebtn .check { color: var(--green); }
.namebtn[aria-pressed="true"] { border-color: var(--green); background: #EEF4EA; box-shadow: 0 0 0 3px rgba(41, 97, 71, 0.12); }
.namebtn.taken { border-style: dashed; background: transparent; color: var(--faint); }
.namebtn.taken .av { opacity: 0.6; }
.namebtn .status { margin-top: 0; }

/* MARK: Already joined: the code */

.code { position: relative; margin-top: 22px; display: flex; gap: 10px; align-items: center; justify-content: center; }
.code .box {
  width: 58px; height: 68px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 32px; font-weight: 600;
}
.code .box.cur { border-color: var(--green); box-shadow: 0 0 0 3px rgba(41, 97, 71, 0.14); }
.code .dash { color: #9AA095; font-size: 24px; }
.code input {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0;
  font-size: 16px; text-transform: uppercase; cursor: text;
}

/* MARK: Wishlists */

.wl { display: flex; gap: 12px; align-items: flex-start; padding: 14px 14px 14px 16px; border-top: 1px solid var(--hair); }
.wl:first-child { border-top: 0; }
.wl .ic { width: 34px; height: 34px; border-radius: 11px; }
.wl p { margin: 0; }
.wl .k { font-size: 13px; color: var(--muted); }
.wl .v { margin-top: 2px; font-size: 16px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; white-space: pre-line; }
.wl .sub { margin-top: 2px; font-size: 13px; color: var(--muted); white-space: pre-line; }
.mono { font-family: var(--serif); letter-spacing: 1px; }

.more-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.more-label { margin: 20px 0 10px; font-size: 15px; font-weight: 600; color: var(--text-2); }

/* MARK: Start and landing */

.steps { margin: 22px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps .n {
  flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--mint-soft); color: #1F4A36;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700;
}
.steps .small { margin-top: 2px; font-size: 14px; }
.faq { margin-top: 12px; }
.faq details { border-bottom: 1px solid var(--hair); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 12px 0;
  list-style: none; cursor: pointer; font-size: 16px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { color: var(--muted); transition: transform 200ms var(--ease); }
.faq details[open] summary .i { transform: rotate(90deg); }
.faq p { margin: 0 0 16px; font-size: 15px; line-height: 1.5; color: var(--text-3); }

.app { display: flex; gap: 14px; align-items: center; }
.appicon { flex: none; width: 56px; height: 56px; border-radius: 14px; }
.app-card { margin-top: 28px; padding: 18px; }
.app-card .btn { margin-top: 16px; }
.app-title { margin: 0; font-size: 16px; font-weight: 600; }
.app-body { margin: 3px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.app-link { margin: 12px 0 0; text-align: center; font-size: 14px; }
.footer { padding: 26px 20px 30px; text-align: center; font-size: 13px; color: var(--muted); }

.storage-warning { margin: 0; padding: 10px 20px; background: var(--gold-soft); color: #4A3412; font-size: 14px; text-align: center; }
.loading { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 60dvh; }
.dots { display: inline-flex; gap: 8px; }
.dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--green); animation: dot 1.1s ease-in-out infinite; }
.dots span:nth-child(2) { animation-delay: 0.15s; }
.dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 100% { opacity: 0.25; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1); } }

/* MARK: Landing pages on a computer
 *
 * The landing pages (/secret-santa, /wichteln, /amigo-secreto) share the
 * site's header and footer (site.css). From 900px their blocks form a grid:
 * title and Start beside the drawing, the steps as three cards, the questions
 * beside the app. The draw screens never get this layout.
 */

@media (min-width: 900px) {
  body.landing-page { background: radial-gradient(900px 560px at 100% 0%, rgba(214, 227, 209, 0.75), rgba(214, 227, 209, 0) 70%) no-repeat, var(--cream); }
  .landing-page .page { max-width: 1184px; min-height: 0; padding: 0 32px; }

  /* The drawing spans the two right columns (128 + 32 + 360 = 520px); the app card takes the last one. */
  .landing {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 128px 360px;
    grid-template-areas:
      "intro     stage     stage"
      "start     stage     stage"
      "steps     steps     steps"
      "questions questions app";
    column-gap: 32px;
    padding-top: 40px;
  }
  .landing .content { padding: 0; }

  .landing .stage { grid-area: stage; align-self: center; margin: 0; border-radius: 32px; }
  .landing .intro { grid-area: intro; align-self: end; margin: 0; padding-inline-end: 16px; }
  .landing h1 { font-size: 56px; line-height: 1.06; letter-spacing: -0.8px; }
  .landing .lede { max-width: 520px; margin-top: 16px; font-size: 19px; }
  .landing .start { grid-area: start; align-self: start; display: flex; align-items: center; gap: 18px; margin-top: 28px; }
  .landing .start .btn { flex: none; width: auto; padding: 0 28px; }
  .landing .start .small { max-width: 240px; margin: 0; text-align: start; }

  .landing .steps-wrap { grid-area: steps; margin-top: 56px; }
  .landing .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; }
  .landing .steps li { padding: 20px; border-radius: 22px; background: var(--paper); border: 1px solid rgba(255, 255, 255, 0.9); box-shadow: var(--shadow-card); }

  .landing .questions { grid-area: questions; margin-top: 56px; }
  .landing .questions h2 { font-family: var(--serif); font-size: 29px; font-weight: 500; letter-spacing: -0.3px; }
  .landing .app-wrap { grid-area: app; margin-top: 56px; }
  .landing .app-card { margin-top: 44px; }
}

/* MARK: Screen entrance: one short rise, nothing more */

.screen-in > * { animation: rise 420ms var(--ease) backwards; }
.screen-in > *:nth-child(2) { animation-delay: 40ms; }
.screen-in > *:nth-child(3) { animation-delay: 80ms; }
.screen-in > *:nth-child(n+4) { animation-delay: 120ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* MARK: Drawings */

.art .ink { stroke: #3B3631; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.art .thin { stroke: #3B3631; stroke-width: 1.4; stroke-linecap: round; fill: none; }
.art .hatch { stroke: #3B3631; stroke-width: 1.2; stroke-linecap: round; fill: none; opacity: 0.7; }
.art .spark { stroke: #6F665C; stroke-width: 1.5; stroke-linecap: round; fill: none; }
.art text { font-family: var(--serif); fill: var(--ink); }
.art .fb { transform-box: fill-box; transform-origin: center; }
.art .b1 { animation: bob 5.6s ease-in-out infinite; }
.art .b2 { animation: bob 6.4s ease-in-out -1.6s infinite; }
.art .b3 { animation: bob 7.2s ease-in-out -3s infinite; }
@keyframes bob { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -5px; rotate: -2deg; } }
.art .tw { animation: tw 3s ease-in-out infinite; }
.art .tw2 { animation: tw 3s ease-in-out -1s infinite; }
.art .tw3 { animation: tw 3s ease-in-out -2s infinite; }
@keyframes tw { 0%, 100% { opacity: 0.35; scale: 0.7; } 50% { opacity: 1; scale: 1; } }
.art .bulb { animation: bulb 2.4s ease-in-out infinite; }
.art .bl1 { animation-delay: -0.8s; }
.art .bl2 { animation-delay: -1.6s; }
@keyframes bulb { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
.art .drop { animation: drop 4.2s cubic-bezier(0.45, 0, 0.4, 1) infinite; }
.art .drop2 { animation-delay: -1.4s; }
@keyframes drop {
  0% { opacity: 0; translate: 0 -40px; rotate: -12deg; }
  14% { opacity: 1; }
  40% { translate: 0 0; rotate: 0deg; }
  78% { opacity: 1; translate: 0 64px; rotate: 4deg; }
  90%, 100% { opacity: 0; translate: 0 70px; rotate: 4deg; }
}
.art .trail { animation: trail 4.2s ease-in-out infinite; }
@keyframes trail { 0%, 30% { opacity: 1; } 45%, 100% { opacity: 0; } }
.art .jiggle { transform-origin: 50% 100%; animation: jiggle 4.2s ease-in-out infinite; }
@keyframes jiggle { 0%, 46%, 70%, 100% { rotate: 0deg; } 52% { rotate: -2.5deg; } 58% { rotate: 2deg; } 64% { rotate: -1deg; } }
.art .tilt { transform-origin: 20% 90%; animation: tilt 5s cubic-bezier(0.4, 0, 0.3, 1) infinite; }
@keyframes tilt { 0%, 100% { rotate: 0deg; } 30%, 70% { rotate: -24deg; } }
.art .fly1, .art .fly2, .art .fly3 { animation-duration: 5s; animation-timing-function: cubic-bezier(0.3, 0, 0.3, 1); animation-iteration-count: infinite; animation-fill-mode: both; }
.art .fly1 { animation-name: fly1; }
.art .fly2 { animation-name: fly2; animation-delay: 0.15s; }
.art .fly3 { animation-name: fly3; animation-delay: 0.3s; }
@keyframes fly1 { 0%, 24% { opacity: 0; translate: -150px 40px; scale: 0.4; } 46%, 84% { opacity: 1; translate: 0 0; scale: 1; } 96%, 100% { opacity: 0; translate: 0 0; } }
@keyframes fly2 { 0%, 24% { opacity: 0; translate: -90px 70px; scale: 0.4; } 46%, 84% { opacity: 1; translate: 0 0; scale: 1; } 96%, 100% { opacity: 0; translate: 0 0; } }
@keyframes fly3 { 0%, 24% { opacity: 0; translate: -40px 110px; scale: 0.4; } 46%, 84% { opacity: 1; translate: 0 0; scale: 1; } 96%, 100% { opacity: 0; translate: 0 0; } }
.art .pop { animation: pop 3.6s cubic-bezier(0.3, 1.4, 0.5, 1) infinite; }
.art .pop2 { animation-delay: -1.2s; }
.art .pop3 { animation-delay: -2.4s; }
@keyframes pop { 0%, 10% { scale: 0; opacity: 0; } 22%, 86% { scale: 1; opacity: 1; } 96%, 100% { scale: 0; opacity: 0; } }
.art .march { stroke-dasharray: 2 6; animation: march 1.4s linear infinite; }
@keyframes march { to { stroke-dashoffset: -16; } }
.art .pulse { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { scale: 1; } 50% { scale: 1.07; } }
.art .swing { transform-origin: 0% 50%; animation: swing 4s ease-in-out infinite; }
@keyframes swing { 0%, 100% { rotate: 0deg; } 50% { rotate: 8deg; } }
.art .wig { transform-origin: 50% 90%; animation: wig 4s ease-in-out 1s infinite; }
@keyframes wig { 0%, 70%, 100% { rotate: 0deg; } 74% { rotate: -2.5deg; } 78% { rotate: 2deg; } 82% { rotate: -1deg; } 86% { rotate: 0deg; } }
.art .write { stroke-dasharray: 120; animation: write 4.4s ease-in-out infinite; }
@keyframes write { 0% { stroke-dashoffset: 120; } 55%, 85% { stroke-dashoffset: 0; opacity: 1; } 95%, 100% { stroke-dashoffset: 0; opacity: 0; } }
.art .pen { animation: pen 4.4s ease-in-out infinite; }
@keyframes pen { 0% { translate: 0 0; } 55%, 85% { translate: 104px 0; } 100% { translate: 0 0; } }
.art .rise { animation: card-rise 900ms cubic-bezier(0.2, 1.2, 0.4, 1) 500ms both; }
@keyframes card-rise { from { translate: 0 60px; opacity: 0; } to { translate: 0 0; opacity: 1; } }
.art .flap { transform-box: fill-box; transform-origin: 50% 100%; animation: flap 700ms cubic-bezier(0.3, 1.25, 0.4, 1) 150ms both; }
@keyframes flap { from { scale: 1 -1; } to { scale: 1 1; } }
.art .confetti { animation: confetti 3.4s ease-in-out infinite; }
@keyframes confetti { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 6px; rotate: 25deg; } }

/* MARK: Reduced motion: the drawings hold their resting frame */

@media (prefers-reduced-motion: reduce) {
  .art *, .screen-in > *, .row.flash, .row.added, .sheet[open], .sheet::backdrop, .dots span { animation: none !important; }
  .btn, .ghost, .namebtn { transition: none !important; transform: none !important; }
}
