/* Story builder — the landing page's "Par Avion" airmail stationery (site/index.html), carried through every screen.
   Tokens (colours, type scale, easings, shadows, the airmail stripe, the grid) come from ../site/css/tokens.css and the
   self-hosted Gloock / Hanken Grotesk / La Belle Aurore from ../site/fonts/fonts.css — the SAME files the landing uses.
   This file only adds the builder's few semantic names on top of them. Mobile-first; the story preview keeps its own look. */
:root{
  --ok:var(--accent2);                 /* done / saved: airmail blue (the palette has no green) */
  --warn:var(--accent);                /* problems: wax red */
  --line-2:#8a93a5;                    /* a control's own edge: ≥ 3:1 on paper and blush */
  --tint-blue:#e4ebf6; --ink-blue:#1b4683;    /* "saved" / "free" notes */
  --tint-gold:#f6ecd3; --ink-gold:#5c4512;    /* gentle nudges */
  --tint-red:#f7dfe1;  --ink-red:#7d1b24;     /* warnings */
  --radius:6px; --gutter:16px; --bar-h:68px;
  /* the landing's pieces, as pictures (CSS only, decorative) */
  --seal-svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Cpath d='M40 3c6 0 8 4 13 5s10-1 13 4 1 9 4 13 7 7 6 13-5 7-5 12 3 10-1 14-9 2-13 5-6 8-12 8-8-4-13-6-10 1-13-4-1-9-4-13-6-6-6-12 5-7 5-12-3-10 1-14 9-1 13-4 6-9 12-9z' fill='%23a72530'/%3E%3Ccircle cx='40' cy='40' r='25' fill='none' stroke='%238f1d27' stroke-width='2.5'/%3E%3C/svg%3E");
  --stamp-svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 58 68'%3E%3Cpath d='M3 0h4a3 3 0 0 0 6 0h6a3 3 0 0 0 6 0h6a3 3 0 0 0 6 0h6a3 3 0 0 0 6 0h4v4a3 3 0 0 0 0 6v6a3 3 0 0 0 0 6v6a3 3 0 0 0 0 6v6a3 3 0 0 0 0 6v6a3 3 0 0 0 0 6v6h-4a3 3 0 0 0-6 0h-6a3 3 0 0 0-6 0h-6a3 3 0 0 0-6 0h-6a3 3 0 0 0-6 0H3v-6a3 3 0 0 0 0-6v-6a3 3 0 0 0 0-6v-6a3 3 0 0 0 0-6v-6a3 3 0 0 0 0-6v-6a3 3 0 0 0 0-6V0z' fill='%23fffdfd' stroke='%23c7cedb'/%3E%3Crect x='8' y='8' width='42' height='52' fill='%2321539c'/%3E%3Cpath d='M44 22 15 33l9 3 3 9 4-8 9 4z' fill='%23fffdfd'/%3E%3Cpath d='M24 36 44 22' stroke='%2321539c' stroke-width='1.4'/%3E%3Cpath d='M12 54c6-4 12 4 18 0s12 4 16 0' fill='none' stroke='%23deb866' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  --underline-svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M2 7 C 30 2, 70 2, 98 6' fill='none' stroke='%23a72530' stroke-width='5' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
}
*{margin:0;padding:0;box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;background:var(--bg)}
body{font-family:var(--f-text);font-size:1.0625rem;line-height:1.55;color:var(--ink);background:var(--bg);min-height:100vh;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
  padding-bottom:calc(var(--bar-h) + env(safe-area-inset-bottom));}
