@font-face { font-family: "Instrument Serif"; src: url(/fonts/serif.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Instrument Serif"; font-style: italic; src: url(/fonts/serif-italic.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Inter; font-weight: 400 600; src: url(/fonts/inter.woff2) format("woff2"); font-display: swap; }

/* The page around the package. art.css draws the table, the package, the boxes and the things.
   Text sits on the table, so its colours follow the light: --fg on the table, --ink on paper sheets. */
:root {
  --fg: #faf3e6; --fg-muted: #dccbb0; --fg-faint: rgba(250, 243, 230, .16);
  --sheet: #f7f0e3; --sheet-2: #ede3d0; --ink: #2b211b; --ink-muted: #6e5f52; --line: #dccdb4;
  --berry: #b0353f; --berry-ink: #fbf3e6; --danger: #ffb4a6; --danger-ink: #a8323e;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 18px; --ease: cubic-bezier(.16, 1, .3, 1);
  --gap: clamp(36px, 6vw, 56px);
  --side: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
  --shadow: 0 18px 40px -18px rgba(40, 20, 8, .55);
  --btn-fill: rgba(42, 31, 26, .55);
  --halo: rgba(34, 23, 16, .9);
}
body:not(.night) { --fg: #2b211b; --fg-muted: #5e4f43; --fg-faint: rgba(43, 33, 27, .14); --danger: #a8323e; --btn-fill: rgba(250, 244, 234, .72); --halo: rgba(244, 235, 220, .95); }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; color: var(--fg); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; background: #2a1f1a; -webkit-tap-highlight-color: transparent; }
body.staged { overflow: hidden; }
main { position: relative; z-index: 1; width: min(100%, 680px); margin: 0 auto; padding: max(10px, env(safe-area-inset-top)) var(--side) 40px; }
main.calendar { width: min(100%, 980px); }
main.home { width: min(100%, 1160px); }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 5.4vw + 20px, 74px); line-height: 1.02; }
h2 { font-size: clamp(28px, 2vw + 20px, 38px); line-height: 1.08; }
h3 { font-size: 24px; line-height: 1.15; margin-top: 22px; }
p { margin: 0; }
p.lede { color: var(--fg-muted); font-size: clamp(17px, .4vw + 15.5px, 20px); margin: 14px 0 22px; text-wrap: pretty; }
p.lede b { color: var(--fg); font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.center { text-align: center; }
.muted { color: var(--fg-muted); }
.small { font-size: 13.5px; line-height: 1.45; }
.section { margin-top: var(--gap); }
.err { color: var(--danger); font-size: 14px; margin-top: 10px; }
.err:empty { display: none; }

/* Header: brand on the left; on wide screens three links; the primary action; the sound toggle. Not sticky:
   the page is short and the package is what people look at. */
.topbar { display: flex; align-items: center; gap: 8px; margin-bottom: clamp(6px, 2vw, 18px); }
.brand { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; margin-right: auto; font: 400 27px/1 var(--hand, var(--serif)); color: var(--fg); text-decoration: none; white-space: nowrap; }
.topnav { display: none; gap: 2px; }
.topnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; color: var(--fg); font: 500 15px/1 var(--sans); text-decoration: none; }
@media (hover: hover) { .topnav a:hover { background: var(--fg-faint); } }
@media (min-width: 720px) { .topnav { display: flex; } }
.btn.topcta { width: auto; min-height: 44px; padding: 10px 18px; font-size: 15px; white-space: nowrap; }
.tool > span { display: grid; place-items: center; }
.tool .i-off, .tool[aria-pressed="false"] .i-on { display: none; }
.tool[aria-pressed="false"] .i-off { display: grid; }
@media (max-width: 359px) {
  .topbar { gap: 6px; }
  .brand { font-size: 22px; gap: 7px; }
  .btn.topcta { padding: 10px 13px; font-size: 14px; }
}
.brand i { width: 15px; height: 15px; border-radius: 3px; background: linear-gradient(#f2d38a, #f2d38a) center / 3px 100% no-repeat, linear-gradient(#f2d38a, #f2d38a) center / 100% 3px no-repeat, var(--berry); box-shadow: 0 0 14px rgba(242, 211, 138, .45); }
.tools { display: flex; align-items: center; gap: 8px; }
.tool { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--fg-faint); background: var(--btn-fill); color: var(--fg-muted); cursor: pointer; touch-action: manipulation; transition: background-color .15s, color .15s; }
.tool[aria-pressed="true"] { color: var(--fg); background: var(--fg-faint); }
.tool:active { transform: scale(.94); }

/* Fields and buttons */
label { display: block; font-size: 13px; font-weight: 600; color: var(--fg-muted); margin: 0 0 8px; letter-spacing: .02em; }
input, textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus { border-color: var(--berry); box-shadow: 0 0 0 3px rgba(176, 53, 63, .18); }
input:focus-visible, textarea:focus-visible { outline: none; }                /* the ring above is the focus mark */
input::placeholder, textarea::placeholder { color: #9b8a7a; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 14px 20px; border: 0; border-radius: 999px;
  font: 600 17px/1.15 var(--sans); text-align: center; cursor: pointer; text-decoration: none; touch-action: manipulation; transition: transform .1s var(--ease), background-color .15s, border-color .15s; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn.gold { background: var(--berry); color: var(--berry-ink); box-shadow: 0 10px 26px -12px rgba(120, 25, 35, .8); }
.btn.ghost { background: var(--btn-fill); color: var(--fg); border: 1.5px solid var(--fg-faint); }   /* filled a little, so table props never show through the words */
.btn:disabled { opacity: .55; cursor: default; }
@media (hover: hover) {
  .btn.gold:hover:not(:disabled) { background: #c03e48; }
  .btn.ghost:hover:not(:disabled) { border-color: var(--fg-muted); }
}
.link { background: none; border: 0; padding: 12px 4px; font: inherit; color: inherit; opacity: .85; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.row > .btn { flex: 0 0 auto; width: auto; padding: 14px 22px; }
.stack > * + * { margin-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--fg-faint); background: var(--btn-fill); color: var(--fg); font: 500 15px/1.2 var(--sans); cursor: pointer; touch-action: manipulation; }
.chip[aria-pressed="true"] { background: var(--fg); color: #2b211b; border-color: var(--fg); }
body:not(.night) .chip[aria-pressed="true"] { color: var(--sheet); }

/* The calendar page */
.pkg { margin: 4px auto 0; }
.status { text-align: center; margin: 16px auto 18px; max-width: 34em; }
.gift-from { display: block; font-style: italic; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 520px; margin: 0 auto; }
.coderow { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 10px; margin: 14px 0 0; }
.code { font: 600 22px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .12em; white-space: nowrap; }
.extras { display: grid; gap: 22px; max-width: 640px; margin-inline: auto; }
.extra { display: grid; gap: 12px; }
.extra b { font-weight: 600; }
.extra .muted { margin-top: 2px; }
@media (min-width: 600px) { .extra { grid-template-columns: 1fr auto; align-items: center; } .extra .btn { width: auto; padding-inline: 24px; } }
.surprise, .finish, .paid { max-width: 640px; margin: 0 auto 16px; padding: 16px 18px; border-radius: var(--r); background: var(--sheet); color: var(--ink); box-shadow: var(--shadow); }
.surprise .muted, .finish .muted, .paid .muted { color: var(--ink-muted); }
.surprise .actions { margin-top: 12px; }
.surprise .btn.ghost, .finish .btn.ghost { color: var(--ink); border-color: var(--line); }
.finish .btn { margin-top: 12px; }
.own { max-width: 640px; margin-inline: auto; }

/* Calendar boxes: try one on */
.packs-pick { max-width: 720px; margin-inline: auto; }
.packs-pick > p { margin: 6px 0 14px; }
.pack-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pack-tile { display: grid; gap: 4px; justify-items: start; text-align: left; min-height: 44px; padding: 10px; border-radius: 16px; border: 1.5px solid var(--fg-faint); background: var(--btn-fill); color: var(--fg); font: inherit; cursor: pointer; touch-action: manipulation; }
.pack-tile[aria-checked="true"] { border-color: var(--fg); background: var(--fg-faint); }
.pack-tile b { font-weight: 600; font-size: 15px; }
.pack-swatch { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(60, 30, 10, .1); }
.pk-kraft { background: repeating-linear-gradient(90deg, rgba(90, 60, 30, .08) 0 2px, transparent 2px 7px), #c49a68; }
.pk-cream { background: linear-gradient(90deg, transparent 46%, #c9a14d 46% 54%, transparent 54%), #f3ead8; }
.pk-candy { background: repeating-linear-gradient(135deg, #c23d4b 0 12px, #f6efe2 12px 24px); }
.pk-velvet { background: radial-gradient(120% 90% at 30% 20%, #2f6b4f, #163a2b); }
.pk-midnight { background: radial-gradient(circle at 20% 30%, #f2d38a 1.5px, transparent 2px) 0 0 / 22px 22px, radial-gradient(circle at 70% 60%, #f6efe2 1px, transparent 1.5px) 0 0 / 30px 30px, #1d2547; }
.pk-gold { background: linear-gradient(120deg, #a87a26, #f2d38a 45%, #b8862f 60%, #f6dea0); }
.pack-buy { margin-top: 14px; display: grid; gap: 10px; }
.paynote { margin-top: 8px; text-align: center; }
.paynote a { color: inherit; }

/* Home */
.home .split { display: grid; gap: 28px; }
/* Table props may sit behind the headline: a soft patch of table colour keeps every letter clear. */
.home h1 { position: relative; margin-top: 6px; text-shadow: 0 0 4px var(--halo); }
.home h1::before { content: ""; position: absolute; inset: -14px -12px;   /* within the page padding, so no sideways scroll */ z-index: -1; background: radial-gradient(closest-side, var(--halo) 62%, transparent); pointer-events: none; }
.home .try { text-align: center; font: 400 24px/1.2 var(--hand, var(--serif)); color: var(--fg-muted); margin: 0 0 6px; }
.home #make { margin-top: 4px; }
@media (min-width: 960px) {
  .home .split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; gap: 48px; }
  .home .lead { position: sticky; top: 24px; padding-top: 24px; }
}
.about { display: none; position: relative; z-index: 1; width: min(100%, 720px); margin: 0 auto; padding: 0 var(--side) 24px; }
body.at-home .about { display: block; }
.about h2 { margin: var(--gap) 0 14px; }
.steps { margin: 0; padding-left: 1.4em; display: grid; gap: 12px; color: var(--fg-muted); }
.steps b { color: var(--fg); font-weight: 600; }
.steps li::marker { font: 400 1.3em var(--hand, var(--serif)); color: var(--fg); }
.faq details { border-top: 1px solid var(--fg-faint); }
.faq details:last-child { border-bottom: 1px solid var(--fg-faint); }
.faq summary { min-height: 52px; display: flex; align-items: center; cursor: pointer; font-weight: 600; list-style: none; padding: 10px 0; }
.faq summary::after { content: "+"; margin-left: auto; font: 400 26px/1 var(--serif); padding-left: 12px; }
.faq details[open] summary::after { content: "\2013"; }
.faq summary::-webkit-details-marker { display: none; }
.faq p { color: var(--fg-muted); padding: 0 0 16px; }
.faq a, .about .more a { color: var(--fg); text-underline-offset: 3px; }
.about .more { margin-top: 22px; }
/* The home page's reading sections under the app: plain text, a short list, the guides, and a
   comparison table that turns into one block per row on phones, so nothing scrolls sideways. */
.about .say { color: var(--fg-muted); margin: 0 0 14px; text-wrap: pretty; }
.about .say.after { margin-top: 16px; }
.about .say b, .about .packlist b { color: var(--fg); font-weight: 600; }
.about .say a, .about .compare a, .about .guides a { color: var(--fg); text-underline-offset: 3px; }
.about .packlist { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; color: var(--fg-muted); }
.about .compare { width: 100%; border-collapse: collapse; margin: 0 0 14px; font-size: 15px; line-height: 1.45; color: var(--fg-muted); }
.about .compare th, .about .compare td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-top: 1px solid var(--fg-faint); overflow-wrap: break-word; }
.about .compare th { color: var(--fg); font-weight: 600; }
.about .compare thead th { border-top: 0; }
@media (max-width: 640px) {
  .about .compare, .about .compare tbody, .about .compare tr, .about .compare th, .about .compare td { display: block; }
  .about .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .about .compare tr { padding: 12px 0; border-top: 1px solid var(--fg-faint); }
  .about .compare th, .about .compare td { border: 0; padding: 2px 0; }
  .about .compare tbody th { font-size: 16px; padding-bottom: 4px; }
  .about .compare td::before { content: attr(data-label) ": "; color: var(--fg); font-weight: 600; }
}
.about .guides { list-style: none; margin: 0; padding: 0; color: var(--fg-muted); }
.about .guides li { padding: 12px 0; border-top: 1px solid var(--fg-faint); }
.about .guides li:last-child { border-bottom: 1px solid var(--fg-faint); }
.about .guides a { font-weight: 600; }
/* Footer: the sister sites, then the small print. */
footer { position: relative; z-index: 1; width: min(100%, 720px); margin: 0 auto; padding: 24px var(--side) max(28px, env(safe-area-inset-bottom)); font-size: 13.5px; color: var(--fg-muted); }
footer a { color: inherit; }
.foot .sisters { border-top: 1px solid var(--fg-faint); padding-top: 18px; }
.foot h2 { font: 400 24px/1.1 var(--serif); color: var(--fg); margin: 0 0 8px; }
.foot ul { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; }
.foot ul a { color: var(--fg); font-weight: 600; text-underline-offset: 3px; }
.foot .legal, .foot .inspired { margin: 6px 0 0; }
footer .inspired { display: none; }
body.at-home footer .inspired { display: block; }

/* The guestbook on the home page: real notes on cards, newest first. */
.notes-sub { margin: -6px 0 16px; font-size: 15px; }
.notes-empty { padding: 18px; border: 1.5px dashed var(--fg-faint); border-radius: var(--r); color: var(--fg-muted); text-align: center; }
.notegrid { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.note { background: var(--sheet); color: var(--ink); border-radius: 6px 6px 16px 16px; padding: 16px 18px 4px; box-shadow: var(--shadow); rotate: -.5deg; }
.note:nth-child(2n) { rotate: .6deg; }
.note-text { font: 400 22px/1.3 var(--serif); overflow-wrap: anywhere; }
.note-by { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-top: 8px; font-size: 13.5px; color: var(--ink-muted); }
.note-by span:first-child { font: 700 18px/1.2 var(--hand, var(--serif)); color: var(--berry); }
.note-report { margin-left: auto; padding: 10px 2px; font-size: 13px; color: var(--ink-muted); }
.note-offer { max-width: 640px; margin-inline: auto; padding: 16px 18px; border-radius: var(--r); background: var(--sheet); color: var(--ink); box-shadow: var(--shadow); }
.note-offer label, .note-offer .letter-meta { color: var(--ink-muted); }
.note-offer label { margin-top: 12px; }
.note-offer .row { margin-top: 12px; align-items: center; }
.note-offer .btn.ghost { color: var(--ink); border-color: var(--line); }
.note-offer .link { flex: 0 0 auto; color: var(--ink); }
.note-offer a { color: var(--berry); }
.note-offer .err { color: var(--danger-ink); }
.note-form textarea { min-height: 96px; resize: vertical; }

/* The receipt of joy, for the friend who packed a box: it was opened, and here is what they said. */
.receipt { max-width: 640px; margin: 0 auto 16px; padding: 18px 18px 16px; border-radius: 6px 6px 18px 18px; background: var(--sheet); color: var(--ink); box-shadow: var(--shadow); text-align: center; }
.receipt-h { display: grid; justify-items: center; gap: 6px; font: 400 clamp(22px, 1.2vw + 18px, 27px)/1.2 var(--serif); text-wrap: balance; }
.receipt-h b { font-weight: 400; }
.receipt-heart { display: grid; color: var(--berry); }
.receipt-heart svg { width: 36px; height: 36px; animation: heart-pop .6s var(--ease) .2s backwards; }
.receipt-note { margin: 12px auto 0; max-width: 28em; font: 700 22px/1.35 var(--hand, var(--serif)); overflow-wrap: anywhere; }
.receipt-by { margin-top: 2px; font: italic 400 19px var(--serif); color: var(--ink-muted); }
.receipt .btn { margin-top: 14px; }
.receipt .btn.ghost { color: var(--ink); border-color: var(--line); }
@keyframes heart-pop { 0% { transform: scale(.3); } 60% { transform: scale(1.25); } 100% { transform: none; } }

/* The stage: opening and packing happen over a dimmed table */
.stage { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-columns: minmax(0, 1fr); place-items: start center; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.stage-veil { position: fixed; inset: 0; background: rgba(26, 17, 12, .88); opacity: 0; transition: opacity .3s var(--ease); }
.stage.in .stage-veil { opacity: 1; }
.stage.out .stage-veil { opacity: 0; transition-duration: .18s; }
.stage-panel { position: relative; width: min(100%, 560px); min-height: 100%; padding: max(12px, env(safe-area-inset-top)) var(--side) max(28px, env(safe-area-inset-bottom)); color: #faf3e6; }
.stage.out .stage-panel { opacity: 0; transition: opacity .18s; }
.stage-close { position: sticky; top: max(6px, env(safe-area-inset-top)); z-index: 3; float: right; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(247, 240, 227, .16); color: #faf3e6; cursor: pointer; }
.stage .muted { color: #dccbb0; }
.stage .link { color: #faf3e6; }

/* Opening: the box up top, then the letter and the things */
.open-stage { display: grid; justify-items: center; gap: 18px; padding-top: 44px; clear: both; }
.stage-box { width: min(52vw, 220px); transition: transform .5s var(--ease); }
.stage-box.size-m { width: min(78vw, 320px); }
.stage-box.size-l { width: min(64vw, 280px); }
.stage-box.size-xl { width: min(86vw, 380px); }
.stage-box.lifted { transform: scale(.82); }
.reveal { width: 100%; display: grid; gap: 16px; }
.letter-card { background: var(--sheet); color: var(--ink); border-radius: 6px 6px 18px 18px; padding: 22px 22px 18px; box-shadow: var(--shadow); }
.letter-day { font: 600 12px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px; }
.letter-text { font: 400 clamp(22px, 1.4vw + 17px, 27px)/1.3 var(--serif); white-space: pre-line; overflow-wrap: anywhere; }
.letter-from { font: 400 28px/1.2 var(--hand, var(--serif)); margin-top: 12px; color: var(--berry); }
.things { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; justify-items: center; }
.thing-slot { width: 100%; display: grid; place-items: center; }
.thing-slot[data-kind="video"], .thing-slot[data-kind="photo"], .thing-slot[data-kind="voice"], .thing-slot[data-kind="mixtape"] { grid-column: 1 / -1; }
.letter-actions { display: flex; justify-content: center; gap: 4px; }
.letter-actions button { min-height: 44px; padding: 10px 14px; border: 0; background: none; color: #dccbb0; font: 500 15px var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.song .btn { margin-top: 4px; }
.bonus-slot { grid-column: 1 / -1; width: 100%; display: grid; place-items: center; }

/* The thank-you, under an opened box: a heart and a short note for the friend who packed it. */
.thanks { padding: 14px 14px 12px; border-radius: var(--r); background: rgba(247, 240, 227, .08); border: 1px solid rgba(247, 240, 227, .16); }
.thanks-h { margin-bottom: 10px; font: 400 24px/1.15 var(--serif); }
.thanks-row { display: flex; gap: 10px; align-items: stretch; }
.heart { flex: none; display: grid; place-items: center; width: 54px; min-height: 54px; border-radius: 16px; border: 1.5px solid rgba(247, 240, 227, .3); background: transparent; color: #dccbb0; cursor: pointer; touch-action: manipulation; }
.heart[aria-pressed="true"] { background: var(--berry); border-color: var(--berry); color: #fbf3e6; }
.heart svg { width: 26px; height: 26px; }
.heart[aria-pressed="true"] svg { animation: heart-pop .45s var(--ease); }
.thanks textarea { flex: 1; min-width: 0; min-height: 54px; padding: 10px 12px; resize: none; font: 700 18px/1.35 var(--hand, var(--serif)); }
.thanks-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.thanks-left { flex: 1; color: #dccbb0; }
.thanks-foot .btn { width: auto; min-height: 44px; padding: 10px 22px; }
.stage .err { color: #ffb4a6; }

/* The share sheet: the link, the chat apps, a QR code, the story picture. */
.share-sheet { clear: both; display: grid; gap: 14px; padding-top: 44px; }
.share-sheet h2 { font-size: 34px; }
.share-sheet .btn.ghost { background: #efe5d4; color: var(--ink); border-color: transparent; }
.share-link { display: flex; gap: 8px; }
.share-link input { flex: 1; min-width: 0; padding: 12px 14px; font-size: 15px; }
.share-link .btn { flex: none; width: auto; min-height: 50px; padding: 12px 18px; }
.share-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.share-app { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 10px 12px; border-radius: 14px; border: 1.5px solid rgba(247, 240, 227, .2);
  background: #3a2b22; color: #faf3e6; font: 600 15px/1.2 var(--sans); text-decoration: none; touch-action: manipulation; }   /* solid: the page must not show through */
.share-app::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--dot, #f2d38a); }
.share-whatsapp { --dot: #5bbf7d; } .share-messenger { --dot: #9b8cf2; } .share-telegram { --dot: #62acdf; } .share-x { --dot: #e6ddd0; } .share-email { --dot: #f2d38a; }
@media (pointer: fine) { .share-messenger { display: none; } }   /* it opens the Messenger app; desktops have none */
.share-qr { display: grid; grid-template-columns: minmax(0, 150px) 1fr; gap: 14px; align-items: center; padding: 14px; border-radius: var(--r); background: var(--sheet); color: var(--ink); }
.share-qr .qr { width: 100%; aspect-ratio: 1; }
.qr svg { display: block; width: 100%; height: 100%; border-radius: 6px; }
.share-qr p { display: grid; gap: 4px; }
.share-qr .muted { color: var(--ink-muted); }
.share-qr .code { font-size: 15px; }
.sharing .stage-panel { padding-bottom: max(36px, env(safe-area-inset-bottom)); }

/* The ceremony after paying: the open box, the extra, the lid and ribbon, the seal; then the box is carried away. */
.ceremony { clear: both; display: grid; justify-items: center; gap: 10px; padding-top: 52px; text-align: center; }
.cer-line { font: 700 28px/1.1 var(--hand, var(--serif)); color: #f2d38a; }
.cer-box { width: 100%; max-width: 440px; }
.cer-sub { min-height: 1.3em; font: 400 26px/1.25 var(--serif); color: #faf3e6; }
.cer-seal { position: absolute; z-index: 3; left: 72%; top: 66%; width: 44cqmin; aspect-ratio: 1; translate: -50% -50%; rotate: -10deg; pointer-events: none; }
.ot-l .cer-seal, .ot-xl .cer-seal { width: 32cqmin; }
.stage.in.carrying .stage-veil { opacity: 0; transition: opacity .55s var(--ease); }
.stage.carrying .cer-line, .stage.carrying .cer-sub, .stage.carrying .stage-close, .stage.carrying .ot-shadow { opacity: 0; transition: opacity .25s; }

/* The keepsake card. */
.keepsake { clear: both; display: grid; justify-items: center; gap: 12px; padding-top: 48px; text-align: center; }
.keepsake h2 { font-size: 34px; }
.keep-card { display: grid; place-items: center; width: min(100%, 340px, calc(52dvh * .8)); aspect-ratio: 1080 / 1350; border-radius: 14px; overflow: hidden;
  background: rgba(247, 240, 227, .08); box-shadow: 0 24px 50px -20px rgba(10, 5, 2, .6); }
.keep-card img { display: block; width: 100%; height: 100%; }
.keep-card img[hidden] { display: none; }
.keep-line { max-width: 26em; font: 400 22px/1.3 var(--serif); text-wrap: balance; }
.keep-extra { font: italic 400 20px/1.3 var(--serif); color: #dccbb0; }
.keepsake .actions { width: 100%; }
.keepsake .actions .btn { padding-inline: 12px; font-size: 16px; }
.keepsake .btn.ghost, .delivery .btn.ghost { background: #efe5d4; color: var(--ink); border-color: transparent; }
.paid .keep-again { display: block; min-height: 44px; padding: 10px 0 0; color: var(--ink); }

/* A parcel on the table: a friend gave the calendar a new box. */
.delivery { clear: both; display: grid; justify-items: center; gap: 14px; padding-top: 52px; text-align: center; }
.dl-line { font: 700 30px/1.1 var(--hand, var(--serif)); color: #f2d38a; transition: opacity .3s; }
.dl-line.gone { opacity: 0; }
.dl-parcel { width: 100%; padding: 6px 0 10px; }
.dl-hint { font: 400 24px/1.2 var(--serif); }
/* The open flaps reach about 0.38 of the parcel's width past its edge: the words below start after them. */
.dl-after { display: grid; justify-items: center; gap: 12px; width: 100%; margin-top: calc(min(100vw - 32px, 380px) * .38 - 24px); }
.dl-after[hidden], .dl-hint[hidden], .delivery .link[hidden] { display: none; }

/* Packing: the open box up top, growing; the steps below on a paper sheet */
.packing { clear: both; padding-top: 4px; }
/* The box stays in view while the sheet below scrolls, so every thing that goes in is seen landing. */
.pack-top { position: sticky; top: 0; z-index: 2; margin: 0 calc(-1 * var(--side)); padding: max(6px, env(safe-area-inset-top)) var(--side) 24px;
  background: linear-gradient(rgba(30, 20, 14, .97) 82%, rgba(30, 20, 14, 0)); }
.pack-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0 52px 4px 0; min-height: 44px; }
.pack-door { font: 400 24px/1.1 var(--hand, var(--serif)); color: #faf3e6; }
.size-chip { padding: 6px 12px; border-radius: 999px; background: #f2d38a; color: #3a2a06; font: 600 14px/1.2 var(--sans); white-space: nowrap; }
.pack-box { display: grid; place-items: center; margin: 0 auto; width: min(100%, 420px, calc(40vh - 40px)); min-width: 180px; }
.pack-step { background: var(--sheet); color: var(--ink); border-radius: 22px; padding: 20px 18px 22px; box-shadow: var(--shadow); }
.pack-step .muted { color: var(--ink-muted); }
.pack-step .link { color: var(--ink); }
.pack-step label { color: var(--ink-muted); }
.pack-step h2 { font-size: 34px; margin-bottom: 10px; }
.pack-step .back { float: right; margin: -8px -4px 0 0; }
.pack-step .btn.ghost { color: var(--ink); border-color: var(--line); }
.pack-step .btn { margin-top: 18px; }
.pack-step .row .btn { margin-top: 10px; }
textarea.letter { min-height: 150px; resize: none; font: 400 22px/30px var(--serif); padding-top: 12px; background: #fffaf0 repeating-linear-gradient(transparent 0 29px, rgba(176, 140, 100, .2) 29px 30px); background-attachment: local; }
.letter-meta { font-size: 13px; color: var(--ink-muted); text-align: right; margin: 6px 2px 10px; font-variant-numeric: tabular-nums; }
.ideas { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 2px 18px 6px; overscroll-behavior-x: contain; }
.ideas::-webkit-scrollbar { display: none; }
.ideas .muted { flex: none; margin-right: 2px; }
.ideas .chip { flex: none; }
.pack-step .chip { color: var(--ink); border-color: var(--line); background: #fffaf0; font-size: 14px; min-height: 40px; padding: 8px 12px; }
.tray { display: grid; grid-auto-flow: column; grid-auto-columns: 92px; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; margin: 8px -18px 0; padding: 4px 18px 10px; scrollbar-width: none; }
.tray::-webkit-scrollbar { display: none; }
.tile { scroll-snap-align: start; display: grid; justify-items: center; align-content: start; gap: 4px; min-height: 112px; padding: 10px 6px; border-radius: 16px; border: 1.5px solid var(--line); background: #fffaf0; color: var(--ink); font: inherit; cursor: pointer; touch-action: manipulation; transition: transform .12s var(--ease), border-color .15s; }
.tile > :first-child { width: 48px; height: 48px; }
.tile b { font-size: 13px; font-weight: 600; line-height: 1.2; text-align: center; }
.tile span { font-size: 11.5px; color: var(--ink-muted); }
.tile:active:not(:disabled) { transform: scale(.94); }
.tile:disabled { opacity: .38; cursor: default; }
.inside { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.inside:empty { display: none; }
.in-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 8px; border-radius: 999px; background: var(--sheet-2); font-size: 14px; }
.in-chip > :first-child { width: 26px; height: 26px; }
.in-x { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-muted); cursor: pointer; }
.in-x svg { width: 16px; height: 16px; }
.capture:empty { display: none; }
.cap-card { margin-top: 12px; padding: 14px; border-radius: 18px; background: var(--sheet-2); display: grid; gap: 10px; justify-items: center; text-align: center; }
.cap-card > label:not(.pickfile) { justify-self: stretch; text-align: left; }
.cap-card .row { width: 100%; }
.cap-card audio { width: 100%; }
.rec-view { position: relative; width: min(100%, 300px); aspect-ratio: 3 / 4; border-radius: 20px; overflow: hidden; background: #1e1613; }
.rec-live { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 20px; background: #1e1613; }
.review .rec-live { aspect-ratio: 3 / 4; width: min(100%, 300px); height: auto; }
.rec-live.mirror { transform: scaleX(-1); }
.rec-ring { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); pointer-events: none; opacity: 0; }
.rec.live .rec-ring { opacity: 1; }
.rec-ring circle { fill: none; stroke: #f2d38a; stroke-width: 2; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .2s linear; vector-effect: non-scaling-stroke; }
.rec-meter { display: flex; align-items: center; gap: 3px; height: 56px; }
.rec-meter i { width: 5px; height: 100%; border-radius: 3px; background: var(--berry); transform: scaleY(.12); transition: transform .08s linear; }
.rec-time { font: 600 15px/1.2 var(--sans); font-variant-numeric: tabular-nums; min-height: 18px; }
.rec-controls { display: flex; align-items: center; gap: 14px; }
.rec-btn { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; border: 4px solid var(--berry); background: #fffaf0; color: var(--berry); cursor: pointer; touch-action: manipulation; }
.rec-btn.on { background: var(--berry); color: #fffaf0; }
.rec-btn svg { width: 30px; height: 30px; }
.rec-controls .tool { color: var(--ink); border-color: var(--line); }
.pickfile { color: var(--ink); font-size: 14px; font-weight: 500; letter-spacing: 0; display: inline-flex; align-items: center; margin: 0; }
.rec-note { max-width: 28em; }
.papers { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 12px; }
.paper-pick, .size-pick { display: grid; justify-items: center; gap: 3px; padding: 10px 6px; border-radius: 16px; border: 1.5px solid var(--line); background: #fffaf0; cursor: pointer; text-align: center; touch-action: manipulation; }
.paper-pick[aria-checked="true"], .size-pick[aria-checked="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink) inset; }
.paper-pick b, .size-pick b { font-size: 14px; font-weight: 600; }
.paper-art { width: 64px; pointer-events: none; }
.bigger { margin-top: 16px; }
.sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 8px; margin-top: 8px; }
.size-pick { min-height: 60px; align-content: center; }
.check { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 15px; font-weight: 500; color: var(--ink); letter-spacing: 0; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--berry); }
.bill { list-style: none; padding: 0; margin: 16px 0 0; font-size: 15px; }
.bill li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.bill .sum { font-weight: 600; border-bottom: 0; }
.pack-step .paynote { color: var(--ink-muted); }
.pack-step .err { color: var(--danger-ink); }

/* Little messages */
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 90; transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  width: max-content; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 16px; background: #2b211b; color: #faf3e6; font-size: 15px; box-shadow: 0 10px 30px -10px rgba(20, 10, 4, .5); transition: opacity .2s, transform .3s var(--ease); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
.findcode { max-width: 520px; margin-inline: auto; }
.packnext { margin: -4px 0 22px; }
.packnext .btn { min-width: min(100%, 260px); }
/* Friends' calendars: whom to pack one back for. */
.circle-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.circle-list li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.circle-list .btn { flex: 1 1 220px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