/* the faint grid paper of the landing's desk, fading out down the page */
body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background-image:var(--grid);background-size:28px 28px;background-position:center top;
  -webkit-mask-image:linear-gradient(to bottom,#000 0,rgba(0,0,0,.55) 340px,transparent 85%);mask-image:linear-gradient(to bottom,#000 0,rgba(0,0,0,.55) 340px,transparent 85%)}
img,video,iframe{display:block;max-width:100%}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;background:none;border:0;-webkit-tap-highlight-color:transparent}
a{color:var(--accent);text-underline-offset:.22em;text-decoration-thickness:1px}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
h1:focus,h1:focus-visible,main:focus{outline:none}
::selection{background:var(--highlight);color:var(--ink)}
h1,h2,h3{font-family:var(--f-display);font-weight:400;line-height:1.12;letter-spacing:-.01em;text-wrap:balance}
h1{font-size:clamp(2.25rem,1.85rem + 1.9vw,3.25rem);line-height:1.06;letter-spacing:-.02em}
/* the landing's hand-drawn red underline (Gloock has no italic: the emphasis is the stroke under it) */
h1 em,h2 em{font-style:normal;background:var(--underline-svg) left 100%/100% .2em no-repeat;padding-bottom:.1em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
h2{font-size:1.375rem;margin-bottom:.35rem}
h3{font-size:1.125rem}
p{max-width:62ch;text-wrap:pretty}
.sr-only{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
.skip-link{position:absolute;left:-999px;top:8px;z-index:100;background:var(--paper);color:var(--ink);padding:10px 14px;border-radius:var(--radius);box-shadow:var(--sh-2)}
.skip-link:focus{left:8px}
.small{font-size:var(--t-small);color:var(--muted)}
.muted{color:var(--muted)}
.block{display:block}
.hand{font-family:var(--f-hand);font-weight:400;font-synthesis:none;letter-spacing:0;color:var(--ink);font-size:1.5rem;line-height:1.1}
.lede{font-size:1.1875rem;line-height:1.45;color:var(--ink);margin-top:12px}
.opt{font-family:var(--f-text);font-size:.8125rem;font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-left:.4em;font-style:normal}
.warn{color:var(--warn)}
.ok{color:var(--ok)}
.loading{padding:48px 0;font-family:var(--f-hand);font-size:1.75rem;color:var(--muted)}

/* ---------- buttons: the landing's solid red primary, pill-shaped paper secondaries ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 22px;border-radius:var(--radius);
  font:500 1.0625rem/1.15 var(--f-text);text-align:center;text-decoration:none;border:1.5px solid transparent;white-space:nowrap;cursor:pointer;-webkit-tap-highlight-color:transparent;
  transition:transform 140ms var(--ease-out),background-color 150ms ease,border-color 150ms ease,color 150ms ease}
.btn:active{transform:scale(.97)}
.btn-sm{min-height:44px;padding:0 16px;font-size:1rem}
.btn-lg{min-height:56px;padding:0 30px;font-size:1.125rem}
.btn-rose{background:var(--accent);color:var(--on-accent)}
.btn-paper{background:var(--paper);border-color:var(--line-2);color:var(--ink);border-radius:999px}
.btn-ghost{color:var(--accent);background:var(--surface);border-radius:999px}
.btn.danger{color:var(--accent);border-color:rgba(167,37,48,.55)}
@media (hover:hover) and (pointer:fine){
  .btn-rose:hover{background:var(--accent-press)}
  .btn-paper:hover{border-color:var(--ink)}
  .btn-ghost:hover{background:#f1dcdc}
  .btn.danger:hover{border-color:var(--accent);background:var(--tint-red)}
}
.btn:disabled,.btn[disabled]{opacity:.45;cursor:not-allowed;transform:none}
.icon-btn{width:44px;height:44px;flex:0 0 auto;display:inline-grid;place-items:center;border-radius:50%;color:var(--muted);font-size:1.0625rem;transition:background-color 150ms ease,color 150ms ease}
.icon-btn:disabled{opacity:.3;cursor:default}
@media (hover:hover) and (pointer:fine){.icon-btn:hover:not(:disabled){background:var(--surface);color:var(--ink)}}
.linkish{display:inline-flex;align-items:center;min-height:44px;padding:0 4px;color:var(--accent);font:500 var(--t-small)/1.2 var(--f-text);
  text-decoration:underline;text-underline-offset:.25em;text-decoration-thickness:1px;cursor:pointer}
@media (hover:hover) and (pointer:fine){.linkish:hover{color:var(--accent-press);text-decoration-thickness:2px}}
/* a link sitting on a label's line keeps the line short; its tap area still reaches 44 px */
label .linkish,.p-head .linkish,.sources .linkish,.pilot-free .linkish{position:relative;min-height:28px}
label .linkish::after,.p-head .linkish::after,.sources .linkish::after,.pilot-free .linkish::after{content:"";position:absolute;inset:-8px -4px}
.row{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:16px}
.stack{display:grid;gap:10px;margin-top:16px}

/* ---------- top bar: the brand in Gloock, the steps, and an airmail edge ---------- */
.topbar{position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:8px;min-height:60px;padding:6px var(--gutter) 10px;
  background:rgba(252,245,245,.94);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.topbar::after{content:"";position:absolute;left:0;right:0;bottom:0;height:4px;background:var(--stripe);pointer-events:none}
.wordmark{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;min-width:44px;text-decoration:none;color:var(--ink);font-family:var(--f-hand);font-size:1.875rem;line-height:1;flex:0 0 auto}
.wm-text{padding-top:.2em}
.wm-mark{display:block;width:34px;height:34px;flex:0 0 34px}
.wm-text{display:none}
#steps{flex:1;min-width:0;overflow-x:auto;scrollbar-width:none}
#steps::-webkit-scrollbar{display:none}
@media (max-width:379px){#steps{-webkit-mask-image:linear-gradient(to right,transparent,#000 14px,#000 calc(100% - 14px),transparent);mask-image:linear-gradient(to right,transparent,#000 14px,#000 calc(100% - 14px),transparent)}}
.steps{display:flex;gap:2px;list-style:none;justify-content:center}
.steps a{display:flex;align-items:center;gap:6px;min-height:44px;padding:0 3px;border-radius:999px;text-decoration:none;color:var(--muted);font:500 .875rem/1 var(--f-text);white-space:nowrap;
  transition:background-color 160ms var(--ease-out),color 160ms var(--ease-out)}
.steps .n{width:26px;height:26px;flex:0 0 auto;border-radius:50%;display:grid;place-items:center;border:1.5px solid var(--line-2);font-size:.8125rem;font-variant-numeric:tabular-nums}
.steps .l{display:none}
.steps a.done .n{background:var(--accent2);border-color:var(--accent2);color:var(--paper)}
.steps a.current{color:var(--paper);background:var(--ink);padding:0 12px 0 5px}
.steps a.current .l{display:inline}
.steps a.current .n{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
@media (hover:hover) and (pointer:fine){.steps a:not(.current):hover{color:var(--ink)}}
@media (min-width:720px){.steps{gap:4px}.steps a{padding:0 8px 0 4px}}
/* narrow phones: six 44 px numbers and no label (the screen's own heading names the step); the current one is the
   red seal with a ring, done ones airmail blue */
@media (max-width:479px){
  .topbar{gap:4px;padding-left:12px;padding-right:12px}
  .steps{gap:0}
  .steps a,.steps a.current{min-width:44px;justify-content:center;padding:0;background:none;color:var(--ink)}
  .steps a.current .l{display:none}
  .steps a.current .n{box-shadow:0 0 0 2px var(--bg),0 0 0 3.5px var(--accent)}
}
.top-right{display:flex;align-items:center;gap:2px;flex:0 0 auto}
/* autosave status: "Saving…" (only when a write is slow), "Saved ✓" fading in after each save, "Not saved !" */
.saved{display:inline-flex;align-items:center;font:500 .8125rem/1.2 var(--f-text);color:var(--muted);white-space:nowrap;padding:2px 8px;border-radius:4px}
.saved:empty,.saved:not([data-state]){display:none}
.saved[data-state="ok"]{color:var(--ok)}
.saved[data-state="saving"]{color:var(--muted)}
.saved[data-state="err"]{color:var(--on-accent);background:var(--accent)}
.saved.flash{animation:saved-in .5s var(--ease-out)}
@keyframes saved-in{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}
/* phones: no room in the bar, so it hangs under the ⋯ like a small blue stamp on the airmail edge */
@media (max-width:719px){
  .top-right{position:relative}
  .saved{position:absolute;right:2px;top:calc(100% + 6px);z-index:41;background:var(--paper);border:1.5px solid currentColor;box-shadow:var(--sh-1);padding:1px 8px;transform:rotate(-3deg)}
  .saved[data-state="err"]{border-color:var(--accent)}
}
@media (min-width:720px){.wm-text{display:inline}.steps .l{display:inline}.saved{font-size:.875rem}}
body[data-screen="start"] .wm-text{display:inline}

/* ---------- layout ---------- */
.layout{max-width:1320px;margin:0 auto;padding:0 var(--gutter)}
main{min-width:0;padding:26px 0 48px;outline:none}
#side{display:none}
@media (min-width:1080px){
  :root{--gutter:32px}
  .layout{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:48px;align-items:start}
  body[data-screen="you"] #side,body[data-screen="chats"] #side,body[data-screen="pages"] #side,body[data-screen="edit"] #side{display:block}
  body:not([data-screen="you"]):not([data-screen="chats"]):not([data-screen="pages"]):not([data-screen="edit"]) .layout{grid-template-columns:minmax(0,1fr)}
  #side{position:sticky;top:84px;padding-top:26px;isolation:isolate}
  /* the landing's maker's table under the phone: a blush pool and the grid */
  #side::before{content:"";position:absolute;inset:40px calc(var(--gutter) * -1 + 4px) -10px -40px;z-index:-1;pointer-events:none;
    background:radial-gradient(closest-side,var(--surface) 58%,rgba(247,233,233,0)),var(--grid);background-size:auto,28px 28px;background-position:center;
    -webkit-mask-image:radial-gradient(closest-side,#000 60%,transparent);mask-image:radial-gradient(closest-side,#000 60%,transparent)}
  body[data-screen="checkout"] main,body[data-screen="done"] main,body[data-screen="preview"] main{max-width:800px;width:100%;margin:0 auto}
  .mobile-only{display:none!important}
}
.side-head{display:flex;justify-content:space-between;align-items:center;margin:0 6px 4px}
.side-head .hand{font-size:1.625rem;transform:rotate(-2deg);transform-origin:left}
.screen-head{margin:4px 0 22px}
/* the step kicker is a blue airmail cachet, like the landing envelope's "Sealed" stamp */
.screen-head .hand{display:inline-block;margin:0 0 14px;padding:3px 10px 2px;border:2px solid var(--accent2);border-radius:4px;background:rgba(247,233,233,.6);
  color:var(--accent2);font:500 .8125rem/1.35 var(--f-text);letter-spacing:.05em;transform:rotate(-2deg);transform-origin:left}
.screen-head.compact{margin-bottom:12px}
.screen-head h1 + .small{margin-top:12px}

/* ---------- cards & fields ---------- */
.card{background:var(--paper);border-radius:var(--radius);padding:20px;margin:0 0 18px;box-shadow:var(--sh-1)}
.card > h2:first-child,.card > summary:first-child h2{margin-top:-2px}
.card.error{box-shadow:var(--sh-1),inset 4px 0 0 var(--accent)}
.card.error > h1{font-size:var(--t-h3);margin-bottom:8px}
/* an airmail letter: the red/blue edge and a stamp (the "Who's it for?" card; the done card) */
.card.airmail{position:relative;border:8px solid transparent;border-image:var(--stripe) 8;border-radius:0;padding:22px 18px 18px;box-shadow:var(--sh-2)}
.card.airmail::after{content:"";position:absolute;right:12px;top:12px;width:46px;height:54px;background:var(--stamp-svg) center/contain no-repeat;transform:rotate(5deg);
  filter:drop-shadow(0 1px 1px rgba(19,31,53,.2));pointer-events:none}
.card.airmail > h2:first-child{padding-right:58px}
details.card > summary{cursor:pointer;list-style:none;display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;min-height:44px}
details.card > summary::-webkit-details-marker{display:none}
details.card > summary::before{content:"";width:9px;height:9px;flex:0 0 auto;border:solid var(--accent);border-width:0 2px 2px 0;transform:rotate(-45deg);transition:transform 160ms var(--ease-out);margin-right:2px}
details.card[open] > summary::before{transform:rotate(45deg)}
details.card > summary h2{margin:0;font-size:1.25rem}
.grid2{display:grid;gap:0 18px}
@media (min-width:560px){.grid2{grid-template-columns:1fr 1fr}}
.field{display:flex;flex-direction:column;gap:4px;margin:14px 0}
.field label,.p-label{font:500 .9375rem/1.3 var(--f-text);color:var(--muted);transition:color 160ms var(--ease-out)}
.field:focus-within > label{color:var(--accent2)}
.hint{font-size:.875rem;line-height:1.45;color:var(--muted)}
/* inputs: the dashed underline of the landing's "Who's it for?" card; solid airmail blue while you type */
input[type=text],input[type=url],input[type=number],input[type=date],input[type=datetime-local],input:not([type]),select{
  width:100%;min-height:48px;padding:8px 2px 6px;border:0;border-bottom:1.5px dashed var(--muted);border-radius:0;background:transparent;color:var(--ink);
  font:400 1.0625rem/1.35 var(--f-text);transition:border-color 150ms ease,background-color 150ms ease}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}
input::-webkit-calendar-picker-indicator{cursor:pointer;border-radius:4px}
input::-webkit-calendar-picker-indicator:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
input[type=text]:focus,input[type=url]:focus,input[type=number]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input:not([type]):focus,select:focus,
input[type=date]:focus-within,input[type=datetime-local]:focus-within{
  outline:none;border-bottom:2px solid var(--accent2);padding-bottom:5.5px;background:rgba(33,83,156,.05)}
select{-webkit-appearance:none;appearance:none;padding-right:28px;cursor:pointer;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23131f35' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 6px center/12px 8px no-repeat}
select:focus{background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2321539c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 6px center/12px 8px no-repeat,rgba(33,83,156,.05)}
textarea{width:100%;min-height:96px;padding:10px 12px;border:1.5px dashed var(--muted);border-radius:var(--radius);background:var(--paper);color:var(--ink);
  font:400 1.0625rem/1.5 var(--f-text);resize:vertical;transition:border-color 150ms ease,box-shadow 150ms ease}
textarea:focus{outline:none;border:1.5px solid var(--accent2);box-shadow:0 0 0 1px var(--accent2)}
input[aria-invalid="true"],textarea[aria-invalid="true"]{border-bottom-color:var(--accent)}
/* the two names, set in the display face like the landing prompt */
#giver-name,#receiver-name{font:400 1.375rem/1.3 var(--f-display);letter-spacing:-.01em}
.check{display:flex;gap:12px;align-items:flex-start;min-height:44px;padding:10px 0;cursor:pointer;line-height:1.4}
.check input{width:22px;height:22px;margin-top:0;flex:0 0 auto;accent-color:var(--ink)}
fieldset{border:0;min-width:0}
legend{font:500 .9375rem/1.3 var(--f-text);color:var(--muted);margin-bottom:6px}
fieldset.inline{display:flex;gap:6px 18px;flex-wrap:wrap;margin:10px 0}
fieldset.inline > label{display:inline-flex;align-items:center;gap:8px;min-height:44px;cursor:pointer}
fieldset.inline input{width:20px;height:20px;accent-color:var(--ink)}

/* pills: the landing's Girl/Boy choice — paper with a line, ink when chosen; 44 px to tap */
.chips{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:8px 0}
.chip{display:inline-flex;align-items:center;min-height:34px;padding:4px 13px;border-radius:999px;border:1.5px solid var(--line);background:var(--paper);
  font:500 .875rem/1.2 var(--f-text);color:var(--muted);transition:background-color 160ms var(--ease-out),color 160ms var(--ease-out),border-color 160ms var(--ease-out)}
button.chip{position:relative;cursor:pointer;-webkit-tap-highlight-color:transparent}
button.chip::after{content:"";position:absolute;inset:-5px -3px}
button.chip[aria-pressed="true"]{background:var(--ink);color:var(--paper);border-color:var(--ink)}
@media (hover:hover) and (pointer:fine){button.chip:not([aria-pressed="true"]):hover{border-color:var(--muted);color:var(--ink)}}
.chip.tag{min-height:24px;padding:1px 9px;font-size:.8125rem;background:var(--surface);border-color:transparent;color:var(--ink)}
.badge{display:inline-flex;align-items:center;min-height:22px;padding:1px 9px;border-radius:999px;font:500 .8125rem/1.3 var(--f-text);background:var(--surface);color:var(--ink);border:1px solid transparent}
.badge.chat{background:var(--tint-blue);color:var(--ink-blue)}
.badge.photo{background:var(--tint-gold);color:var(--ink-gold)}
.badge.audio,.badge.auto{background:var(--highlight);color:var(--ink)}
.badge.dev{background:transparent;color:var(--muted);border:1px dashed var(--line-2)}

/* ---------- you two ---------- */
.env-layout{display:grid;gap:16px;margin-top:10px}
@media (min-width:720px){.env-layout{grid-template-columns:220px 1fr;align-items:start}}
/* the mini envelope is the GIFT's own envelope in miniature (it keeps the story's cream paper and wax).
   It has a real width (it used to be an auto-margined grid item whose children were all absolute, so it shrank to 0px
   and the seal sat on top of the words). Everything inside is sized from the envelope's own width (cqw), the card is
   clipped to itself and hidden while closed — same build as the landing hero. */
.env-mini{width:100%;max-width:260px;justify-self:center;margin:4px auto 0;container-type:inline-size;min-width:0}
.env-mini-stage{padding-top:30cqw}
.env-mini-env{position:relative;display:block;width:100%;aspect-ratio:1.5/1;container-type:inline-size;--seal:clamp(28px, 16cqw, 44px);
  padding:0;border:0;background:none;cursor:pointer;perspective:900px;font:inherit;color:inherit;text-align:center;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.env-mini-env:focus-visible{outline:2px solid var(--accent);outline-offset:6px;border-radius:12px}
.env-mini-env > span{position:absolute;display:block}
.env-mini .env-back{inset:0;z-index:1;border-radius:10px;background:linear-gradient(165deg,#f2e6ce,#dfcbac);box-shadow:0 14px 30px -12px rgba(90,60,30,.45)}
.env-mini .env-card{left:7%;right:7%;bottom:5%;height:88%;z-index:2;overflow:hidden;border-radius:7px;background:linear-gradient(170deg,#fdf6e8,#f3e6cd);color:#3a2a18;
  padding:clamp(6px, 5cqw, 14px) clamp(6px, 5cqw, 12px);box-shadow:0 -4px 14px -6px rgba(90,60,30,.3),inset 0 0 0 1px rgba(255,255,255,.6);
  visibility:hidden;opacity:0;transform:translateY(0);
  transition:transform .9s var(--ease-arrive) .25s,opacity .2s ease .25s,visibility 0s .45s}
.env-mini .env-card > .rule{display:block}
.env-mini .hb{font-family:Georgia,'Iowan Old Style',serif;font-weight:600;font-size:clamp(.78rem, 7.2cqw, 1.25rem);line-height:1.08;overflow-wrap:anywhere;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.env-mini .hb em{display:block;font-weight:500;font-size:.72em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#a03a4c;margin-top:2px}
.env-mini .rule{width:24%;height:1px;margin:clamp(3px, 2.6cqw, 8px) auto;background:rgba(90,65,35,.35)}
.env-mini .line{font-family:Georgia,'Iowan Old Style',serif;font-style:italic;font-size:clamp(.66rem, 5cqw, .86rem);line-height:1.3;opacity:.85;overflow-wrap:anywhere;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.env-mini .env-pocket{inset:0;z-index:3;border-radius:10px;pointer-events:none;background:linear-gradient(195deg,#eaddc2,#d8c3a1);
  clip-path:polygon(0 18%,50% 62%,100% 18%,100% 100%,0 100%)}
.env-mini .env-flap{left:0;right:0;top:0;height:62%;z-index:4;transform-origin:top center;background:linear-gradient(175deg,#f6ecd8,#e2cfaf);
  clip-path:polygon(0 0,100% 0,50% 100%);filter:drop-shadow(0 3px 5px rgba(90,60,30,.22));transition:transform .85s cubic-bezier(.4,.8,.3,1),z-index 0s .4s}
.env-mini .to{left:6%;right:6%;top:calc(58% + var(--seal) / 2 + 4px);bottom:3%;z-index:5;display:flex !important;align-items:flex-start;justify-content:center;overflow:hidden;
  font-family:Georgia,'Iowan Old Style',serif;font-style:italic;color:#5d4426;font-size:clamp(.72rem, 6.4cqw, 1.1rem);line-height:1.12;overflow-wrap:anywhere;transition:opacity .4s}
.env-mini .seal{left:50%;top:58%;width:var(--seal);height:var(--seal);margin:calc(var(--seal) / -2) 0 0 calc(var(--seal) / -2);z-index:6;border-radius:50%;
  display:grid !important;place-items:center;overflow:hidden;font-family:Georgia,serif;line-height:1;white-space:nowrap;color:#ffe9c9;font-size:calc(var(--seal) * .46);
  background:radial-gradient(circle at 36% 32%,#d8616f,#b9384f 60%,#8f2538);box-shadow:0 4px 10px rgba(0,0,0,.3);transition:transform .45s var(--ease-out),opacity .45s}
.env-mini-tap{display:block;margin-top:12px;text-align:center;font-family:var(--f-hand);font-size:1.375rem;line-height:1.1;color:var(--ink)}
.env-mini.open .env-flap{transform:rotateX(178deg);z-index:0;filter:none}
.env-mini.open .seal{transform:scale(.3) rotate(25deg);opacity:0}
.env-mini.open .to{opacity:0}
.env-mini.open .env-card{visibility:visible;opacity:1;transform:translateY(-52%);transition:transform .9s var(--ease-arrive) .25s,opacity .3s ease .2s,visibility 0s .2s}

/* ---------- chats ---------- */
/* the privacy promise: the landing's night band, with its lock */
.privacy{display:flex;gap:14px;align-items:flex-start;background:var(--n-bg);color:var(--n-ink);border-radius:var(--radius);padding:18px 18px 18px 16px;margin:0 0 18px;box-shadow:var(--sh-1)}
.privacy ::selection{background:var(--n-highlight);color:var(--n-on-accent)}
.privacy .lock{flex:0 0 auto;width:26px;height:30px;margin-top:2px;font-size:0;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 30'%3E%3Crect x='2' y='12' width='22' height='16' rx='3' fill='none' stroke='%23e5bf6d' stroke-width='2'/%3E%3Cpath d='M7 12V8a6 6 0 0 1 12 0v4' fill='none' stroke='%23e5bf6d' stroke-width='2'/%3E%3Ccircle cx='13' cy='20' r='2.4' fill='%23e5bf6d'/%3E%3C/svg%3E") center/contain no-repeat}
.privacy strong{display:block;font:400 1.25rem/1.2 var(--f-display);color:var(--n-ink)}
.privacy p{font-size:1rem;color:var(--n-muted);margin-top:4px}
.drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;cursor:pointer;
  border:2px dashed var(--line-2);border-radius:var(--radius);padding:28px 16px;background:var(--paper);margin-bottom:16px;transition:background-color .2s,border-color .2s}
.drop.over{border-color:var(--accent2);background:#f5f8fc}
@media (hover:hover) and (pointer:fine){.drop:hover{border-color:var(--accent2);background:#f5f8fc}}
.drop:focus-within{outline:2px solid var(--accent);outline-offset:3px}
/* a phone, its chat, the upload arrow (the landing's "Export a chat" step) in place of the emoji */
.drop-icon{width:52px;height:52px;font-size:0;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 52'%3E%3Crect x='14' y='4' width='24' height='44' rx='5' fill='%23fffdfd' stroke='%23131f35' stroke-width='2'/%3E%3Crect x='18' y='12' width='12' height='5' rx='2.5' fill='%2321539c'/%3E%3Crect x='22' y='20' width='12' height='5' rx='2.5' fill='%23c7cedb'/%3E%3Crect x='18' y='28' width='10' height='5' rx='2.5' fill='%2321539c'/%3E%3Cpath d='M40 30v-14M35 21l5-5 5 5' fill='none' stroke='%23a72530' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat}
.drop strong{font:400 1.25rem/1.2 var(--f-display)}
.drop .btn{margin-top:8px}
.drop.compact{flex-direction:row;padding:12px 16px;gap:12px}
.drop.compact .drop-icon{width:36px;height:36px}
.drop.compact strong{font-size:1.0625rem}
.small-drop{flex-direction:row;min-height:56px;padding:12px 14px;margin:10px 0 0;font-weight:500;color:var(--ink)}
.small-drop > span[aria-hidden]{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--accent);color:var(--on-accent);font-size:1rem;line-height:1}
.who-list{display:grid;gap:8px;margin:10px 0}
.who-opt{display:flex;align-items:center;gap:12px;min-height:52px;padding:10px 14px;border:1.5px solid var(--line);border-radius:var(--radius);background:var(--paper);cursor:pointer;font-weight:500;
  transition:border-color 160ms var(--ease-out),background-color 160ms var(--ease-out)}
.who-opt:has(input:checked){border-color:var(--ink);background:var(--surface)}
.who-opt:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:2px}
.who-opt input{accent-color:var(--ink);width:20px;height:20px;flex:0 0 auto}
.sources{list-style:none;display:grid;gap:8px}
.sources li{display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap;font-size:.9375rem}
.sources .clock{flex-basis:100%;display:grid;gap:6px;margin-top:2px;padding:10px 12px;border:1.5px dashed var(--line);border-radius:6px}
.sources .clock p{margin:0}
.sources .clock select{max-width:16rem}
.sources .clock .linkish{justify-self:start}
/* chat numbers: the landing's navy stat cards with gold figures */
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0 16px}
.stat{background:var(--ink);color:var(--n-ink);border-radius:10px;padding:12px 8px;text-align:center}
.stat b{display:block;font:400 1.5rem/1.1 var(--f-display);color:var(--n-highlight);overflow-wrap:anywhere}
.stat span{font-size:.8125rem;font-weight:500;color:var(--n-muted)}
.howto h3{margin-top:14px} .howto p{font-size:1rem;color:var(--muted)}
.skip{margin:8px 0 0;display:flex;justify-content:flex-end}
.status{font-weight:500;color:var(--muted);margin:6px 0}
/* Instagram: conversation picker */
.ig-steps{margin:-6px 0 16px;padding:0 4px}
.ig-steps summary{display:flex;align-items:center;min-height:44px;cursor:pointer;font-weight:500;font-size:.9375rem;color:var(--accent);text-decoration:underline;text-underline-offset:.25em}
.ig-steps p{margin-top:6px}
.notice h2{font-size:1.25rem}
.ig-suggest{background:var(--tint-blue);color:var(--ink-blue);border-radius:var(--radius);padding:10px 12px;margin:10px 0;font-size:.9375rem;line-height:1.45}
.ig-tools{display:flex;flex-wrap:wrap;align-items:flex-end;gap:0 16px}
.ig-tools .field{flex:1 1 220px;margin:8px 0 2px}
.ig-groups{padding:6px 0;font-weight:500;font-size:.9375rem;align-items:center}
.ig-groups input{margin-top:0}
.ig-chosen{margin:8px 0 4px}
.ig-chip{gap:2px;max-width:100%;color:var(--paper);border-color:var(--ink);background:var(--ink)}
.ig-list{margin:8px 0 0;min-width:0}
.ig-list legend{font-size:.875rem;color:var(--muted);padding:0}
.ig-rows{display:flex;flex-direction:column;border:1.5px solid var(--line);border-radius:var(--radius);background:var(--paper);overflow:hidden}
.ig-row{display:flex;align-items:flex-start;gap:12px;padding:0 12px;border-top:1px solid var(--line)}
.ig-row:first-child{border-top:0}
.ig-row:has(input:checked){background:var(--surface)}
.ig-row input{flex:0 0 auto;width:22px;height:22px;margin:13px 0 0;accent-color:var(--ink)}
.ig-row label{flex:1;min-width:0;min-height:48px;padding:10px 0;cursor:pointer;display:flex;flex-direction:column;gap:1px}
.ig-title{font-weight:500;overflow-wrap:anywhere;display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;line-height:1.3}
.ig-meta{font-size:.875rem;color:var(--muted);line-height:1.35}
.ig-meta > span{white-space:nowrap}
.who-card,.notice{scroll-margin-top:84px}
.ig-how{margin:6px 0 8px 1.3em;font-size:.9375rem;color:var(--muted);display:grid;gap:2px}
.ig-how li::marker{color:var(--accent);font-weight:500}
.ig-empty{padding:14px 12px}
.ig-more{display:flex;justify-content:center}
.ig-more .btn{margin-top:10px}
.ig-foot{position:sticky;bottom:calc(var(--bar-h) + env(safe-area-inset-bottom));z-index:2;margin:14px -20px -20px;padding:10px 20px 16px;
  background:var(--paper);border-top:1.5px dashed var(--line);border-radius:0 0 var(--radius) var(--radius)}
.ig-foot .row{margin-top:8px}
.ig-total{font-weight:500;font-size:.9375rem}
.ig-picked{list-style:none;margin:8px 0 4px;display:grid;gap:2px;font-size:.9375rem}
.ig-them{margin:10px 0;font-size:1.0625rem}

/* ---------- pages ---------- */
.order-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.price-tag{font:400 1.5rem/1 var(--f-display);color:var(--accent);font-variant-numeric:tabular-nums}
.order-list{list-style:none;margin-top:12px;display:grid;grid-template-columns:minmax(0,1fr);gap:6px}
/* a postcard per page: grip · name (its price under it on phones) · ↑ ↓ ✕ */
.order-list li{display:grid;grid-template-columns:44px minmax(0,1fr) auto;grid-template-areas:"grip nm ctrls" "grip tier ctrls";column-gap:4px;align-items:center;
  padding:3px 4px 3px 2px;border-radius:var(--radius);background:var(--paper);border:1px solid var(--line);min-height:52px;touch-action:pan-y}
.order-list li.fixed{background:transparent;border-style:dashed;color:var(--muted);padding-right:12px}
.order-list .grip{grid-area:grip}
.order-list .nm{grid-area:nm;align-self:end;font-weight:500;min-width:0;line-height:1.25;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow-wrap:break-word}
/* the narrowest phones: the name gets the whole first line, price and arrows share the second */
@media (max-width:379px){
  .order-list li.item{grid-template-areas:"grip nm nm" "grip tier ctrls";padding-top:6px}
  .order-list li.item .nm{padding-top:2px}
  .order-list li.item > .small{align-self:center}
}
.order-list li > .small{grid-area:tier;align-self:start;font-size:.8125rem;line-height:1.3;font-variant-numeric:tabular-nums}
.order-list .ctrls{grid-area:ctrls}
@media (min-width:720px){
  .order-list li{grid-template-columns:44px minmax(0,1fr) auto auto;grid-template-areas:"grip nm tier ctrls"}
  .order-list .nm,.order-list li > .small{align-self:center}
  .order-list li > .small{font-size:var(--t-small);padding:0 6px}
}
.order-list .grip{width:44px;height:44px;flex:0 0 auto;display:grid;place-items:center;color:var(--muted);cursor:grab;font-size:1.125rem;touch-action:none;border-radius:4px}
.order-list li.fixed .grip{cursor:default;color:var(--accent)}
.order-list .ctrls{display:flex}
.order-list li.dragging{box-shadow:var(--sh-2);z-index:5;position:relative;background:var(--surface);cursor:grabbing}
.order-list li.drop-before{box-shadow:0 -3px 0 var(--accent2)}
.order-list li.drop-after{box-shadow:0 3px 0 var(--accent2)}
.filters{margin:6px 0 12px}
.cat h2{margin:26px 0 12px;font-size:1.625rem}
.cards{display:grid;gap:14px}
@media (min-width:640px){.cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:1500px){.cards{grid-template-columns:repeat(3,minmax(0,1fr))}}
.page-card{display:grid;grid-template-columns:96px minmax(0,1fr);gap:14px;background:var(--paper);border-radius:var(--radius);padding:12px;box-shadow:var(--sh-1);outline:2px solid transparent;outline-offset:-2px;
  transition:outline-color 160ms var(--ease-out)}
.page-card.in{outline-color:var(--accent2)}
.page-card.locked{opacity:.9}
.page-card .thumb{width:96px;height:150px;border-radius:8px;overflow:hidden;background:var(--ink);box-shadow:var(--sh-1)}
.page-card .thumb img{width:100%;height:100%;object-fit:cover;object-position:top}
.thumb-fallback{display:grid;place-items:center;width:100%;height:100%;padding:8px;text-align:center;background:var(--ink)}
.thumb-fallback .hand{color:var(--n-ink);font-size:1.25rem;line-height:1.05}
.pc-body{min-width:0;display:flex;flex-direction:column;gap:6px}
.pc-top{display:flex;justify-content:space-between;gap:8px;align-items:baseline}
.pc-top h3{font-size:1.1875rem}
.pc-top .price{font:400 1.0625rem/1 var(--f-display);color:var(--accent);white-space:nowrap}
.pc-body p{font-size:.9375rem;color:var(--muted);line-height:1.4}
.badges{display:flex;flex-wrap:wrap;gap:4px}
.pc-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:auto;padding-top:4px}
.locked-why{font-size:.875rem;color:var(--muted)}
.locked-why a{display:inline-flex;align-items:center;min-height:44px}

/* ---------- phone frame + previews: the gift keeps its own look; around it, the landing's desk ---------- */
.phone{position:relative;width:100%;max-width:380px;aspect-ratio:390/780;margin:8px auto;border-radius:38px;padding:10px;background:var(--ink);
  box-shadow:var(--sh-2),0 30px 60px -28px rgba(19,31,53,.55),inset 0 0 0 2px rgba(255,255,255,.07)}
.phone iframe{width:100%;height:100%;border:0;border-radius:29px;background:#0a0a14}
.phone iframe:focus,.phone iframe.has-focus,.sheet-frame:focus,.sheet-frame.has-focus{outline:2px solid var(--n-accent2);outline-offset:-4px}
#side .phone{max-height:calc(100vh - 240px);width:auto}
.phone.big{max-width:420px}
@media (min-width:720px){.phone.big{height:max(480px, min(780px, calc(100vh - 400px)));width:auto;max-width:none}}
@media (max-width:719px){body[data-screen="preview"] .phone.big{max-width:none;aspect-ratio:auto;height:calc(100svh - 220px);border-radius:0;padding:0;margin:0 calc(var(--gutter) * -1);width:calc(100% + var(--gutter) * 2)}body[data-screen="preview"] .phone.big iframe{border-radius:0}}
@media (min-width:720px){
  body[data-screen="preview"] main{position:relative;isolation:isolate;text-align:center}
  body[data-screen="preview"] main p{margin-left:auto;margin-right:auto}
  body[data-screen="preview"] .preview-bar{justify-content:center}
  body[data-screen="preview"] main::before{content:"";position:absolute;left:calc(var(--gutter) * -1 + 4px);right:calc(var(--gutter) * -1 + 4px);top:170px;bottom:0;z-index:-1;pointer-events:none;
    background:radial-gradient(closest-side,var(--surface) 55%,rgba(247,233,233,0)),var(--grid);background-size:auto,28px 28px;background-position:center;
    -webkit-mask-image:radial-gradient(closest-side,#000 58%,transparent);mask-image:radial-gradient(closest-side,#000 58%,transparent)}
}
.preview-bar{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.note{display:inline-block;background:var(--tint-gold);color:var(--ink-gold);border-radius:var(--radius);padding:8px 12px;font-size:.9375rem;margin:0 0 10px}
.note.ok-note{background:var(--tint-blue);color:var(--ink-blue)}
.preview-errs .warn{margin-top:6px}
.sheet-frame{width:100%;height:70vh;border:0;border-radius:16px;background:#0a0a14}

/* immersive preview (phones): the story full-screen under a slim paper bar with an airmail edge — no phone-in-a-phone */
html.scroll-locked,html.scroll-locked body{overscroll-behavior:none}
.imm{position:fixed;inset:0;z-index:85;height:100vh;height:100dvh;display:flex;flex-direction:column;background:#0a0a14;overflow:hidden;
  overscroll-behavior:contain;padding:0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
/* the bar always paints and hit-tests above the story (an iframe that over-sizes itself on iOS can't cover it) */
.imm-bar{position:relative;z-index:3;flex:0 0 auto;background:var(--bg);color:var(--ink);padding:env(safe-area-inset-top) 8px 0;overscroll-behavior:contain}
.imm-bar::after{content:"";position:absolute;left:0;right:0;bottom:0;height:4px;background:var(--stripe);pointer-events:none}
.imm-row{display:flex;align-items:center;gap:4px;height:50px;padding-bottom:2px}
.imm-btn{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-height:44px;min-width:44px;padding:0 10px;border-radius:999px;touch-action:manipulation;
  border:1.5px solid var(--line-2);background:var(--paper);color:var(--ink);font:500 .875rem/1 var(--f-text);white-space:nowrap;text-decoration:none;cursor:pointer;
  transition:transform 140ms var(--ease-out),background-color 150ms ease}
.imm-btn:active{transform:scale(.97)}
.imm-close{padding:0 10px}
.imm-primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent);border-radius:var(--radius)}
.imm-title{flex:1 1 auto;min-width:56px;display:flex;flex-direction:column;justify-content:center;line-height:1.15;padding:0 2px}
.imm-title strong{font:400 1.0625rem/1.15 var(--f-display);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.imm-sub{display:flex;align-items:center;gap:6px;min-width:0;margin-top:2px}
.imm-subtext{font-size:.8125rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.imm-missing{position:relative;flex:0 0 auto;display:inline-flex;align-items:center;min-height:24px;padding:0 9px;border-radius:999px;background:var(--highlight);
  color:var(--ink);border:0;font:500 .8125rem/1 var(--f-text);cursor:pointer}
.imm-missing::after{content:"";position:absolute;inset:-10px -4px}
.imm-actions{display:flex;align-items:center;gap:4px;flex:0 1 auto;min-width:0}
.imm-done{font:500 .875rem/1 var(--f-text);color:var(--ok);white-space:nowrap;padding:0 4px}
@media (max-width:359px){.imm-env-word{display:none}}
.imm-looks{display:flex;flex-wrap:nowrap;gap:6px;overflow-x:auto;padding:4px 8px 10px;margin:-4px -8px 0;scroll-padding:0 8px;scrollbar-width:none}
.imm-looks::-webkit-scrollbar{display:none}
.imm-looks .chip{flex:0 0 auto;min-height:34px;white-space:nowrap}
.imm-looks button.chip::after{inset:-5px -3px -6px}
.imm-frame{position:relative;z-index:1;flex:1 1 auto;display:block;width:100%;max-width:none;min-height:0;border:0;border-radius:0;background:#0a0a14}
.imm-sheet{position:absolute;left:8px;right:8px;top:calc(env(safe-area-inset-top) + 62px);z-index:2;max-height:min(60%, 420px);overflow:auto;
  overscroll-behavior:contain;background:var(--paper);color:var(--ink);border-radius:var(--radius);padding:12px 14px 14px;box-shadow:0 18px 40px -12px rgba(0,0,0,.55)}
.imm-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.imm-sheet-head h2{font-size:1.25rem;margin:0}
.imm-issues{list-style:none;margin:8px 0 0;display:grid;gap:0}
.imm-issues a{display:flex;align-items:center;min-height:44px;padding:8px 4px;border-bottom:1px dashed var(--line);font-size:.9375rem;font-weight:500;text-decoration:none;color:var(--ink)}
.imm-issues a::after{content:'→';margin-left:auto;padding-left:8px;color:var(--accent)}

/* ---------- edit ---------- */
/* position:relative: the strip's .sr-only spans are absolute — without a positioned scroller they escape its
   overflow and widen the whole page past the phone's screen (iOS then zooms the layout out) */
.page-switch{position:relative;margin:0 calc(var(--gutter) * -1) 16px;padding:2px var(--gutter);overflow-x:auto;scrollbar-width:thin;scrollbar-color:var(--line-2) transparent}
.page-switch ol{display:flex;gap:6px;list-style:none;padding-bottom:6px}
.page-switch a{display:flex;align-items:center;gap:7px;min-height:44px;white-space:nowrap;padding:0 14px;border-radius:999px;border:1.5px solid var(--line);background:var(--paper);
  text-decoration:none;color:var(--muted);font:500 .9375rem/1 var(--f-text);transition:background-color 160ms var(--ease-out),color 160ms var(--ease-out),border-color 160ms var(--ease-out)}
.page-switch a.current{background:var(--ink);color:var(--paper);border-color:var(--ink)}
@media (hover:hover) and (pointer:fine){.page-switch a:not(.current):hover{border-color:var(--muted);color:var(--ink)}}
.dot{width:9px;height:9px;border-radius:50%;flex:0 0 auto}
.dot.ok{background:var(--accent2)}
.page-switch a.current .dot.ok{background:var(--n-accent2)}
.dot.todo{background:var(--highlight);box-shadow:0 0 0 2px rgba(222,184,102,.35)}
.looks{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:10px;margin-top:10px}
.look{display:flex;flex-direction:column;gap:4px;cursor:pointer;border-radius:8px;padding:6px;border:2px solid transparent;transition:border-color 160ms var(--ease-out),background-color 160ms var(--ease-out)}
.look.on{border-color:var(--accent2);background:var(--surface)}
.look:focus-within{outline:2px solid var(--accent);outline-offset:2px}
.look-thumb{display:block;position:relative;width:100%;aspect-ratio:390/600;border-radius:6px;overflow:hidden;background:var(--ink)}
.look-thumb img{width:100%;height:100%;object-fit:cover;object-position:top}
.look-thumb iframe{position:absolute;top:0;left:0;width:390px;height:600px;border:0;transform-origin:0 0;transform:scale(var(--s,.27));pointer-events:none}
.look-name{font-weight:500;font-size:.9375rem}
.look-desc{font-size:.8125rem;color:var(--muted);line-height:1.3}
.prompt{padding:14px 0;border-top:1.5px dashed var(--line)}
.prompt:first-of-type{border-top:0}
.prompt.nested{padding:6px 0;border:0}
.p-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:4px}
.p-head .p-label{color:var(--ink);font-size:1rem}
.p-ask{font-size:.9375rem;color:var(--muted);margin-bottom:6px}
.p-ctl{display:flex;flex-direction:column;gap:6px}
.p-tools{display:flex;justify-content:space-between;align-items:center;gap:10px}
.p-ctl > .counter{align-self:flex-end;margin-top:-2px}
.counter{font-size:.8125rem;color:var(--muted);font-variant-numeric:tabular-nums}
.counter.over{color:var(--warn);font-weight:500}
.p-err p{color:var(--warn);font-size:.875rem;font-weight:500;margin-top:4px}
.prompt:not(.has-err) .p-err p{color:var(--muted);font-weight:400}
.choices{flex-direction:row;flex-wrap:wrap;gap:4px 6px}
.choice{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 14px 0 12px;border:1.5px solid var(--line);border-radius:999px;background:var(--paper);cursor:pointer;font-weight:500;font-size:.9375rem;
  transition:background-color 160ms var(--ease-out),color 160ms var(--ease-out),border-color 160ms var(--ease-out)}
.choice input{accent-color:var(--paper);width:18px;height:18px}
.choice:has(input:checked){border-color:var(--ink);background:var(--ink);color:var(--paper)}
.choice:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:2px}
.rows{display:grid;gap:12px}
.row-card{border:1.5px dashed var(--line-2);border-radius:var(--radius);padding:6px 14px 10px;background:var(--paper);position:relative}
.row-card > legend{display:grid;place-items:center;min-width:28px;height:28px;padding:0 8px;margin:0 0 0 -4px;border-radius:999px;background:var(--ink);color:var(--paper);
  font:500 .875rem/1 var(--f-text);font-variant-numeric:tabular-nums}
.row-ctrls{display:flex;justify-content:flex-end;align-items:center;gap:2px}
.ph-grid{list-style:none;display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:12px}
.ph{display:flex;flex-direction:column;gap:4px}
/* thumbnails show the whole crop — exactly what the page will show — never cut again */
.ph img{width:100%;aspect-ratio:1;object-fit:contain;border-radius:4px;background:var(--surface)}
.photo-one .ph{flex-direction:row;align-items:flex-start;gap:12px}
.photo-one .ph img{width:110px;flex:0 0 110px;aspect-ratio:auto;max-height:180px;object-fit:contain;background:none;box-shadow:var(--sh-1)}
.ph-fit{color:var(--ink-gold);margin:4px 0 0;font-size:.875rem}
.ph input{min-height:44px;font-size:1rem}
.ph .prompt.nested{padding:2px 0}
.ph .p-label{font-size:.875rem}
.ph-grid:has(.prompt){grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
.ph-ctrls{display:flex;gap:2px;align-items:center;justify-content:space-between}
.photo-one .ph-ctrls{flex-direction:column;align-items:flex-start}
.media audio,.media video{width:100%;max-height:300px;border-radius:var(--radius)}
.song-out{font-size:.9375rem;font-weight:500}
.song-out.bad{color:var(--warn)} .song-out.ok{color:var(--ok)}
.combo-wrap{position:relative}
.combo{position:absolute;left:0;right:0;top:100%;z-index:10;list-style:none;background:var(--paper);border:1.5px solid var(--line-2);border-radius:var(--radius);margin-top:4px;box-shadow:var(--sh-2);max-height:260px;overflow:auto}
.combo li{display:flex;align-items:center;min-height:44px;padding:8px 13px;cursor:pointer}
.combo li[aria-selected="true"],.combo li:hover{background:var(--surface)}
.picked{list-style:none;display:grid;gap:6px;max-height:320px;overflow:auto}
.picked li{display:flex;gap:8px;align-items:center;background:var(--surface);border-radius:var(--radius);padding:4px 4px 4px 12px;font-size:.9375rem;min-height:48px}
.picked .who{font-size:.8125rem;font-weight:500;text-transform:uppercase;letter-spacing:.06em;color:var(--accent);flex:0 0 40px}
.picked .t{flex:1;white-space:pre-wrap;overflow-wrap:anywhere;padding:6px 0}
.picked li.time-line{background:transparent;border:1.5px dashed var(--line-2);padding:2px 4px 2px 10px}
.picked li.time-line input{flex:1;min-width:0;min-height:40px;padding:6px 10px;font-size:1rem;text-align:center;border-bottom:0}
/* point: tap a spot on a photo */
.point .pt-stage{position:relative;display:inline-block;max-width:100%;line-height:0;border-radius:var(--radius);overflow:hidden;cursor:crosshair;touch-action:manipulation;border:1.5px solid var(--line-2)}
.point .pt-stage img{display:block;max-width:100%;max-height:360px;width:auto;height:auto;user-select:none;-webkit-user-drag:none}
.point .pt-mark{position:absolute;width:30px;height:30px;margin:-15px 0 0 -15px;border-radius:50%;border:3px solid var(--paper);background:rgba(167,37,48,.55);
  box-shadow:0 0 0 2px var(--accent),0 4px 12px rgba(0,0,0,.35);pointer-events:none}
.point .pt-mark[hidden]{display:none}
.point .row{margin-top:6px;align-items:center}
.suggest summary{display:flex;align-items:center;min-height:44px;cursor:pointer;font-weight:500;font-size:.9375rem;color:var(--accent);text-decoration:underline;text-underline-offset:.25em}
.sugg-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.sugg{text-align:left;min-height:44px;padding:8px 12px;border-radius:var(--radius);background:var(--paper);border:1.5px solid var(--line);font-size:.9375rem;line-height:1.35;
  transition:border-color 150ms ease}
@media (hover:hover) and (pointer:fine){.sugg:not(:disabled):hover{border-color:var(--ink)}}
.sugg:disabled{opacity:.4}
.auto-row{padding:8px 0;border-top:1.5px dashed var(--line)}
.auto-row:first-of-type{border-top:0}
.quote{margin:6px 0 4px 34px;padding:10px 14px;border-left:3px solid var(--accent);background:var(--surface);border-radius:0 var(--radius) var(--radius) 0;font:400 1.0625rem/1.4 var(--f-display)}
.quote cite{display:block;margin-top:4px;font:400 .8125rem/1.3 var(--f-text);color:var(--muted)}
.firsts{list-style:none;margin-left:24px}
.header-card .grid2 .field{margin:6px 0}
.page-status{margin:8px 0;font-weight:500;font-size:.9375rem}
.page-status .todo{color:var(--ink-gold)} .page-status .ok{color:var(--ok)}
.page-nav{justify-content:space-between}
/* crop step (cropper.js): the photo stays still, the frame moves over it — on the landing's night table */
.crop-shape{margin:0 0 6px}
.crop-chips{margin:4px 0 2px}
.crop-wrap{display:flex;justify-content:center;align-items:center;background:var(--n-bg);border-radius:var(--radius);padding:22px;margin:8px 0 6px;overflow:hidden}
.crop-stage{position:relative;display:inline-block;max-width:100%;line-height:0;user-select:none;-webkit-user-select:none;touch-action:none;-webkit-touch-callout:none}
.crop-img{display:block;max-width:100%;width:auto;height:auto;max-height:min(52vh, 540px);pointer-events:none}
@media (max-height:640px){.crop-img{max-height:44vh}}
.crop-box{position:absolute;border:2px solid #fff;box-shadow:0 0 0 9999px rgba(13,22,38,.66);cursor:move;touch-action:none}
.crop-box:focus-visible{outline:3px solid var(--n-accent2);outline-offset:3px}
.crop-box.whole{cursor:default;box-shadow:none;border-style:dashed}
.crop-box.whole .crop-h,.crop-box.whole .crop-grid{display:none}
.crop-grid{position:absolute;inset:0;pointer-events:none;opacity:.55;
  background:linear-gradient(90deg, transparent calc(33.33% - .5px), rgba(255,255,255,.7) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255,255,255,.7) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px)),
             linear-gradient(180deg, transparent calc(33.33% - .5px), rgba(255,255,255,.7) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255,255,255,.7) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px))}
/* corner handles: a 44 px touch target around a small L bracket */
.crop-h{position:absolute;width:44px;height:44px;touch-action:none}
.crop-h::before{content:"";position:absolute;width:16px;height:16px;border:0 solid #fff;filter:drop-shadow(0 0 2px rgba(0,0,0,.45))}
.crop-h-nw{left:-22px;top:-22px;cursor:nwse-resize} .crop-h-nw::before{left:19px;top:19px;border-width:4px 0 0 4px}
.crop-h-ne{right:-22px;top:-22px;cursor:nesw-resize} .crop-h-ne::before{right:19px;top:19px;border-width:4px 4px 0 0}
.crop-h-sw{left:-22px;bottom:-22px;cursor:nesw-resize} .crop-h-sw::before{left:19px;bottom:19px;border-width:0 0 4px 4px}
.crop-h-se{right:-22px;bottom:-22px;cursor:nwse-resize} .crop-h-se::before{right:19px;bottom:19px;border-width:0 4px 4px 0}
.crop-tools{display:flex;align-items:center;gap:12px;padding:2px 4px}
.crop-zoom{flex:1;min-height:44px;accent-color:var(--accent2)}
.crop-zoom:disabled{opacity:.4}
.crop-ico{flex:0 0 auto;border:2px solid var(--muted);border-radius:3px}
.crop-ico.sm{width:10px;height:10px} .crop-ico.lg{width:18px;height:18px}
.crop-note{min-height:1.4em;font-size:1rem;margin:4px 0 0}
.crop-note.warn{color:var(--ink-gold);font-weight:500}
.crop-help{margin:2px 0 0}
.crop-actions{gap:10px;position:sticky;bottom:-22px;background:var(--paper);padding:10px 0 4px;margin-top:6px;z-index:2}

/* chat-pick modal */
.pick-tools{display:grid;grid-template-columns:1fr;gap:8px}
@media (min-width:560px){.pick-tools{grid-template-columns:1fr 180px}}
.pick-tools input[type=search]{min-height:44px}
.chips input[type=text]{min-height:44px;width:130px;padding:4px 12px;border:1.5px solid var(--line-2);border-radius:999px;background:var(--paper);font-size:16px}   /* ≥16px: no iOS zoom on focus */
.chips input[type=text]:focus{padding-bottom:4px;border:1.5px solid var(--accent2);box-shadow:0 0 0 1px var(--accent2)}
.msgs{list-style:none;display:grid;gap:6px;max-height:50vh;overflow:auto;padding:4px 2px;margin:6px 0}
.msg > label{display:grid;grid-template-columns:22px 1fr;gap:2px 10px;padding:9px 12px;border-radius:10px;background:var(--paper);border:1.5px solid var(--line);cursor:pointer;
  transition:border-color 150ms ease,background-color 150ms ease}
.msg.me > label{background:#fbf3f3}
.msg.on > label{border-color:var(--ink);background:var(--surface)}   /* > : a picked result doesn't colour the context rows inside it */
.msg input{grid-row:span 2;width:20px;height:20px;margin-top:2px;accent-color:var(--ink)}
.msg .meta{font-size:.8125rem;color:var(--muted);font-weight:500}
.msg .text{font-size:.9375rem;white-space:pre-wrap;overflow-wrap:anywhere}
.msgs .empty,.msgs .more{text-align:center;padding:12px;color:var(--muted)}
.pick-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;position:sticky;bottom:0;background:var(--paper);padding-top:8px}
.pick-count{font-weight:500}
.pick-count.bad{color:var(--warn)}
/* keyword search in the pickers (prompts.js searchBox): sticky under the modal head, × to clear, 16px so iOS doesn't zoom */
.pick-search{position:sticky;top:34px;z-index:2;background:var(--paper);padding:4px 2px 2px;margin:0 -2px}
.suggest .pick-search{position:static;background:none;margin:6px 0 0}
.pick-q{min-width:0}
.search-box{position:relative;display:flex;align-items:center}
.search-box input.search-input{width:100%;font:400 16px/1.3 var(--f-text);min-height:48px;padding:10px 46px 10px 40px;-webkit-appearance:none;appearance:none;
  border:1.5px solid var(--line-2);border-radius:999px;background:var(--paper);color:var(--ink);transition:border-color 150ms ease,box-shadow 150ms ease}
.search-box input.search-input:focus{outline:none;border-color:var(--accent2);box-shadow:0 0 0 1px var(--accent2)}
.search-box input.search-input::-webkit-search-cancel-button,.search-box input.search-input::-webkit-search-decoration{-webkit-appearance:none;appearance:none;display:none}
.search-ico{position:absolute;left:15px;top:50%;width:14px;height:14px;margin-top:-8px;border:2px solid var(--muted);border-radius:50%;pointer-events:none}
.search-ico::after{content:"";position:absolute;width:2px;height:7px;background:var(--muted);right:-4px;bottom:-6px;transform:rotate(-45deg);border-radius:1px}
.search-clear{position:absolute;right:2px;top:50%;margin-top:-22px;width:44px;height:44px;border:0;border-radius:50%;background:transparent;color:var(--muted);
  font-size:1.5rem;line-height:1;display:flex;align-items:center;justify-content:center;cursor:pointer}
@media (hover:hover) and (pointer:fine){.search-clear:hover{background:var(--surface);color:var(--ink)}}
.search-clear[hidden]{display:none}
.search-count{margin:4px 2px 0;color:var(--muted);font-weight:500;min-height:0}
.search-count:empty{display:none}
.msgs mark,.sugg mark{background:rgba(222,184,102,.6);color:inherit;border-radius:3px;padding:0 1px;box-shadow:0 0 0 1px rgba(222,184,102,.5)}
.msg{position:relative}
.msg > label .meta{padding-right:84px}
.ctx-btn{position:absolute;top:4px;right:6px;display:inline-flex;align-items:center;min-height:32px;border:1.5px solid var(--line);background:var(--paper);color:var(--accent2);border-radius:999px;padding:0 11px;
  font:500 .8125rem/1 var(--f-text);cursor:pointer}
.ctx-btn::after{content:"";position:absolute;inset:-6px -4px}
.ctx-btn[aria-expanded="true"]{background:var(--tint-blue);border-color:var(--accent2)}
.ctx{list-style:none;display:grid;gap:4px;margin:6px 0 2px 16px;padding-left:10px;border-left:2px dashed var(--line-2)}
.ctx .msg > label{padding:7px 10px;border-radius:8px}
.ctx .msg .text{font-size:.9375rem}
.ctx .msg > label .meta{padding-right:0}
.ctx-self > label{border-style:dashed;border-color:var(--accent2)}
.ctx-more{text-align:center}
.sugg.added{opacity:.5}
.sugg.added::after{content:" ✓";color:var(--ok);font-weight:500}
.sugg-more{flex-basis:100%}

/* polish diff */
.diff{background:var(--paper);border:1.5px dashed var(--line-2);border-radius:var(--radius);padding:12px;line-height:1.7;font-size:1.0625rem;margin:10px 0;overflow-wrap:anywhere}
.diff ins{background:var(--tint-blue);color:var(--ink-blue);text-decoration:none;border-radius:3px;padding:0 2px}
.diff del{background:var(--tint-red);color:var(--ink-red);border-radius:3px;padding:0 2px}

/* ---------- checkout ---------- */
.bill-table{width:100%;border-collapse:collapse;margin-top:8px;font-variant-numeric:tabular-nums}
.bill-table th{text-align:left;font-weight:500;padding:10px 0;font-size:1rem}
.bill-table td{text-align:right;padding:10px 0 10px 12px;white-space:nowrap;vertical-align:top;font-weight:500}
.bill-table tr{border-bottom:1.5px dashed var(--line)}
.bill-table .page-line th{font-weight:400;padding-left:12px}
.bill-table .page-line td{font-weight:400;color:var(--muted)}
.bill-table .sub th,.bill-table .sub td{font-weight:500}
.bill-table .discount td{color:var(--ok)}
.bill-table .total th,.bill-table .total td{font-family:var(--f-display);font-size:1.625rem;font-weight:400;padding-top:14px;border:0}
.bill-table .total td strong{font-weight:400;color:var(--accent)}
.bill-table .small.block{font-weight:400}
.nudge{background:var(--tint-gold);color:var(--ink-gold);padding:8px 12px;border-radius:var(--radius);display:inline-block;margin-top:10px}
.addon{border-top:1.5px dashed var(--line)}
.addon:first-of-type{border-top:0}
.issues ul{padding-left:18px}
.issues li{margin:2px 0}
.issues li a{display:inline-flex;align-items:center;min-height:44px}
.pay-row{display:flex;flex-direction:column;align-items:center;gap:8px;margin:24px 0;text-align:center}
.pay-row .btn{width:100%;max-width:420px}
.pilot{margin-top:10px}
.pilot-toggle{margin-left:-4px}
.pilot-form{margin-top:6px}
.pilot-row{display:flex;gap:10px;align-items:center}
.pilot-row input{flex:1;min-width:0;text-transform:uppercase;letter-spacing:.06em}
.pilot-row input::placeholder{text-transform:none;letter-spacing:0}
.pilot-msg{min-height:1.2em;margin-top:6px}
.pilot-msg.warn{color:var(--warn)}
.bill-table .total td .was{color:var(--muted);font-size:1.125rem;text-decoration-thickness:1.5px;margin-right:4px}
.pay-msg{max-width:420px;margin:0}
.pay-msg:empty{display:none}
.pilot-free{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px;padding:8px 10px 8px 14px;border-radius:var(--radius);background:var(--tint-blue);color:var(--ink-blue);font-size:.9375rem;line-height:1.35}
.pilot-free p{margin:0;min-width:0}
.pilot-free strong::before{content:'✓ '}
.pilot-free .code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.875rem;letter-spacing:.04em;color:var(--ink);white-space:nowrap}
.pilot-free .linkish{flex:0 0 auto}

/* ---------- done: the letter is posted ---------- */
.done{text-align:center}
.card.done{padding:92px 20px 26px}
.card.done:not(:has(.postmark)){padding-top:28px}
.done .lede{margin:0 auto 14px}
/* the stamp in the corner, cancelled: the letter has gone */
.postmark{position:absolute;right:26px;top:16px;width:118px;height:76px;opacity:.9;transform:rotate(-12deg);pointer-events:none}
.postmark svg{display:block;width:100%;height:100%}
.done p.small{margin:12px auto 0}
.done .link-row + p.small{margin-top:14px}
@media (min-width:720px){.postmark{width:150px;height:96px;right:34px;top:12px}.card.done{padding-top:100px}}
.done .signoff{display:block;margin-top:14px;font-family:var(--f-hand);font-size:1.625rem;line-height:1.1;color:var(--ink)}
.link-row{display:flex;gap:10px;max-width:560px;margin:0 auto;align-items:center}
.link-row input{flex:1;min-width:0;font-size:1rem}
/* the QR code on a perforated postage stamp (the landing's price stamps) */
.qr{width:236px;margin:22px auto 16px;padding:14px;background:var(--surface);transform:rotate(-1.5deg);
  -webkit-mask:linear-gradient(#000 0 0) content-box,radial-gradient(circle at 50% 50%,transparent 3.6px,#000 4.1px) -6px -6px/12px 12px round;
  mask:linear-gradient(#000 0 0) content-box,radial-gradient(circle at 50% 50%,transparent 3.6px,#000 4.1px) -6px -6px/12px 12px round}
.qr svg{width:100%;height:auto;display:block;background:#fff;border:1.5px solid var(--line)}
.done .row{justify-content:center}

/* ---------- bottom bar ---------- */
.bottombar{position:fixed;left:0;right:0;bottom:0;z-index:45;display:flex;align-items:center;gap:10px;justify-content:space-between;
  min-height:var(--bar-h);padding:10px var(--gutter) calc(10px + env(safe-area-inset-bottom));background:rgba(252,245,245,.95);
  backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-top:1px solid var(--line);box-shadow:0 -8px 20px -16px rgba(19,31,53,.35)}
.bar-mid{display:flex;flex-direction:column;align-items:center;text-align:center;min-width:0;flex:1;line-height:1.25}
#bar-price{font-weight:500;font-size:1rem;font-variant-numeric:tabular-nums}
#bar-nudge{font-size:.8125rem;color:var(--ok)}
.bottombar .btn{flex:0 0 auto}
@media (max-width:420px){#bar-next{max-width:52vw;overflow:hidden;text-overflow:ellipsis;padding:0 14px}#bar-back{padding:0 13px}}
/* 360 and narrower: Back is just its arrow (still a 44 px button named "Back"); the bundle hint waits for checkout */
@media (max-width:360px){#bar-back{width:44px;padding:0}#bar-back .bar-word{display:none}#bar-nudge{display:none}#bar-price{font-size:.9375rem}}
#bar-back{gap:6px}
body[data-screen="done"] .bottombar{display:none}
/* a published gift is sealed: no steps, no price bar, no live preview — just its link and QR code */
body[data-sealed] #steps{visibility:hidden}
body[data-sealed] .bottombar,body[data-sealed] #side{display:none!important}
body[data-sealed] .layout{grid-template-columns:minmax(0,1fr)}
body[data-sealed] .wm-text{display:inline}
.done .sealed-note{margin:18px 0 0;padding:12px 14px;border:1.5px dashed var(--line);border-radius:6px}
/* the welcome-back screen stands alone: no steps, no price bar, no gift menu (each card has its own) */
body[data-screen="start"] .bottombar,body[data-screen="start"] #steps,body[data-screen="start"] #menu-btn,body[data-screen="start"] #saved{visibility:hidden}
body[data-screen="start"] .bottombar{display:none}
body[data-screen="start"] main{max-width:640px;margin:0 auto}

/* ---------- modal + toast: an airmail letter (a sheet with an airmail edge on phones) ---------- */
.modal-wrap{position:fixed;inset:0;z-index:90;background:rgba(19,31,53,.5);display:flex;align-items:flex-end;justify-content:center;padding:0;animation:fade-in 200ms linear both}
.modal{background:var(--paper);width:100%;max-width:560px;max-height:92vh;overflow:auto;border-radius:0;padding:16px 18px 22px;box-shadow:var(--sh-2);
  border-top:6px solid transparent;border-image:var(--stripe) 6 0 0 0;animation:sheet-in 320ms var(--ease-arrive) both}
.modal.wide{max-width:760px}
@media (min-width:720px){
  .modal-wrap{align-items:center;padding:24px}
  .modal{border:8px solid transparent;border-image:var(--stripe) 8;padding:20px 24px 24px;animation:letter-in 360ms var(--ease-arrive) both}
}
@keyframes fade-in{from{opacity:0}to{opacity:1}}
@keyframes sheet-in{from{transform:translateY(24px);opacity:.4}to{transform:none;opacity:1}}
@keyframes letter-in{from{transform:translateY(14px);opacity:0}to{transform:none;opacity:1}}
.modal-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:0 -2px 8px;position:sticky;top:-16px;background:var(--paper);padding:4px 2px 2px;z-index:3}
@media (min-width:720px){.modal-head{top:-20px}}
.modal-head h2{margin:0;font-size:1.5rem}
.modal .phone{max-width:300px}
.toast{position:fixed;left:50%;bottom:calc(var(--bar-h) + 16px);transform:translate(-50%,20px);opacity:0;z-index:100;background:var(--ink);color:var(--paper);padding:11px 20px;border-radius:22px;
  font:500 .9375rem/1.4 var(--f-text);box-shadow:var(--sh-2);transition:opacity .3s var(--ease-out),transform .3s var(--ease-out);width:max-content;max-width:min(calc(100vw - 32px), 460px);text-align:center;text-wrap:pretty}
.toast.in{opacity:1;transform:translate(-50%,0)}
.toast.error{background:var(--accent);color:var(--on-accent)}

/* song links (songfield.js: the `song` prompt kind and "Our song" on You two) */
.song-out p{margin:4px 0 0}
.song-what{font-weight:500}
.song-preview iframe{display:block;width:100%;border:0;border-radius:12px;margin-top:8px;background:var(--surface)}
.song-preview iframe.yt{aspect-ratio:16/9;height:auto}
.song-caveat{margin-top:4px;padding:8px 10px;border-radius:var(--radius);background:var(--surface)}

/* the arcade page's players (pixelchar.js: the `character` prompt kind) — phone-sized. The sprite stage keeps the
   game's own night sky (it is the gift's look); the controls around it are the landing's pills. */
.chr{display:flex;flex-direction:column;gap:12px}
.chr-top{display:flex;gap:14px;align-items:flex-start}
.chr-stage{flex:0 0 auto;width:84px;height:112px;border-radius:8px;display:flex;align-items:flex-end;justify-content:center;padding-bottom:10px;
  background:linear-gradient(#1c1840 0 78%, #251e48 78% 80%, #6b5bb0 80% 81%, #251e48 81%);box-shadow:var(--sh-1),inset 0 0 0 1px rgba(0,0,0,.2)}
.chr-cv{width:56px;height:84px;image-rendering:pixelated;image-rendering:crisp-edges}
.chr-side{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}
.chr-name{font-size:.875rem;font-weight:500;color:var(--muted)}
.chr-presets{display:flex;flex-wrap:wrap;gap:6px}
.chr-preset{width:44px;height:52px;border-radius:8px;border:1.5px solid var(--line);background:#2a2450;display:flex;align-items:center;justify-content:center;padding:0;cursor:pointer;
  transition:border-color 150ms ease,transform 140ms var(--ease-out)}
.chr-preset:active{transform:scale(.95)}
.chr-preset:focus-visible{border-color:var(--accent)}
@media (hover:hover) and (pointer:fine){.chr-preset:hover{border-color:var(--ink)}}
.chr-mini{width:24px;height:36px;image-rendering:pixelated;image-rendering:crisp-edges}
.chr-reset{align-self:flex-start}
.chr-groups{display:flex;flex-direction:column;gap:10px}
.chr-row{display:flex;flex-direction:column;gap:2px}
.chr-opts{display:flex;flex-wrap:wrap;gap:0 4px}
.chr-chip{display:inline-flex;align-items:center;min-height:44px;cursor:pointer;-webkit-tap-highlight-color:transparent}
.chr-chip span{display:inline-flex;align-items:center;min-height:34px;padding:4px 13px;border-radius:999px;border:1.5px solid var(--line);background:var(--paper);font:500 .9375rem/1.2 var(--f-text);color:var(--muted);
  transition:background-color 160ms var(--ease-out),color 160ms var(--ease-out),border-color 160ms var(--ease-out)}
.chr-chip input:checked + span{border-color:var(--ink);background:var(--ink);color:var(--paper)}
@media (hover:hover) and (pointer:fine){.chr-chip:hover input:not(:checked) + span{border-color:var(--muted);color:var(--ink)}}
.chr-chip input:focus-visible + span,.chr-sw input:focus-visible + span{outline:2px solid var(--accent);outline-offset:2px}
.chr-sw{position:relative;display:inline-grid;place-items:center;width:44px;height:44px;cursor:pointer}
.chr-sw span:not(.sr-only){display:block;width:32px;height:32px;border-radius:50%;border:2px solid var(--paper);box-shadow:0 0 0 1.5px var(--line-2);transition:box-shadow 150ms ease,transform 150ms var(--ease-out)}
.chr-sw input:checked + span{box-shadow:0 0 0 2.5px var(--ink);transform:scale(1.06)}
.chr-check{display:inline-flex;align-items:center;gap:10px;min-height:44px;font-weight:500;font-size:.9375rem;cursor:pointer}
.chr-check input{width:22px;height:22px;accent-color:var(--ink)}
.chr-players{display:flex;flex-direction:column;gap:8px}
.chr-tabs{display:flex;gap:4px;margin-top:4px;border-bottom:1.5px solid var(--line)}
.chr-tab{flex:1;min-width:0;min-height:44px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:8px 10px;border:0;border-bottom:3px solid transparent;margin-bottom:-1.5px;
  background:none;font:500 .9375rem/1.2 var(--f-text);color:var(--muted);cursor:pointer}
.chr-tab[aria-selected="true"]{color:var(--ink);border-bottom-color:var(--accent)}
.chr-panel{padding-top:10px}

/* ---------- saving: the "it's saved" note, notices, the welcome-back screen ---------- */
.save-note{display:flex;gap:10px;align-items:center;background:rgba(255,253,253,.8);border:1.5px dashed var(--line-2);color:var(--ink);border-radius:var(--radius);padding:8px 12px;margin:0 0 18px;font-size:.9375rem;line-height:1.45}
.save-note p{max-width:none}
.save-note .save-ico{flex:0 0 auto;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:var(--accent2);color:var(--paper);font-size:.8125rem;font-weight:500}
.save-note .kept{font-weight:500}
.save-note .linkish{font-size:.875rem;white-space:nowrap;min-height:32px;position:relative}
.save-note .linkish::after{content:"";position:absolute;inset:-6px -4px}
.save-note.warn-note{background:var(--tint-red);border-color:var(--accent);border-style:solid;color:var(--ink-red)}
.save-note.warn-note .save-ico{background:var(--accent);color:var(--on-accent)}
.save-note.warn-note .linkish{color:var(--ink-red)}

.top-notice{max-width:1320px;margin:14px auto 0;padding:0 var(--gutter)}
.notice-card{display:flex;gap:12px;align-items:flex-start;border-radius:var(--radius);padding:12px 14px;box-shadow:var(--sh-1);background:var(--paper)}
.notice-card p{font-size:1rem;max-width:none}
.notice-card.warn{background:var(--tint-red);color:var(--ink-red);box-shadow:var(--sh-1),inset 4px 0 0 var(--accent)}
.notice-card.nudge{border:1.5px dashed var(--line-2);box-shadow:none;background:rgba(255,253,253,.85)}
.notice-ico{flex:0 0 auto;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-weight:500;color:var(--on-accent);background:var(--accent);font-size:.875rem}
.notice-card.nudge .notice-ico{border-radius:0;background:var(--seal-svg) center/contain no-repeat;color:var(--on-accent);filter:drop-shadow(0 2px 2px rgba(19,31,53,.25))}
.notice-body{flex:1;min-width:0}
.notice-actions{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center;margin-top:8px}

.menu-status{border-radius:var(--radius);padding:8px 12px;background:var(--tint-blue);color:var(--ink-blue)}
.menu-status.warn{background:var(--tint-red);color:var(--ink-red)}
.menu-how{margin-top:12px;text-align:center}
ul.limits{margin:10px 0 12px 1.1em;display:grid;gap:6px;font-size:.9375rem;color:var(--muted)}

.gift-list{list-style:none;display:grid;gap:16px;margin:0 0 22px}
.gift-card{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-areas:"env info" "act act";gap:12px 16px;align-items:start;
  background:var(--paper);border-radius:var(--radius);padding:18px 16px 16px;box-shadow:var(--sh-1)}
.gift-card .gift-env{grid-area:env}
.gift-card .gift-info{grid-area:info;min-width:0}
.gift-card .gift-actions{grid-area:act;display:flex;gap:8px;align-items:center}
.gift-card .gift-actions .continue{flex:1}
.gift-card h2{font-size:1.5rem;margin:0 0 2px;overflow-wrap:anywhere}
.gift-occ{font-family:var(--f-hand);font-size:1.25rem;line-height:1.2;color:var(--accent)}
.gift-meta{font-weight:500;font-size:.9375rem;color:var(--ink);margin-top:4px}
.gift-when{font-size:.875rem;color:var(--muted)}
.gift-pub{display:flex;flex-wrap:wrap;gap:4px 10px;align-items:center;margin-top:6px;font-size:.9375rem}
.badge.pub{background:transparent;border:1.5px solid var(--accent2);color:var(--accent2);border-radius:4px;transform:rotate(-3deg);letter-spacing:.04em}
.gift-pub a{display:inline-flex;align-items:center;min-height:44px}
.gift-more{border:1.5px solid var(--line-2);font-size:1.125rem;letter-spacing:.05em;color:var(--ink)}
@media (min-width:560px){
  .gift-card{grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"env info act";align-items:center}
  .gift-card .gift-actions .continue{flex:0 0 auto}
}
/* a small airmail envelope: blush paper, the red/blue edge, the flap, the wax seal with their initial */
.gift-env{position:relative;width:84px;height:58px;flex:0 0 auto;margin-top:6px;background:var(--surface);
  border:4px solid transparent;border-image:var(--stripe) 4;box-shadow:var(--sh-1);transform:rotate(-3deg)}
.gift-env::before,.gift-env::after{content:'';position:absolute;bottom:0;width:50%;height:62%;background:#f1dede}
.gift-env::before{left:0;clip-path:polygon(0 0,100% 100%,0 100%)}
.gift-env::after{right:0;clip-path:polygon(100% 0,100% 100%,0 100%)}
.ge-flap{position:absolute;inset:0 0 auto 0;height:64%;background:#f3e0e0;clip-path:polygon(0 0,100% 0,50% 100%);z-index:1;filter:drop-shadow(0 2px 1px rgba(19,31,53,.12))}
.ge-seal{position:absolute;left:50%;top:60%;transform:translate(-50%,-50%);z-index:2;width:30px;height:30px;display:grid;place-items:center;
  font:400 .875rem/1 var(--f-display);color:var(--on-accent);background:var(--seal-svg) center/contain no-repeat;filter:drop-shadow(0 2px 2px rgba(19,31,53,.3))}
.ge-stamp{position:absolute;right:-12px;top:-12px;z-index:3;font:500 .8125rem/1.3 var(--f-text);letter-spacing:.06em;color:var(--accent2);background:var(--paper);border:1.5px solid var(--accent2);
  border-radius:4px;padding:0 6px;transform:rotate(9deg)}
.start-new{display:grid;gap:8px;justify-items:center;text-align:center;margin:10px 0 28px}
.start-new .new-gift{width:100%;max-width:420px;border-style:dashed;background:rgba(255,253,253,.7)}
.start-new .new-gift > span[aria-hidden]{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--accent);color:var(--on-accent);font-size:1rem;line-height:1}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}
  .btn:active,.imm-btn:active,.chr-preset:active{transform:none}
}
