/* Intake + login: layout only. Colors, type, buttons, fields, chips and the
   save indicator all come from style.css tokens and components. */
.narrow{max-width:640px}
.progress{margin-bottom:16px;display:grid;gap:6px}
.bar-track{height:6px;border-radius:999px;background:var(--line);overflow:hidden}
.bar-fill{height:100%;background:var(--accent);border-radius:999px;width:0}
@media (prefers-reduced-motion:no-preference){.bar-fill{transition:width .25s}}

main#step:focus{outline:none}
.q{font:600 clamp(24px,5vw,30px)/1.15 var(--display);margin-bottom:6px;text-wrap:balance}
.q-sub{color:var(--muted);margin-bottom:18px;max-width:56ch;text-wrap:pretty}

.choices{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.choice{display:grid;gap:3px;align-content:center;text-align:start;min-height:64px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--field);color:var(--ink);font:inherit;cursor:pointer}
.choice b{font-weight:600;font-size:14.5px;line-height:1.25}
.choice span{font-size:12.5px;color:var(--muted)}
.choice:hover{border-color:var(--accent)}
.choice[aria-pressed="true"]{border-color:var(--accent);background:var(--accent-soft);box-shadow:0 0 0 2px var(--accent)}
.choice:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

.subject{margin-bottom:14px}
.subject-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}
.subject-head h2{font:600 20px/1.2 var(--display)}
.req{color:var(--danger);font-weight:600}
.photo-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.shot{position:relative;width:62px;height:87px;flex:none}
.shot img{width:100%;height:100%;object-fit:cover;border-radius:6px;border:1px solid var(--line);background:var(--bg)}
.shot button{position:absolute;top:-6px;inset-inline-end:-6px;width:24px;height:24px;border-radius:50%;border:1px solid var(--line);background:var(--field);color:var(--ink);font-size:15px;line-height:1;cursor:pointer;display:grid;place-items:center;padding:0}
.shot button:hover{background:var(--danger);color:#fff;border-color:var(--danger)}
.shot.busy img{opacity:.4}
.group-title{font:600 18px/1.2 var(--display);margin:22px 0 4px}
textarea.tight{min-height:44px}

.style-pick{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.style-pick .choice{padding:8px;align-content:start}
.style-pick img{width:100%;aspect-ratio:5/7;object-fit:cover;border-radius:7px;background:#fff;margin-bottom:6px}

.nav{position:sticky;bottom:0;display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:22px;padding:12px 0 calc(12px + env(safe-area-inset-bottom,0px));background:var(--bg);border-top:1px solid var(--line)}
.nav-right{margin-inline-start:auto;display:flex;align-items:center;gap:12px;min-width:0}
.nav-right .small{text-align:end}
.nav .btn{min-height:44px;padding-inline:18px}

.sum{display:grid;gap:10px;margin:0 0 18px}
.sum-row{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.sum-row dt{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin-bottom:2px}
.sum-row dd{margin:0;overflow-wrap:anywhere}
.link-box{display:flex;gap:8px}
.link-box input{flex:1}
.err{color:var(--danger);font-size:13.5px;margin-top:6px}

/* Same field look as style.css's text inputs (which doesn't list password). */
input[type=password]{width:100%;min-width:0;background:var(--field);color:var(--ink);border:1px solid var(--line);border-radius:8px;padding:9px 11px;font:16px/1.4 var(--body);min-height:38px}
input[type=password]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* ---------- fit one screen: no page scroll on the choice steps ----------
   The page is a column exactly one viewport tall: header, progress, the step
   (takes what's left), and the nav. Choice grids size their rows to the room
   available, within a comfortable min/max. Form steps (people, details) are
   naturally longer; they scroll inside while the nav stays put. */
body.intake{padding-block:max(28px,calc(env(safe-area-inset-top) + 12px)) 0;height:100dvh;overflow:hidden}
@media (min-width:900px) and (min-height:820px){body.intake{padding-top:40px}}
@media (max-height:790px){body.intake{padding-top:max(16px,env(safe-area-inset-top))}}
@media (max-height:620px){body.intake{padding-top:max(10px,env(safe-area-inset-top))}}
.intake .wrap.narrow{height:100%;display:flex;flex-direction:column;max-width:720px}
.intake .top{margin-bottom:10px;flex:none}
.intake h1{font-size:clamp(26px,4.2vw + 10px,40px)}
.intake .lede{margin-top:4px}
.intake:not([data-step="occasion"]) .lede{display:none}
.intake .progress{flex:none;margin-bottom:12px}
.progress-row{display:flex;justify-content:space-between;align-items:center;gap:12px}
.intake main#step{flex:1 1 auto;min-height:0;overflow-y:auto;display:flex;flex-direction:column;padding:6px 6px 8px;margin:-6px}
.intake .q{font-size:clamp(22px,3vw + 10px,30px)}
.intake .q-sub{margin-bottom:14px}
.intake .nav{flex:none;position:static;margin-top:0}

.intake .choices{flex:1 1 auto;min-height:0;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(52px,96px);align-content:start}
@media (min-width:640px){.intake .choices{grid-template-columns:repeat(3,minmax(0,1fr))}}
.intake .choice{min-height:0;height:100%;align-content:center}

/* Style step: three looks side by side at every width, the picture as big as
   the screen allows, its name under it. */
.intake .style-pick{flex:1 1 auto;min-height:0;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-content:start}
.intake .style-pick .choice{height:auto;display:flex;flex-direction:column;align-items:center;gap:8px;padding:8px}
.intake .style-pick img{display:block;max-width:100%;width:auto;height:min(calc(100dvh - 302px),calc((100vw - 56px) / 3 * 1.4),420px);aspect-ratio:5/7;object-fit:cover;margin:0}
.intake .style-pick b{font-size:15px;line-height:1.2;text-align:center;text-wrap:balance}
/* Tall phones: all three at once, two on top and one centered under them,
   so each picture is about twice as big as three in a row. */
@media (max-width:640px) and (min-height:700px){
  .intake .style-pick{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .intake .style-pick .choice{padding:6px;gap:6px}
  .intake .style-pick .choice:nth-child(3){grid-column:1 / -1;justify-self:center;width:calc(50% - 4px)}
  .intake .style-pick img{height:min(calc((100dvh - 400px) / 2),calc((100vw - 64px) / 2 * 1.4))}
  .intake .style-pick b{font-size:14px}
}

/* Short screens (landscape phones, small laptops): tighten everything. */
@media (max-height:620px){
  .intake .lede{display:none}
  .intake h1{font-size:24px}
  .intake .top{margin-bottom:6px}
  .intake .q-sub{display:none}
  .intake .choices{grid-auto-rows:minmax(44px,1fr)}
  .intake .nav .btn{min-height:40px}
  .intake .style-pick img{height:calc(100dvh - 215px)}
}

/* ---------- shared questions: pick-lists ("chips") + add-your-own ---------- */
.intake .chips{gap:8px;margin:0 0 14px}
.intake .chips .opt label{padding:9px 14px;font-size:14.5px}
.add-own{display:flex;gap:8px;max-width:420px}
.add-own input{flex:1;min-width:0}

/* ---------- names step ---------- */
.intake .subject{padding:12px 14px;margin-bottom:10px;display:grid;gap:10px}
.subject-fields{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end}
.subject-fields .field{flex:1 1 180px;margin:0}
.intake .subject{position:relative}
/* × on the row's corner, like the photo and version tiles (44px tap area) */
.subject-x{position:absolute;top:-12px;inset-inline-end:-12px;width:44px;height:44px;padding:0;border:0;background:none;cursor:pointer;display:grid;place-items:center}
.subject-x span{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--field);border:1px solid var(--line);color:var(--ink);font:600 15px/1 var(--body);transition:background .12s,color .12s}
.subject-x:hover span{background:var(--danger);border-color:var(--danger);color:#fff}
.subject-x:focus-visible{outline:none}
.subject-x:focus-visible span{outline:2px solid var(--accent);outline-offset:2px}
.couple-q{margin:4px 0 14px}
.couple-q legend{font-weight:600;font-size:13.5px;margin-bottom:6px}
.intake main#step > .row{margin-top:2px}

/* Places & moments: four short fields; "anything else / avoid" folds away.
   Two columns on wide screens. */
.intake[data-step="more"] #step .field{margin-bottom:12px;gap:4px}
.more-extra{margin-top:2px}
.more-extra summary{cursor:pointer;color:var(--accent);font-size:14px;font-weight:600;padding:8px 0;min-height:40px;list-style-position:inside}
.more-extra[open] summary{margin-bottom:6px}
.intake[data-step="more"] #step input[type=text]{padding-block:7px;min-height:36px}
.intake[data-step="more"] .chips{margin-bottom:6px}
.more-grid{display:grid;grid-template-columns:minmax(0,1fr);column-gap:14px}
@media (max-height:700px){
  .intake[data-step="more"] .q-sub{display:none}
  .intake[data-step="more"] .q{margin-bottom:8px}
  .intake[data-step="more"] #step .field>label{font-size:13px}
}
@media (min-width:640px){
  .more-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .more-extra[open]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:14px}
  .more-extra summary{grid-column:1/-1}
}
@media (max-height:620px){
  .intake .chips{gap:6px;margin-bottom:8px}
  .intake .chips .opt label{padding:6px 11px;font-size:13.5px}
}
@media (max-height:420px){
  .intake[data-step="more"] .q{display:none}
  .intake[data-step="more"] #step .field{margin-bottom:6px}
}

/* ---------- entry screen ---------- */
.intake[data-step="entry"] .top{margin-bottom:4px}
/* The welcome screen sits a short way under the logo, not mid-page (audit F23) */
.entry{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;margin:min(6dvh,56px) 0 auto;padding-block:4px}
.entry-title{font:600 clamp(26px,4vw + 10px,40px)/1.1 var(--display);text-wrap:balance;max-width:18ch}
.entry-sub{color:var(--muted);max-width:44ch;text-wrap:pretty}
.fan{display:flex;justify-content:center;align-items:flex-end;margin:6px 0 0;height:min(30dvh,200px,calc((100vw - 40px) * .46))}
.fan-card{height:100%;aspect-ratio:5/7;margin-inline:-5%;transform:rotate(var(--tilt));transform-origin:50% 90%}
.fan-card:nth-child(2){z-index:1;transform:translateY(-6%)}
.fan-card .card{height:100%;width:auto}
.fan-wrap{display:grid;justify-items:center;gap:14px;margin-top:6px}
.fan-label{font:500 11px/1 var(--mono, ui-monospace, monospace);letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.entry .entry-for{margin-top:6px}
/* "Who's it for?": the answer is the start button, two equal choices side by side */
.entry-for{display:grid;grid-template-columns:1fr 1fr;gap:8px 10px;width:min(100%,360px)}
.entry-for-q{grid-column:1/-1;margin:0;font-weight:600;font-size:15px}
.entry-for .entry-cta{padding-inline:12px;width:100%}
.entry-price{font-weight:600;color:var(--ok)}
.entry-cta{min-height:48px;padding-inline:28px;font-size:16px}
.ticks{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;justify-content:center;gap:4px 16px;font-size:13.5px;color:var(--muted)}
.ticks li::before{content:"✓ ";color:var(--ok);font-weight:700}
.how-open{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 14px 0 8px;border:0;border-radius:999px;background:none;color:var(--accent);font:600 14.5px/1 var(--body);cursor:pointer}
.how-open svg{width:26px;height:26px;flex:none}
.how-open svg circle{fill:var(--accent-soft)}
.how-open svg path{fill:var(--accent)}
.how-open small{font-weight:500;color:var(--muted);font-size:13px}
.how-open:hover{background:var(--accent-soft)}
.how-open:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media (max-height:700px){.entry-sub{font-size:14px}.fan{height:min(24dvh,170px,calc((100vw - 40px) * .46))}}
@media (max-height:560px){.fan-wrap{display:none}}
/* Entry reel (reel.js): a 600x440 stage scaled to fit; the caption and the
   story-style bar sit above it. Its pictures carry their own white paper. */
.reel{--rh:min(calc(100dvh - 300px),520px);position:relative;display:grid;justify-items:center;gap:8px;width:min(100%,calc(var(--rh) * 600 / 440))}
.reel-bar{display:flex;gap:4px;width:100%}
.reel-bar i{flex:1;height:3px;border-radius:2px;background:color-mix(in srgb,var(--ink) 14%,transparent);overflow:hidden}
.reel-bar b{display:block;height:100%;background:var(--accent);transform:scaleX(0);transform-origin:left}
.reel-cap{margin:2px 0 0;font:600 clamp(17px,1.4vw + 11px,21px)/1.25 var(--display);color:var(--ink);min-height:1.25em}
.reel-cap.in{animation:capIn .4s var(--ease-out)}
@keyframes capIn{from{opacity:0;transform:translateY(6px)}}
.reel-stage{position:relative;width:100%;aspect-ratio:600/440;overflow:hidden;border-radius:16px;cursor:pointer;
  background:radial-gradient(120% 90% at 50% 38%,var(--panel),color-mix(in srgb,var(--bg) 70%,var(--line)));
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--line) 70%,transparent)}
.reel-world{position:absolute;left:0;top:0;width:600px;height:440px;transform-origin:0 0;user-select:none;-webkit-user-select:none}
.ra{position:absolute;left:0;top:0;width:0;height:0}
.ra-in{position:absolute;left:0;top:0;transform:translate(-50%,-50%)}
.reel img{display:block;-webkit-user-drag:none}
.rcard{width:120px;height:168px;perspective:800px}
.rflip{position:relative;width:100%;height:100%;transform-style:preserve-3d}
.rflip img{position:absolute;inset:0;width:100%;height:100%;border-radius:7px;backface-visibility:hidden;-webkit-backface-visibility:hidden;
  box-shadow:0 0 0 1px rgba(0,0,0,.1),0 8px 18px -8px rgba(20,20,30,.5)}
.rflip .rb{transform:rotateY(180deg)}
.rphoto{width:140px;padding:7px;background:#fff;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.06),0 12px 24px -12px rgba(20,20,30,.55)}
.rp-box{position:relative;aspect-ratio:4/5;overflow:hidden;background:#fff}
.rp-box img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.rp-box .rp-paint{inset:-2px;width:calc(100% + 4px);height:calc(100% + 4px)}
.rp-edge{position:absolute;top:0;bottom:0;left:0;width:20px;margin-left:-10px;background:linear-gradient(90deg,transparent,rgba(255,255,255,.9),transparent);filter:blur(2px)}
.rspark{display:block;width:26px;height:26px;color:#d9a441}
.rspark svg{width:100%;height:100%;fill:currentColor}
.rchip{position:relative;display:inline-flex;align-items:center;gap:5px;padding:9px 16px 9px 13px;border-radius:999px;white-space:nowrap;
  background:var(--field);color:var(--ink);box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--muted) 70%,transparent),0 3px 8px -5px rgba(0,0,0,.3);font:500 19px/1 var(--body)}
.rchip-fill{position:absolute;inset:0;border-radius:inherit;background:var(--accent-soft);box-shadow:inset 0 0 0 1.5px var(--accent)}
.rchip-tick{position:relative;font-style:normal;font-weight:700;color:var(--accent)}
.rchip > span{position:relative}
.rtap{display:block;width:44px;height:44px;border-radius:50%;background:var(--accent)}
.rbadge{display:inline-flex;align-items:center;gap:8px;padding:11px 20px;border-radius:999px;background:var(--ok);color:var(--bg);font:600 21px/1 var(--body);white-space:nowrap;box-shadow:0 8px 18px -8px rgba(0,0,0,.45)}
.rbadge i{font-style:normal}
.reel-ctl{position:absolute;right:4px;bottom:4px;display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--ink);cursor:pointer}
.reel-ctl::before{content:"";position:absolute;inset:7px;border-radius:50%;background:color-mix(in srgb,var(--panel) 85%,transparent);box-shadow:0 0 0 1px var(--line),0 2px 6px -2px rgba(0,0,0,.25)}
.reel-ctl svg{position:relative;width:15px;height:15px;fill:currentColor}
.reel-prev{right:46px}
.reel-bar i{cursor:pointer;height:15px;padding-block:6px;background-clip:content-box}
.reel-bar b{border-radius:2px}
/* Scene 2: the three styles, the picked one ringed */
.rstyle{position:relative;display:grid;justify-items:center;gap:6px}
.rstyle img{width:112px;aspect-ratio:5/7;object-fit:cover;border-radius:8px;background:#fff;box-shadow:0 0 0 1px rgba(0,0,0,.08),0 10px 20px -12px rgba(20,20,30,.5)}
.rstyle b{font:600 15px/1.2 var(--body);color:var(--ink);white-space:nowrap}
.rstyle-ring{position:absolute;left:-6px;right:-6px;top:-6px;height:calc(112px * 7 / 5 + 12px);border:3px solid var(--accent);border-radius:12px}
/* Scene 6: the squared deck turns over; its edges stay put underneath */
.rdeck{position:relative;width:120px;height:168px;perspective:900px;border-radius:7px;box-shadow:1.5px 1.5px 0 #ece9e1,3px 3px 0 #dcd8ce,4.5px 4.5px 0 #ece9e1,6px 6px 0 #d2cec4,0 16px 26px -10px rgba(20,20,30,.55)}
.rdeck-back{position:absolute;inset:0;border-radius:7px;overflow:hidden;backface-visibility:hidden;-webkit-backface-visibility:hidden}
.rshine{position:absolute;inset:0;background:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.8) 50%,transparent 70%)}
.reel-ctl:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.entry-for.nudge .entry-cta{box-shadow:0 0 0 0 color-mix(in srgb,var(--accent) 45%,transparent);animation:nudge 1.6s var(--ease-out) 2}
@keyframes nudge{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--accent) 45%,transparent)}100%{box-shadow:0 0 0 14px transparent}}
@media (max-height:500px){.reel{--rh:calc(100dvh - 215px)}.hd-note,.hd-inner .entry-for-q{display:none}.hd-inner{gap:6px;padding-block:6px}}
/* The "How it works" dialog: full screen on phones, a centered sheet on
   wider screens. The inner box carries the padding, so a click on the
   dialog itself is a click on the backdrop. */
.how-dialog{padding:0;border:0;background:var(--bg);color:var(--ink);width:100%;max-width:100%;height:100%;max-height:100%;margin:0}
.how-dialog::backdrop{background:rgb(10 14 18 / .55)}
.hd-inner{box-sizing:border-box;min-height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:max(14px,env(safe-area-inset-top)) 16px max(18px,env(safe-area-inset-bottom))}
.hd-head{align-self:stretch;display:flex;align-items:center;justify-content:space-between;gap:12px}
.hd-head h2{margin:0;font:600 22px/1.2 var(--display)}
.hd-x{width:44px;height:44px;margin-inline-end:-8px;border:0;border-radius:50%;background:none;color:var(--ink);font:400 30px/1 var(--body);cursor:pointer}
.hd-x:hover{background:var(--accent-soft)}
.hd-x:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.hd-body{display:grid;justify-items:center;width:100%}
.hd-note{max-width:52ch;text-align:center;color:var(--muted);margin:0}
.how-steps{margin:0;padding-inline-start:1.3em;display:grid;gap:10px;max-width:44ch;font-size:16px}
@media (min-width:700px) and (min-height:560px){
  .how-dialog{width:min(760px,calc(100vw - 48px));height:auto;max-height:calc(100dvh - 48px);margin:auto;border-radius:18px;box-shadow:0 30px 80px -20px rgb(0 0 0 / .5)}
  .hd-inner{min-height:0;padding:18px 24px 24px}
  .how-dialog .reel{--rh:min(calc(100dvh - 360px),480px)}
}
@media (prefers-reduced-motion:no-preference){
  .how-dialog[open]{animation:hdIn .32s var(--ease-out)}
  .how-dialog[open]::backdrop{animation:hdFade .32s ease-out}
  @keyframes hdIn{from{opacity:0;transform:translateY(16px) scale(.98)}}
  @keyframes hdFade{from{opacity:0}}
}

/* ---------- occasion icons ---------- */
.occ-icon{width:24px;height:24px;fill:none;stroke:var(--accent);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;margin-bottom:2px}
@media (max-height:620px){.occ-icon{display:none}}

/* ---------- favorites counter, deck so far ---------- */
.fav-count{display:block;margin-top:2px;font-weight:600;color:var(--accent)}
.fav-count.ok{color:var(--ok)}

/* ---------- photo step ---------- */
.photo-tips{display:flex;gap:12px;margin-bottom:12px}
.tip{flex:1;display:flex;gap:10px;align-items:center;margin:0;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--panel);font-size:12.5px;line-height:1.35;color:var(--muted)}
.tip svg{width:36px;height:45px;flex:none;fill:none;stroke:var(--ink);stroke-width:2.5;stroke-linecap:round}
.tip svg .dot{fill:var(--ink);stroke:none}
.tip svg .dark{fill:color-mix(in srgb,var(--ink) 18%,transparent)}
.tip svg .shade{stroke-width:4}
.tip b{display:block;color:var(--ink);font-size:13px}
.tip.good b::before{content:"✓ ";color:var(--ok)}
.tip.weak b::before{content:"✕ ";color:var(--danger)}
.photo-subject{padding:10px 12px;margin-bottom:8px;display:grid;gap:8px}
.ps-name{font-weight:600}
/* What each one loves: one panel per person/pet */
.loves{display:grid;gap:10px}
.loves-subject{padding:10px 12px;display:grid;gap:8px}
.loves-subject .ps-name{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin:0}
.loves-count{font-weight:400}
.loves-subject .small{margin:0}
.loves-subject .opt input:disabled + label{opacity:.45;cursor:not-allowed}
@media (min-width:900px){.loves{grid-template-columns:repeat(auto-fit,minmax(380px,1fr))}}
.linklike{background:none;border:0;padding:6px 0;color:var(--accent);font:inherit;font-size:14px;text-decoration:underline;cursor:pointer;text-align:start}
/* Check your answers: one card, grouped rows split by hairlines, a quiet
   "Change" link on each (the checkout-review pattern), and a summary card with
   the promise and what happens next. */
.rv{width:100%;max-width:820px;margin-inline:auto;border:1px solid var(--line);border-radius:14px;background:var(--panel)}
.rv-group + .rv-group{border-top:1px solid var(--line)}
.rv + .rv{margin-top:14px}
.rv-h{margin:0;padding:12px 16px 2px;font:600 12px/1.4 inherit;font-family:inherit;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.rv-row{display:grid;grid-template-columns:minmax(118px,30%) minmax(0,1fr) auto;align-items:center;column-gap:14px;min-height:48px;padding:8px 16px;text-align:start}
.rv-row + .rv-row{border-top:1px solid color-mix(in srgb,var(--line) 60%,transparent)}
.rv-k{color:var(--muted);font-size:14px}
.rv-v{min-width:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.rv-v .muted{color:var(--muted)}
.rv-extra .rv-v{display:grid;gap:4px;overflow:visible;-webkit-line-clamp:none}
.rv-extra .rv-v input{width:100%}
.rv-note{color:var(--muted)}
.link-btn,.rv-edit,.rv-add{justify-self:end;min-height:44px;padding:0 4px;border:0;background:none;color:var(--accent);font:inherit;font-size:15px;font-weight:600;text-decoration:none;text-underline-offset:3px;cursor:pointer}
.rv-add{justify-self:start;padding-inline:0}
.link-btn:hover,.rv-edit:hover,.rv-add:hover,.link-btn:focus-visible,.rv-edit:focus-visible,.rv-add:focus-visible{text-decoration:underline}
.rv-faces{display:flex;flex-wrap:wrap;gap:6px 14px}
.rv-face{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.rv-face img,.rv-av{width:28px;height:28px;border-radius:50%;object-fit:cover;flex:none}
.rv-av{display:grid;place-items:center;border:1.5px dashed var(--muted);color:var(--muted);font-size:15px;line-height:1}
.rv-face.missing{color:var(--muted)}
.rv-style{display:inline-flex;align-items:center;gap:8px}
.rv-style img{width:24px;height:34px;border-radius:3px;object-fit:cover;box-shadow:0 0 0 1px var(--line)}
.rv-faces,.rv-style{vertical-align:middle}
.rv-v:has(.rv-faces,.rv-style){display:block}
.rv-side{width:100%;max-width:820px;margin:14px auto 0;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--panel);text-align:start}
.rv-side .entry-price{margin:0}
.rv-side ol{margin:6px 0 0;padding-inline-start:1.2em;font-size:14px;color:var(--muted);display:grid;gap:4px}
@media (max-width:480px){
  .rv-row{grid-template-columns:minmax(0,1fr) auto;row-gap:2px;padding-block:10px}
  .rv-k{grid-column:1;font-size:13px}
  .rv-v{grid-column:1}
  .rv-edit{grid-column:2;grid-row:1 / span 2}
  .rv-extra .rv-v{grid-column:1 / -1}
}
.next-up{margin:12px 0 4px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.next-up ol{margin:6px 0 0;padding-inline-start:1.2em;font-size:14px;color:var(--muted)}

/* Tilted fan cards poke past the layout box; never let that scroll the page. */
html:has(body.intake){height:100%;overflow:hidden}
.intake main#step{overflow-x:hidden}

/* Very short screens (phone landscape): text-only photo tips, tighter names step. */
@media (max-height:420px){
  .intake[data-step="style"] .q-sub,.intake[data-step="people"] .q-sub,.intake[data-step="photos"] .q-sub{display:none}
  .intake[data-step="style"] .style-pick img{height:calc(100dvh - 235px)}
  .tip svg{display:none}
  .tip{padding:4px 8px}
  .photo-tips{margin-bottom:6px}
  .photo-subject{padding:6px 10px;gap:4px;margin-bottom:6px}
  .intake .subject{padding:8px 10px;margin-bottom:6px}
  .intake[data-step="people"] .field>label{font-size:12.5px}
  .intake[data-step="more"] #step .field{margin-bottom:4px}
}
@media (max-height:420px) and (min-width:640px){
  #subjects,#photo-rows{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:10px}
  .intake[data-step="photos"] #step > .small{display:none}
  .intake[data-step="more"] .add-own input,.intake[data-step="more"] #step input[type=text]{min-height:32px;padding-block:5px}
}

/* Copy-driven lines: notices, name-based encouragement, occasion tone line. */
.notice{padding:10px 12px;border:1px solid var(--warn);border-radius:10px;background:color-mix(in srgb,var(--warn) 10%,transparent);font-size:14px;max-width:60ch}
.cheer{font-size:13.5px;color:var(--ok);font-weight:500;margin:0}
.tone-line{font:italic 500 18px/1.4 var(--display);margin:4px 0 10px}
#nav-hint.is-error{color:var(--danger)}
.nav .btn{white-space:nowrap;flex:none}

/* iPhone zooms into any field under 16px when tapped; 16px stops that
   without blocking pinch-zoom. */
.intake input[type=text],.intake input[type=number],.intake textarea,.intake select{font-size:16px}
@media (max-height:700px){.intake[data-step="more"] #step .field{margin-bottom:5px}}
@media (max-height:420px){.intake[data-step="more"] #step .field{margin-bottom:3px;gap:2px}}

/* ---------- portraits (Phase 4) ---------- */
.cast-strip{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 8px;margin-bottom:10px}
.cast-chip{flex:none;display:flex;align-items:center;gap:8px;min-height:44px;padding:4px 14px 4px 5px;border:1px solid var(--line);border-radius:999px;background:var(--field);color:var(--ink);font:500 13px var(--body);cursor:pointer}
.cc-txt{display:grid;text-align:start;line-height:1.2}
.cc-txt b{font-weight:600;font-size:13.5px}
.cc-txt small{font-size:12px;color:var(--muted)}
.cast-chip img,.cast-blank{width:34px;height:34px;border-radius:50%;object-fit:cover;object-position:top;background:var(--bg);flex:none}
.cast-chip.on{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent)}
.cast-chip[disabled]{cursor:default;opacity:.85}
.cast-chip.st-approved{border-color:var(--ok)}
.cast-chip.st-working .cast-blank,.cast-chip.st-queued .cast-blank{animation:pulse 1.4s ease-in-out infinite}
@keyframes pulse{50%{opacity:.4}}
@media (prefers-reduced-motion:reduce){.cast-chip .cast-blank{animation:none}}
.approve-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.portrait{margin:0 auto 8px;display:grid;justify-items:center;gap:4px}
.portrait img{height:min(48dvh,440px);max-width:100%;aspect-ratio:5/7;object-fit:cover;border-radius:10px;border:1px solid var(--line);background:#fff;box-shadow:0 6px 18px -10px rgba(0,0,0,.45)}
.approve-q{font:600 20px/1.25 var(--display);text-align:center}
.role-line{text-align:center}
.approve-actions{justify-content:center;margin:10px 0}
.approve-actions .btn{min-height:46px;padding-inline:18px}
.redo{display:grid;gap:10px;margin-top:6px}
.redo-label{font-weight:600;font-size:14px}
.wait-leave{margin-top:14px;font-weight:500}
@media (max-height:700px){.portrait img{height:40dvh}}
@media (max-height:420px){.portrait img{height:30dvh}.approve-actions{margin:6px 0}.cast-strip{margin-bottom:4px;padding-bottom:4px}}
.answers-link{display:block;margin-top:14px}
.email-box{display:grid;gap:6px;margin-top:14px;max-width:420px}
.email-box label{font-weight:600;font-size:14px}
.intake input[type=email]{width:100%;min-width:0;background:var(--field);color:var(--ink);border:1px solid var(--line);border-radius:8px;padding:9px 11px;font:16px/1.4 var(--body);min-height:38px}

/* ---------- reveal (Phase 6) ---------- */
.reveal-cover,.reveal-one{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center}
.reveal-card canvas{display:block;height:min(62dvh,560px);width:auto;max-width:100%;border-radius:14px;box-shadow:0 0 0 1px rgba(0,0,0,.12),0 14px 34px -14px rgba(0,0,0,.5);background:#fff}
.reveal-why{font:italic 500 19px/1.4 var(--display);max-width:32ch;text-wrap:balance}
.reveal-nav{justify-content:center}
.swipe-hint{opacity:.8}
@media (pointer:fine){.swipe-hint{display:none}}
/* The whole deck: like the deck screen before paying, the cards in rows
   and the back apart, beside them (below them on phones). */
.reveal-grid-wrap{display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center}
.reveal-grid-wrap .q{margin:0}
/* Phones: one 4×4 grid, the back as the last tile */
.reveal-deck{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;width:min(100%,400px,calc((100dvh - 290px) / 4 * .735 * 4 + 24px));align-items:start}
.reveal-grid{display:contents}
.reveal-grid canvas{width:100%;height:auto;border-radius:7px;box-shadow:0 0 0 1px rgba(0,0,0,.12),0 4px 10px -5px rgba(0,0,0,.4);cursor:pointer;background:#fff}
.reveal-grid canvas:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.reveal-back{margin:0;display:grid;justify-items:center;gap:6px}
.reveal-back canvas{width:100%;height:auto;border-radius:7px;box-shadow:0 0 0 1px rgba(0,0,0,.12),0 6px 14px -6px rgba(0,0,0,.45);background:#fff}
.reveal-back figcaption{margin:0;color:var(--muted);font-size:12px}
@media (min-width:560px){
  .reveal-deck{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:28px;width:100%}
  .reveal-grid{display:grid;gap:10px;grid-template-columns:repeat(5,minmax(0,1fr));width:min(calc(100% - 150px),620px,calc((100dvh - 340px) / 3 * .735 * 5 + 32px))}
  .reveal-back canvas{width:clamp(90px,14vw,130px)}
}
/* Share: one tap to WhatsApp, Messages (phones), email, or copy the link */
.share-box{display:grid;justify-items:center;gap:8px}
.share-h{margin:0;font-weight:600}
.share-row{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 10px}
.share-b{display:grid;justify-items:center;gap:4px;min-width:72px;padding:6px 4px;border:0;background:none;color:var(--ink);font:500 13px/1.2 var(--body);text-decoration:none;cursor:pointer;border-radius:12px}
.share-b svg{width:48px;height:48px;padding:12px;box-sizing:border-box;border-radius:50%;background:var(--field);border:1px solid var(--line);fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:background .12s}
.share-b:hover svg{background:var(--bg)}
.share-b:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.reveal-page main#step{overflow-y:auto}
@media (max-height:700px){.reveal-card canvas{height:52dvh}}
.steps-line{list-style:none;padding:0;margin:8px 0 6px;display:grid;gap:8px}
.steps-line li{padding-inline-start:26px;position:relative;color:var(--muted)}
.steps-line li::before{content:"";position:absolute;inset-inline-start:4px;top:.45em;width:10px;height:10px;border-radius:50%;border:2px solid var(--line)}
.steps-line li.done{color:var(--ink)}
.steps-line li.done::before{background:var(--ok);border-color:var(--ok)}
.steps-line li.now{color:var(--ink);font-weight:600}
.steps-line li.now::before{border-color:var(--accent);background:var(--accent-soft)}
/* Phone landscape: the reveal card shrinks so the buttons stay on screen. */
@media (max-height:480px){
  .reveal-card canvas{height:58dvh}
  .reveal-cover .entry-title{display:none}
  .reveal-one,.reveal-cover{gap:6px}
  .reveal-why{font-size:15px}
  .swipe-hint,.reveal-count{display:none}
  .reveal-page .top{margin-bottom:0}
  .reveal-page h1{font-size:20px}
}
/* ---------- after the answers: one centered stage per screen ---------- */
/* Every app screen starts just under the header, like the questions (audit F23) */
.stage{margin-block:12px auto;display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;width:100%}
.stage .q,.stage .q-sub{margin:0}
.stage .q-sub{max-width:46ch}
.stage .small{max-width:52ch;margin:0}
.stage .answers-link{margin-top:4px}
.stage .linklike{min-height:44px;text-align:center}
.stage .approve-head{width:100%}
.stage .cast-strip{max-width:100%}
.stage .portrait{margin-bottom:0}

/* The approved cast, big enough to see who's who; tap opens a portrait. */
.cast-big{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin:6px 0}
.cast-card{display:grid;gap:6px;justify-items:center;padding:0;border:0;background:none;color:var(--ink);font:600 14px var(--body);cursor:pointer;border-radius:12px}
.cast-card img{width:clamp(84px,24vw,150px);height:auto;aspect-ratio:5/7;object-fit:cover;object-position:top;border-radius:10px;border:1px solid var(--line);background:#fff;box-shadow:0 8px 20px -14px rgba(0,0,0,.55);transition:transform .15s}
.cast-card:hover img{transform:translateY(-2px)}
.cast-card i{font-style:normal;color:var(--ok)}
.cast-card:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.cast-big:has(.cast-card:nth-child(4)) .cast-card img{width:clamp(64px,18vw,110px)}
.create-form{display:grid;gap:10px;justify-items:center;width:min(100%,400px);margin-top:4px}
.create-form .field{width:100%;text-align:start;margin:0}
.create-form .field .small{margin-top:4px}

/* Creating: 15 slots fill in as each card design is done. */
.deck-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;width:min(100%,460px,max(210px,calc((100dvh - 470px) * 1.19)))}
.deck-screen:has(.meter) .deck-grid{width:min(100%,460px,calc((100dvh - 330px) * 1.19))}
.slot{aspect-ratio:5/7;border-radius:6px;border:1px dashed var(--line);background:var(--panel);overflow:hidden}
.slot img{width:100%;height:100%;object-fit:cover;display:block}
.slot.done{border:1px solid var(--line);background:#fff}
.slot.now{border:1px solid var(--accent);background:var(--accent-soft)}
@media (prefers-reduced-motion:no-preference){.slot.now{animation:pulse 1.4s ease-in-out infinite}.slot.done :is(img,canvas){animation:slotIn .5s ease-out}}
@keyframes slotIn{from{opacity:0;transform:scale(.92)}}
.meter{width:min(100%,420px);height:6px;border-radius:99px;background:var(--line);overflow:hidden}
.meter i{display:block;height:100%;background:var(--accent);border-radius:99px;transition:width .4s}
.create-count{margin:0;font-size:15px}
.slot{position:relative;display:grid;place-items:center}
.slot-idx{position:absolute;top:5%;inset-inline-start:8%;display:grid;justify-items:center;font:700 clamp(9px,2.6vw,13px)/1 var(--display);color:#1f2a30;z-index:1}
.slot-idx i{font-style:normal;font-size:1.05em;line-height:1.1}
.slot-idx.red{color:#b03a2e}
.slot:not(.done) .slot-idx{position:static;font-size:clamp(14px,4.5vw,22px);opacity:.38;color:var(--ink)}
.slot:not(.done) .slot-idx.red{color:#b03a2e}
.slot.done img{position:absolute;inset:0}

/* Waiting for portraits: big card per person, a loader until it's ready. */
.cast-card small{font:500 12.5px var(--body);color:var(--muted);margin-top:-4px}
.cast-card[disabled]{cursor:default}
.card-wait{display:grid;place-items:center;width:clamp(84px,24vw,150px);aspect-ratio:5/7;border-radius:10px;border:1px dashed var(--line);background:var(--panel)}
.cast-big:has(.cast-card:nth-child(4)) .card-wait{width:clamp(64px,18vw,110px)}
/* Landscape phones: portrait cards sized by height, not width. */
@media (max-height:500px){.cast-card img,.card-wait,.cast-big:has(.cast-card:nth-child(4)) .card-wait,.cast-big:has(.cast-card:nth-child(4)) .cast-card img{width:auto;height:20dvh}.stage{gap:6px}.stage .email-box .small{display:none}.cast-card small{display:none}}
.spinner{width:26px;height:26px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--accent)}
.cast-blank.spin{border:2px solid var(--line);border-top-color:var(--accent);background:none;box-sizing:border-box}
@media (prefers-reduced-motion:no-preference){.spinner,.cast-chip .cast-blank.spin{animation:spin .9s linear infinite}}
@keyframes spin{to{transform:rotate(360deg)}}
.eta{margin:0;font-weight:600;font-size:15px}
.dots{display:inline-block;width:1.2em;text-align:start}
.dots::after{content:"…"}
@media (prefers-reduced-motion:no-preference){.dots::after{content:"";animation:dots 1.2s steps(1) infinite}}
@keyframes dots{0%{content:""}25%{content:"."}50%{content:".."}75%{content:"..."}}

/* Preview: cards drawn on canvas with a light "Preview" mark. */
.pv-card{position:relative;display:inline-block;border-radius:10px;overflow:hidden;box-shadow:0 0 0 1px rgba(0,0,0,.12),0 12px 28px -14px rgba(0,0,0,.5);background:#fff}
.pv-card canvas{display:block;height:100%;width:auto}
.pv-fan{position:relative;height:min(30dvh,250px);aspect-ratio:1.5;border:0;padding:0;background:none;cursor:pointer;margin:6px 0}
.pv-fan .pv-card{position:absolute;left:50%;top:4%;height:88%;transform-origin:50% 115%}
.pv-fan .f0{transform:translateX(-50%) rotate(-18deg)}
.pv-fan .f1{transform:translateX(-50%) rotate(-6deg)}
.pv-fan .f2{transform:translateX(-50%) rotate(6deg)}
.pv-fan .f3{transform:translateX(-50%) rotate(18deg)}
.pv-fan.solo{aspect-ratio:auto;width:auto;cursor:default}
.pv-fan.solo .f0{position:static;transform:none;height:100%;display:block}
.pv-fan:focus-visible{outline:2px solid var(--accent);outline-offset:4px;border-radius:12px}
.viewer .pv-card.big{height:min(52dvh,520px)}
.viewer .reveal-nav{justify-content:center;margin:0}
.viewer .redo{width:min(100%,460px);text-align:start}
.viewer.changing .pv-card.big{height:min(26dvh,300px)}
.viewer.changing .reveal-why{display:none}
/* Versions of a changed card: tap one to put it back in the deck */
.viewer .versions{display:grid;gap:4px;justify-items:center;width:min(100%,460px)}
.viewer .versions .small{margin:0}
.ver-row{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.ver{display:flex;align-items:center;gap:8px;min-height:44px;padding:5px 12px 5px 5px;border:1px solid var(--line);border-radius:12px;background:var(--field);color:var(--ink);font:inherit;font-size:13px;cursor:pointer;text-align:start}
.ver canvas{width:38px;height:auto;aspect-ratio:91/124;border-radius:4px;box-shadow:0 1px 3px rgb(0 0 0 / .15)}
.ver img{width:38px;height:auto;aspect-ratio:5/7;object-fit:cover;border-radius:4px;background:#fff;box-shadow:0 1px 3px rgb(0 0 0 / .15)}
.portrait-versions{display:grid;justify-items:center;width:100%}
.ver-txt{display:grid;gap:1px;line-height:1.2}
.ver b{font-size:13px;color:var(--accent)}
.ver.on{border:2px solid var(--accent);padding:4px 11px 4px 4px;background:var(--accent-soft);cursor:default}
.ver.on b{color:var(--ink)}
.ver:disabled{opacity:.6}
.ver:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.viewer.has-versions:not(.changing) .pv-card.big{height:min(42dvh,460px)}
@media (max-height:700px){.viewer.has-versions:not(.changing) .pv-card.big{height:36dvh}.viewer .versions .small{display:none}}
@media (max-height:450px){.viewer.has-versions:not(.changing) .pv-card.big{height:30dvh}}
.viewer.changing .versions{display:none}
@media (max-height:700px){.viewer .pv-card.big{height:44dvh}.pv-fan{height:24dvh}}

.pay{display:grid;gap:8px;justify-items:center;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:var(--panel);width:min(100%,420px)}
.pay-price{margin:0;font-size:17px}
.pay .small{margin:0}

/* ---------- spacing rhythm: headline + subtext pair, then room before content ---------- */
.q{margin-bottom:8px}
.stage{gap:14px}
.stage .q + .q-sub{margin-top:-8px}
.stage .q-sub + *{margin-top:4px}
.small{line-height:1.45}
.q-sub{line-height:1.5}
@media (max-height:700px){.stage{gap:10px}.stage .q-sub + *{margin-top:0}}
@media (max-height:500px){.stage{gap:6px}.stage .q + .q-sub{margin-top:-4px}}

/* ---------- motion (all of it off for reduced motion) ---------- */
:root{--ease-out:cubic-bezier(.2,.8,.2,1);--ease-spring:cubic-bezier(.34,1.5,.64,1)}
@media (prefers-reduced-motion:no-preference){
  /* Screen to screen: slide forward / back (View Transitions) */
  #step{view-transition-name:step}
  /* Old screen leaves first (fast), then the new one slides in: no overlapping text. */
  ::view-transition-old(step){animation:vt-out .16s ease-in both}
  ::view-transition-new(step){animation:vt-in .34s var(--ease-out) .12s both}
  html[data-nav="back"]::view-transition-old(step){animation-name:vt-out-back}
  html[data-nav="back"]::view-transition-new(step){animation-name:vt-in-back}
  html[data-nav="up"]::view-transition-old(step){animation-name:vt-fade}
  html[data-nav="up"]::view-transition-new(step){animation-name:vt-rise}
  ::view-transition-group(root){animation-duration:.3s}
  @keyframes vt-out{to{opacity:0;transform:translateX(-36px)}}
  @keyframes vt-in{from{opacity:0;transform:translateX(56px)}}
  @keyframes vt-out-back{to{opacity:0;transform:translateX(36px)}}
  @keyframes vt-in-back{from{opacity:0;transform:translateX(-56px)}}
  @keyframes vt-fade{to{opacity:0;transform:scale(.98)}}
  @keyframes vt-rise{from{opacity:0;transform:translateY(24px) scale(.98)}}
  /* Browsers without View Transitions: the new screen slides in */
  #step.enter{animation:vt-in .34s var(--ease-out) both}
  html[data-nav="back"] #step.enter{animation-name:vt-in-back}
  html[data-nav="up"] #step.enter{animation-name:vt-rise}

  /* Landing: text rises, then the three cards are dealt and fan out */
  .entry > *{animation:rise .55s var(--ease-out) both}
  .entry .entry-sub{animation-delay:.06s}
  .entry > .fan-wrap{animation-delay:.12s}
  .entry :is(.entry-for,.ticks,.how-open){animation-delay:.75s}
  .fan-card{animation:deal .7s var(--ease-spring) both}
  .fan-card:nth-child(1){animation-delay:.25s}
  .fan-card:nth-child(2){animation-delay:.38s}
  .fan-card:nth-child(3){animation-delay:.51s}
  @keyframes rise{from{opacity:0;transform:translateY(14px)}}
  @keyframes deal{from{opacity:0;transform:translateY(55%) rotate(0deg) scale(.82)}}
  .fan-card{transition:transform .45s var(--ease-spring)}
  @media (hover:hover) and (pointer:fine){
    .fan:hover .fan-card:nth-child(1){transform:rotate(-15deg) translateX(-14%)}
    .fan:hover .fan-card:nth-child(3){transform:rotate(15deg) translateX(14%)}
    .fan:hover .fan-card:nth-child(2){transform:translateY(-10%)}
  }

  /* Cards that lean toward the pointer (motion.js sets --rx/--ry) */
  .tiltable{transform:perspective(800px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)) translateY(calc(var(--lift,0px) * -1));transition:transform .5s var(--ease-spring),box-shadow .3s;will-change:transform}
  .tiltable.tilting{transition:transform .08s linear,box-shadow .3s;box-shadow:0 0 0 1px rgba(0,0,0,.14),0 18px 30px -14px rgba(0,0,0,.45)}
  .card.tiltable::after,.pv-card.tiltable::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:radial-gradient(circle at var(--shine-x,50%) var(--shine-y,30%),rgba(255,255,255,.35),transparent 55%);opacity:0;transition:opacity .3s;z-index:3}
  .tiltable.tilting::after{opacity:1}
  .boing{animation:boing .45s var(--ease-spring)}
  @keyframes boing{30%{transform:scale(.94) rotate(-2deg)}65%{transform:scale(1.04) rotate(1deg)}}

  /* Buttons and choices: press and pop */
  .btn{transition:transform .15s var(--ease-out),background-color .2s,box-shadow .2s}
  .btn:active:not(:disabled){transform:scale(.97)}
  .choice{transition:transform .2s var(--ease-out),border-color .2s,background-color .2s,box-shadow .2s}
  .choice:active{transform:scale(.98)}
  .choice[aria-pressed="true"]{animation:pop .3s var(--ease-spring)}
  .opt input:checked + label{animation:pop .28s var(--ease-spring)}
  @keyframes pop{50%{transform:scale(1.05)}}
  .cheer,.notice{animation:rise .35s var(--ease-out) both}

  /* Portraits and the cast: cards rise in one after another */
  .cast-big > *{animation:rise .5s var(--ease-out) both}
  .cast-big > :nth-child(2){animation-delay:.08s}
  .cast-big > :nth-child(3){animation-delay:.16s}
  .cast-big > :nth-child(n+4){animation-delay:.24s}
  .portrait img{animation:portrait-in .5s var(--ease-out) both}
  @keyframes portrait-in{from{opacity:0;transform:scale(.96)}}

  /* Creating the deck: each finished card flips face up */
  .slot.done img{animation:flip-up .6s var(--ease-out) both}
  .slot.done .slot-idx{animation:rise .3s .35s var(--ease-out) both}
  @keyframes flip-up{from{transform:perspective(500px) rotateY(90deg);opacity:.2}}

  /* Preview fan: stacked, then spread; spreads a little more on hover */
  .pv-fan .pv-card{animation:spread .8s var(--ease-spring) both}
  .pv-fan .f0{animation-delay:.05s}.pv-fan .f1{animation-delay:.12s}.pv-fan .f2{animation-delay:.19s}.pv-fan .f3{animation-delay:.26s}
  @keyframes spread{from{transform:translateX(-50%) rotate(0deg) translateY(12%);opacity:0}}
  .pv-fan .pv-card{transition:transform .45s var(--ease-spring)}
  @media (hover:hover) and (pointer:fine){
    .pv-fan:hover .f0{transform:translateX(-62%) rotate(-24deg)}
    .pv-fan:hover .f1{transform:translateX(-54%) rotate(-8deg) translateY(-3%)}
    .pv-fan:hover .f2{transform:translateX(-46%) rotate(8deg) translateY(-3%)}
    .pv-fan:hover .f3{transform:translateX(-38%) rotate(24deg) translateY(-6%)}
  }
  .viewer .pv-card.big{animation:portrait-in .4s var(--ease-out) both}

  /* Reveal: the cover card floats gently until opened */
  .reveal-cover .reveal-card{animation:float 4.5s ease-in-out infinite}
  @keyframes float{50%{transform:translateY(-6px) rotate(-.6deg)}}
  .reveal-grid canvas{animation:rise .45s var(--ease-out) both}
  .reveal-grid canvas:nth-child(n+5){animation-delay:.08s}
  .reveal-grid canvas:nth-child(n+9){animation-delay:.16s}
  .reveal-grid canvas:nth-child(n+13){animation-delay:.24s}
}

/* Deck grid tiles you can open; a card being redone keeps its old picture under a loader. */
button.slot{padding:0;font:inherit;cursor:pointer;color:inherit}
button.slot:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.slot.redo img{opacity:.35;filter:grayscale(.5)}
.slot.redo .spinner{position:relative;z-index:2;width:22px;height:22px}
.slot-new{position:absolute;bottom:5%;inset-inline-end:6%;z-index:2;font:700 9px/1 var(--body);letter-spacing:.04em;text-transform:uppercase;padding:3px 5px;border-radius:99px;background:var(--accent);color:var(--accent-ink)}
.changes-left{margin:0}
@media (prefers-reduced-motion:no-preference){
  @media (hover:hover) and (pointer:fine){
    button.slot{transition:transform .25s var(--ease-spring),box-shadow .25s}
    button.slot:hover{transform:translateY(-4px) rotate(-1deg);box-shadow:0 10px 20px -12px rgba(0,0,0,.5)}
  }
  button.slot:active{transform:scale(.96)}
  /* Card grows out of its tile and shrinks back (shared "hero" element) */
  html[data-nav="zoom"]::view-transition-old(step){animation:vt-fadeout .14s ease-in both}
  html[data-nav="zoom"]::view-transition-new(step){animation:vt-fadein .28s var(--ease-out) .16s both}
  ::view-transition-group(hero){animation-duration:.45s;animation-timing-function:cubic-bezier(.2,.8,.2,1)}
  ::view-transition-old(hero),::view-transition-new(hero){animation-duration:.45s;height:100%;object-fit:cover}
  html[data-nav="zoom"] #step.enter{animation:vt-fadein .3s var(--ease-out) both}
  @keyframes vt-fadeout{to{opacity:0}}
  @keyframes vt-fadein{from{opacity:0}}
}
/* Landscape phones: grid on the left, words and the order button on the right. */
@media (max-height:500px) and (min-width:640px){
  .deck-screen{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:20px;row-gap:6px;align-items:center;justify-items:center}
  .deck-screen > *{grid-column:2}
  .deck-screen > .deck-wrap{grid-column:1;grid-row:1 / span 8;flex-wrap:nowrap;width:auto}
  .deck-screen .deck-grid{width:calc((100dvh - 110px) * 1.19)}
  .deck-screen .back-panel{width:170px;padding:8px}
  .deck-screen .back-panel .swatches{display:none}
  .deck-screen .pay{padding:8px 12px;gap:4px}
  .deck-screen .pay .small{display:none}
}

/* Who's on the number cards: three small option cards. */
.cast-mode{border:0;padding:0;margin:0;width:100%;display:grid;gap:6px}
.cast-mode legend{font-weight:600;font-size:13.5px;padding:0;margin-bottom:6px;text-align:start}
.modes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.mode{position:relative;display:grid;gap:3px;align-content:start;justify-items:start;text-align:start;padding:8px;border:1px solid var(--line);border-radius:12px;background:var(--field);cursor:pointer}
.mode input{position:absolute;opacity:0;pointer-events:none}
.mode:has(input:checked){border-color:var(--accent);background:var(--accent-soft);box-shadow:0 0 0 2px var(--accent)}
.mode:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:2px}
.mode-thumbs{display:flex;gap:3px;margin-bottom:2px}
.mode-thumbs img{width:26px;height:36px;object-fit:cover;object-position:top;border-radius:4px;border:1px solid var(--line);background:#fff}
.mode b{font-size:13px;line-height:1.2}
.mode small{font-size:11.5px;line-height:1.3;color:var(--muted)}
@media (max-height:740px){.mode small{display:none}.cast-mode legend{margin-bottom:2px}}
@media (prefers-reduced-motion:no-preference){.mode{transition:transform .2s var(--ease-out),border-color .2s,background-color .2s}.mode:active{transform:scale(.97)}.mode:has(input:checked){animation:pop .3s var(--ease-spring)}}

/* Cast approved: portraits sized by screen height so the picker and email fit. */
.cast-screen .cast-big .cast-card img{width:auto;height:min(19dvh,180px)}
.cast-screen .cast-big:has(.cast-card:nth-child(4)) .cast-card img{height:min(14dvh,130px)}
@media (max-height:700px){.cast-screen .create-form .field .small{display:none}.cast-screen .cast-big .cast-card img{height:15dvh}}
@media (max-height:500px) and (min-width:640px){
  .cast-screen{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);column-gap:18px;row-gap:4px;align-items:center}
  .cast-screen > *{grid-column:1}
  .cast-screen > .create-form{grid-column:2;grid-row:1 / span 6}
  .cast-screen .cast-big .cast-card img{height:30dvh}
  .cast-screen .create-form > .small{display:none}
}

/* The back's printed line, over the art (same as the print file). */
.back-words{position:absolute;inset:0;display:grid;place-content:center;justify-items:center;gap:.15em;text-align:center;padding-inline:12%;pointer-events:none;z-index:2;container-type:inline-size;color:#4a3a2a;font-family:"IM Fell English",Georgia,serif}
.back-words b{font-weight:400;font-style:italic;font-size:clamp(7px,9cqw,40px);line-height:1.05;overflow-wrap:anywhere}
.back-words small{font-weight:400;font-size:clamp(6px,6.6cqw,30px);line-height:1.1}
.slot{container-type:inline-size}
/* The back: the card and the box side by side, named; then the line and color. */
.back-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(12px,3vw,28px);align-items:end;width:min(100%,560px);margin:0}
.back-pair figure{margin:0;display:grid;gap:6px;justify-items:center}
.back-pair figcaption{font-size:13.5px;font-weight:600;color:var(--ink)}
.back-pair .pv-card.big{height:auto;width:100%;max-height:none}
.back-pair .pv-card canvas{width:100%;height:auto}
.back-pair .box-mock{width:100%;height:auto;filter:drop-shadow(0 6px 10px rgb(0 0 0 / .14))}
.viewer:has(.back-pair) .reveal-why{font-size:15px;max-width:460px}
.back-edit{display:grid;gap:8px;width:min(100%,460px);text-align:start}
.back-edit .field{margin:0}
.back-edit .small{margin:0}
.be-saved{color:var(--ok);font-weight:600}
.swatches{border:0;padding:0;margin:0;display:grid;gap:6px;min-width:0}
.sw-row{display:flex;flex-wrap:wrap;gap:6px 4px}
.sw{display:grid;justify-items:center;gap:3px;width:52px;cursor:pointer;font-size:12px;color:var(--muted)}
.sw input{position:absolute;opacity:0;pointer-events:none}
.sw i{width:34px;height:34px;border-radius:50%;border:1px solid var(--line);box-shadow:inset 0 0 0 3px var(--field)}
.sw input:checked + i{outline:2.5px solid var(--accent);outline-offset:2px}
.sw input:checked ~ span{color:var(--ink);font-weight:600}
.sw input:focus-visible + i{outline:2.5px solid var(--accent);outline-offset:4px}
@media (max-height:760px){.viewer:has(.back-pair) .reveal-count,.viewer:has(.back-pair) .reveal-why{display:none}.back-pair{width:min(100%,440px)}}
@media (max-height:500px) and (min-width:640px){
  .viewer:has(.back-pair){display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:18px;row-gap:4px;align-items:center}
  .viewer:has(.back-pair) > *{grid-column:2}
  .viewer:has(.back-pair) > .pv-top{grid-column:1 / -1}
  .viewer:has(.back-pair) > .pv-stage{grid-column:1;grid-row:2 / span 8}
  .viewer:has(.back-pair) .back-pair{width:min(48vw,420px)}
  .viewer:has(.back-pair) .back-edit .small{display:none}
}

/* Which cards show this person (portrait review) and the always-on row (cast screen). */
.mini-idx{display:inline-grid;place-items:center;min-width:26px;height:34px;padding:0 3px;margin-inline:2px;border-radius:4px;border:1px solid var(--line);background:#fff;color:#1f2a30;font:700 12px/1 var(--display);vertical-align:middle}
.mini-idx.red{color:#b03a2e}
.court-chips{margin:0;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:2px}
.court-chips .small{margin-inline-end:4px}
.always{width:100%;display:grid;gap:6px;text-align:start}
.always-label{margin:0;font-weight:600;font-size:13.5px}
.always-cards{display:flex;gap:8px;flex-wrap:wrap}
.always-card{position:relative;display:grid;justify-items:center;align-content:space-between;width:44px;height:62px;padding:3px;border-radius:6px;border:1px solid var(--line);background:#fff;box-shadow:0 4px 10px -8px rgba(0,0,0,.5)}
.always-card .mini-idx{position:absolute;top:2px;inset-inline-start:2px;min-width:0;height:auto;padding:0;border:0;background:none;font-size:10px;margin:0}
.always-card .faces{display:flex;margin-top:auto}
.always-card .faces img{width:24px;height:30px;object-fit:cover;object-position:top;border-radius:3px}
.always-card .faces img + img{margin-inline-start:-8px}
@media (max-height:700px){.always-card{width:36px;height:50px}.always-card .faces img{width:20px;height:24px}}
@media (max-height:500px) and (min-width:640px){.always-card{width:32px;height:44px}.always-card .faces img{width:18px;height:22px}}
/* Fit after adding "always on" + card chips */
.cast-screen .cast-big .cast-card img{height:min(13dvh,130px)}
@media (max-height:860px){.cast-screen .create-form .field .small{display:none}}
@media (max-height:760px){.cast-screen > .q-sub{display:none}.cast-screen .cast-big .cast-card img{height:11dvh}}
@media (min-width:900px){
  .cast-screen{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);column-gap:36px;row-gap:10px;align-items:center;max-width:860px;margin-inline:auto}
  .cast-screen > *{grid-column:1}
  .cast-screen > .create-form{grid-column:2;grid-row:1 / span 6}
  .cast-screen .cast-big .cast-card img{height:min(24dvh,200px)}
  .cast-screen .create-form .field .small{display:block}
  .cast-screen > .q-sub{display:block}
  /* Faces on the left; the number-card choice and Next on the right */
  .cast-screen > .cast-mode,.cast-screen > #cast-next{grid-column:2}
  .cast-screen > .cast-mode{grid-row:1 / span 4;align-self:end}
  .cast-screen > #cast-next{grid-row:5;justify-self:center;align-self:start}
}
/* Two screens now: the faces screen has room for bigger portraits, and the
   "where to send it" screen is one short centered column, fields stacked. */
.cast-screen:not(.contact-screen) .cast-big .cast-card img{height:min(20dvh,190px)}
.contact-screen{display:flex !important;max-width:440px;margin-inline:auto}
/* Faces screen: one centered column, the number-card choice under the faces. */
.cast-screen:not(.contact-screen){display:flex;flex-direction:column;align-items:center;max-width:720px;margin-inline:auto}
.cast-screen:not(.contact-screen) > .cast-mode{width:min(100%,640px);align-self:center}
.cast-screen:not(.contact-screen) .cast-mode legend{text-align:center;width:100%}
.cast-screen:not(.contact-screen) > #cast-next{align-self:center}
.cast-screen:not(.contact-screen) .always{justify-items:center;text-align:center}
.contact-screen .create-form{width:100%}
.contact-screen .who-row{grid-template-columns:1fr;gap:12px}
.contact-screen .who-row .field > label{min-height:0}
.mode small{font-size:13px}
.portrait img{height:min(42dvh,400px)}
@media (max-height:700px){.portrait img{height:36dvh}}
@media (max-height:500px){.role-line{display:none}.portrait img{height:24dvh}}
/* Tiny always-on cards: index on top, faces underneath (no overlap). */
.always-card{align-content:start;gap:2px}
.always-card .mini-idx{position:static;font-size:10px;line-height:1;justify-self:start}
.always-card .faces{margin-top:0}
.always-card .faces img{width:22px;height:28px}
@media (max-height:700px){.always-card .faces img{width:18px;height:22px}}

/* Etsy checkout */
.etsy-code{margin:0;font:600 clamp(22px,6vw,30px)/1.1 var(--mono, ui-monospace, monospace);letter-spacing:.06em;color:var(--ink);user-select:all}
.etsy-code-label{margin:0}
/* Price and "how many decks" side by side */
.pay-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px 16px}
.pay-head .pay-price{margin:0}
.qty{display:inline-flex;align-items:center;gap:4px}
.qty-label{font-size:13.5px;color:var(--muted);margin-inline-end:4px}
.qty-b{width:44px;height:44px;padding:0;border-radius:50%;border:1px solid var(--line);background:var(--field);color:var(--ink);font:500 20px/1 var(--body);cursor:pointer;display:grid;place-items:center}
.qty-b:hover:not(:disabled){background:var(--bg)}
.qty-b:disabled{opacity:.4;cursor:default}
.qty-b:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.qty input{width:56px;min-height:44px;padding:4px;text-align:center;font:600 16px var(--body);font-variant-numeric:tabular-nums;-moz-appearance:textfield}
.qty input::-webkit-outer-spin-button,.qty input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.etsy-code-row{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}
.etsy-copy-ic{width:44px;height:44px;flex:none;display:grid;place-items:center;padding:0;border:0;border-radius:10px;background:none;color:var(--muted);cursor:pointer}
.etsy-copy-ic svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.etsy-copy-ic:hover:not(:disabled){background:var(--bg);color:var(--ink)}
.etsy-copy-ic:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.etsy-copy-ic:disabled{opacity:.4;cursor:default}
.etsy-pay{gap:6px}
.etsy-wait .pay{gap:6px}
.spinner.big{width:34px;height:34px;border-width:4px}
.code-field[hidden]{display:none}

/* Landing: back to an unfinished deck */
.continue-deck{display:flex;flex-wrap:wrap;gap:4px 10px;align-items:center;justify-content:center;padding:10px 14px;border:1px solid var(--accent);border-radius:12px;background:var(--accent-soft);color:var(--ink);text-decoration:none;font-size:14px}
.continue-deck b{color:var(--accent)}
a.btn{text-decoration:none}

/* Name + email side by side (fits the cast screen on phones) */
.who-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%}
.who-row .field{margin:0}
.who-row .field > label{font-size:13px;line-height:1.25;min-height:2.5em;display:flex;align-items:flex-end}
@media (max-width:340px){.who-row{grid-template-columns:1fr}.who-row .field > label{min-height:0}}
/* The Etsy box is taller than the old pay box: the grid gives a little */
.deck-screen:has(.etsy-pay) .deck-grid{width:min(100%,460px,max(200px,calc((100dvh - 520px) * 1.19)))}

/* Joker and card back tiles name themselves */
.slot-idx.word{font:700 clamp(7px,2vw,10px)/1 var(--body);letter-spacing:.08em;text-transform:uppercase;padding:2px 4px;border-radius:4px;background:rgba(255,255,255,.85)}
.slot:not(.done) .slot-idx.word{font-size:clamp(8px,2.4vw,11px);background:none}
.mini-idx.word{font:700 8px/1 var(--body);letter-spacing:.06em;text-transform:uppercase}
/* After paying: one line of status that changes when the owner approves */
/* Paid: four steps in a row, a line joining the dots */
.timeline{list-style:none;margin:2px 0 4px;padding:0;display:grid;align-items:start;grid-template-columns:repeat(4,minmax(0,1fr));width:min(100%,560px);counter-reset:none}
.timeline li{position:relative;display:grid;align-content:start;justify-items:center;gap:4px;text-align:center;font-size:13.5px;line-height:1.25;color:var(--muted);padding:0 4px}
.timeline li::before{content:"";position:absolute;top:11px;inset-inline-start:-50%;width:100%;height:2px;background:var(--line);z-index:0}
.timeline li:first-child::before{display:none}
.timeline li.done::before,.timeline li.now::before{background:var(--ok)}
.tl-dot{position:relative;z-index:1;width:24px;height:24px;border-radius:50%;border:2px solid var(--line);background:var(--bg);display:grid;place-items:center;font:700 13px/1 var(--body);color:#fff}
.timeline li.done .tl-dot{background:var(--ok);border-color:var(--ok)}
.timeline li.now .tl-dot{border-color:var(--ok);box-shadow:0 0 0 4px color-mix(in srgb,var(--ok) 18%,transparent)}
.timeline li.done b,.timeline li.now b{color:var(--ink)}
.timeline b{font-weight:600}
.timeline small{font-size:12.5px;color:var(--ok);font-weight:600}
@media (prefers-reduced-motion:no-preference){.timeline li.now .tl-dot{animation:pulse 1.8s ease-in-out infinite}}
.paid-status{margin:0;display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:600}
.paid-status .dot{width:10px;height:10px;border-radius:50%;background:var(--warn,#9A5B12);box-shadow:0 0 0 3px color-mix(in srgb,var(--warn,#9A5B12) 20%,transparent)}
.paid-status .dot.done{background:var(--ok);box-shadow:0 0 0 3px color-mix(in srgb,var(--ok) 20%,transparent)}
@media (prefers-reduced-motion:no-preference){.paid-status .dot:not(.done){animation:pulse 1.6s ease-in-out infinite}}

/* Real-card corners: the upside-down index bottom-right, and the Joker's
   letters stacked down the corner. */
.slot-idx.flip{top:auto;bottom:5%;inset-inline-start:auto;inset-inline-end:8%;transform:rotate(180deg)}
.slot-idx.joker{display:flex;flex-direction:column;align-items:center;gap:0;font:700 clamp(6px,1.7vw,9px)/1.05 var(--display);letter-spacing:0;color:#1f2a30;background:none;padding:0}
.slot-idx.joker i{font-style:normal}
.slot:not(.done) .slot-idx.joker{position:static;font-size:clamp(9px,2.6vw,13px);opacity:.38;color:var(--ink)}
.mini-idx.word{font:700 8px/1 var(--body)}

/* The card being made: heartbeat + a brush line drawing itself */
.slot .sketch{position:absolute;inset:22% 18%;width:64%;height:56%;z-index:2;fill:none;stroke:var(--accent);stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:90;stroke-dashoffset:0;opacity:.85}
.slot.now{border:1px solid var(--accent);background:var(--accent-soft)}
.slot.now.done{background:#fff}
@media (prefers-reduced-motion:no-preference){
  .slot.now{animation:heartbeat 1.3s ease-in-out infinite;box-shadow:0 0 0 0 color-mix(in srgb,var(--accent) 45%,transparent)}
  .slot .sketch{stroke-dashoffset:90;animation:sketch 1.6s ease-in-out infinite}
}
@keyframes heartbeat{
  0%,100%{transform:scale(1);box-shadow:0 0 0 0 color-mix(in srgb,var(--accent) 40%,transparent)}
  14%{transform:scale(1.07)}
  28%{transform:scale(1)}
  42%{transform:scale(1.05);box-shadow:0 0 0 6px color-mix(in srgb,var(--accent) 0%,transparent)}
  70%{transform:scale(1)}
}
@keyframes sketch{0%{stroke-dashoffset:90;opacity:.2}50%{stroke-dashoffset:0;opacity:.9}100%{stroke-dashoffset:-90;opacity:.2}}
.slot.now{z-index:1}

/* Card back tile: no corner index (real backs have none); a small centered tag on the bottom edge */
.slot.done .slot-idx.back-tag{top:auto;bottom:4%;inset-inline-start:50%;transform:translateX(-50%);white-space:nowrap;font-size:clamp(6px,1.6vw,8px);padding:2px 5px;border-radius:99px;background:rgba(255,255,255,.92);box-shadow:0 0 0 1px rgba(0,0,0,.08)}
.slot:not(.done) .slot-idx.back-tag{text-align:center}

/* Finished tiles: a canvas drawn like the big card */
.slot .slot-canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
.slot.redo .slot-canvas{opacity:.35;filter:grayscale(.5)}
@media (prefers-reduced-motion:no-preference){.slot.done .slot-canvas{animation:flip-up .6s var(--ease-out) both}}
/* Two Jokers: switch in the viewer, a fanned pair on the share page */
.joker-switch{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}
.joker-switch .btn{display:inline-flex;align-items:center;gap:8px;min-height:44px}
.joker-switch .btn.on{border-color:var(--accent);background:var(--accent-soft);font-weight:600}
.joker-switch .jk{width:12px;height:12px;border-radius:50%;display:inline-block}
.joker-switch .jk1{background:#b5473f}
.joker-switch .jk2{background:#1a1a1a;box-shadow:0 0 0 1px var(--line)}
.joker-note{text-align:center;margin:0}
/* The two Jokers side by side, sized by the width they have (never cut off),
   each tilted a little, like the deck screen's pair. */
.reveal-card.joker-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(10px,3vw,20px);width:min(100%,calc(min(50dvh,460px) * 1.47 + 20px));padding:8px 6px}
.reveal-card.joker-pair canvas{width:100%;height:auto;aspect-ratio:819 / 1114}
.reveal-card.joker-pair canvas:first-child{transform:rotate(-3deg)}
.reveal-card.joker-pair canvas:last-child{transform:rotate(3deg)}
@media (prefers-reduced-motion:reduce){.reveal-card.joker-pair canvas{transform:none}}
/* Portrait check: their photo next to the portrait */
.compare{display:flex;justify-content:center;align-items:center;gap:14px;margin:0 auto 8px;max-width:100%}
.compare .portrait{margin:0}
.cmp-photo{margin:0;display:grid;justify-items:center;gap:4px;flex:0 1 auto;min-width:0}
/* Photo and portrait the same size, side by side (one height for both, set
   by --cmp-h; it never makes the pair wider than the screen). Extra photos
   wait behind a "+N" mark: the first one is the comparison. */
.cmp-stack{position:relative;display:block}
.compare:not(.solo){--cmp-h:min(42dvh,400px,calc((100vw - 60px) / 2 * 1.4))}
.compare:not(.solo) .portrait img,.cmp-stack img:first-child{height:var(--cmp-h);width:auto;max-width:none;aspect-ratio:5/7;object-fit:cover}
.cmp-stack img{display:block;border-radius:10px;border:1px solid var(--line);background:#fff}
.cmp-stack img:not(:first-child){display:none}
.cmp-more{position:absolute;inset-inline-end:6px;bottom:6px;padding:2px 8px;border-radius:999px;background:color-mix(in srgb,var(--bg) 85%,transparent);font-size:12px;font-weight:600}
@media (max-width:420px){.compare{gap:10px}}
/* Choosing their face cards */
.court-pick{display:grid;justify-items:center;gap:8px}
.court-pick .court-chips{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px}
.cards-edit{border:1px solid var(--line);margin:0;width:min(100%,420px);display:grid;gap:10px;justify-items:center}
.cards-edit legend{padding:0 6px}
.face-toggles{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.face-toggle{position:relative;display:inline-flex;cursor:pointer;border-radius:10px;padding:6px;border:2px solid var(--line);background:var(--field);min-width:52px;min-height:52px;align-items:center;justify-content:center}
.face-toggle input{position:absolute;opacity:0;pointer-events:none}
.face-toggle:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}
.face-toggle:has(input:checked)::after{content:"✓";position:absolute;top:-8px;right:-8px;width:20px;height:20px;border-radius:50%;background:var(--accent);color:var(--accent-ink);font-size:12px;display:grid;place-items:center}
.face-toggle:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:2px}
@media (max-height:820px){.compare:not(.solo){--cmp-h:min(36dvh,360px,calc((100vw - 60px) / 2 * 1.4))}}
@media (max-height:500px){.compare:not(.solo){--cmp-h:20dvh}}

/* Portrait versions: one row (scrolls sideways if many); the portrait gives up a little height for it. */
.portrait-versions .ver-row{flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding:3px;justify-content:flex-start}
.portrait-versions .ver{flex:0 0 auto;padding:4px 10px 4px 4px;font-size:12.5px}
.portrait-versions .ver.on{padding:3px 9px 3px 3px}
.portrait-versions .ver img{width:30px}
.stage:has(.portrait-versions) .compare:not(.solo){--cmp-h:min(32dvh,330px,calc((100vw - 60px) / 2 * 1.4))}
@media (max-height:700px){.stage:has(.portrait-versions) .compare:not(.solo){--cmp-h:min(27dvh,calc((100vw - 60px) / 2 * 1.4))}}
@media (max-height:500px){.stage:has(.portrait-versions) .compare:not(.solo){--cmp-h:18dvh}}

/* The back on wide screens: card and box on the left, the line and color on the right. */
@media (min-width:900px) and (min-height:501px){
  .viewer:has(.back-pair){display:grid;grid-template-columns:minmax(0,640px) minmax(0,400px);justify-content:center;column-gap:40px;row-gap:10px;align-items:start;align-content:start}
  .viewer:has(.back-pair) > *{grid-column:2;justify-self:start;text-align:start}
  .viewer:has(.back-pair) > .pv-top{grid-column:1 / -1;justify-self:stretch}
  .viewer:has(.back-pair) > .pv-stage{grid-column:1;grid-row:2 / span 9;align-self:start;width:100%;max-width:640px}
  .viewer:has(.back-pair) .back-pair{width:100%;max-width:640px}
  .viewer:has(.back-pair) .reveal-why{display:block;margin:0}
  .viewer:has(.back-pair) .reveal-nav{justify-content:flex-start}
}
/* Swatches in one row on phones */
@media (max-width:520px){.sw-row{flex-wrap:nowrap;justify-content:space-between;gap:0}.sw{width:42px;font-size:11px}.sw i{width:30px;height:30px}}


/* The deck: 14 cards, and the back apart from them (it's the back of every
   card and the box, not a 15th card). Side by side on wide screens, below
   on phones. */
.deck-wrap{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:14px 22px;width:100%}
.back-panel{display:grid;gap:8px;justify-items:center;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:var(--panel);width:min(100%,300px)}
.bp-title{margin:0;font-weight:600;font-size:14px;text-align:center}
.bp-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:end;width:100%}
.bp-pair figure{margin:0;display:grid;gap:4px;justify-items:center}
.bp-pair figcaption{font-size:12px;color:var(--muted)}
.bp-pair .slot{width:100%}
.bp-box{width:100%;height:auto;filter:drop-shadow(0 4px 8px rgb(0 0 0 / .14))}
.back-panel .swatches{width:100%}
.back-panel .sw-row{justify-content:center}
.back-panel .sw{width:46px}
.back-panel .sw i{width:28px;height:28px}
.back-panel .linklike{font-size:13.5px}
/* Phones: a slim row under the deck; the colors live one tap away. */
@media (max-width:640px){
  .back-panel{width:100%;grid-template-columns:auto minmax(0,1fr);align-items:center;justify-items:start;padding:8px 12px;gap:2px 12px}
  .bp-title{grid-column:2;text-align:start}
  .bp-pair{grid-column:1;grid-row:1 / span 3;width:150px;gap:8px}
  .back-panel .swatches{display:none}
  .back-panel .linklike{grid-column:2}
}

/* Fit: the panel stays beside the deck on wide screens; colors in one row. */
.back-panel{width:min(100%,214px);padding:10px 12px}
.bp-pair{gap:8px}
.swatches.compact{justify-items:center}
.swatches.compact legend{font-size:13px;text-align:center;width:100%}
.swatches.compact .sw-name{font-weight:400}
.swatches.compact .sw-row{flex-wrap:nowrap;gap:3px;justify-content:center}
.back-panel .swatches.compact .sw{width:auto}
.back-panel .swatches.compact .sw i{width:20px;height:20px;box-shadow:inset 0 0 0 2px var(--field)}
.back-panel .swatches.compact .sw input:checked + i{outline-width:2px;outline-offset:1px}
@media (max-width:640px){
  .back-panel{width:100%}
  .bp-pair{width:118px;gap:6px}
  .bp-pair figcaption{font-size:11px}
  .deck-screen:has(.back-panel) .deck-grid{width:min(100%,460px,max(200px,calc((100dvh - 590px) * 1.19)))}
}
.bp-title{font-size:13px;line-height:1.3}
@media (min-width:641px){.bp-pair{width:170px}}
@media (max-width:640px){.deck-screen:has(.back-panel) .deck-grid{width:min(100%,460px,max(200px,calc((100dvh - 620px) * 1.19)))}}
@media (max-height:700px){.back-panel{padding:6px 10px}.bp-pair{width:96px}.bp-pair figcaption{display:none}}
@media (pointer:fine){.back-panel .linklike{min-height:0;padding:2px 0}}
.back-panel{gap:6px}
@media (max-width:640px){.deck-screen:has(.back-panel) .deck-grid{width:min(100%,460px,max(196px,calc((100dvh - 650px) * 1.19)))}}

/* Both Jokers side by side (no switch) */
.joker-duo{display:flex;justify-content:center;align-items:flex-end;gap:clamp(10px,3vw,24px);margin:0}
.joker-duo figure{margin:0;display:grid;gap:4px;justify-items:center}
.joker-duo figcaption{font-size:13px;font-weight:600;color:var(--muted)}
.viewer .joker-duo .pv-card.big{height:min(46dvh,460px,calc((100vw - 64px) / 2 * 1.36))}
.viewer.changing .joker-duo .pv-card.big{height:min(26dvh,300px)}
@media (max-height:700px){.viewer .joker-duo .pv-card.big{height:min(38dvh,calc((100vw - 64px) / 2 * 1.36))}}

/* Swap: tap another card to trade pictures */
.swap{width:min(100%,520px);display:grid;gap:8px;text-align:start}
.swap-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
@media (max-width:420px){.swap-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
.swap-pick{padding:0;border:2px solid transparent;border-radius:6px;background:none;cursor:pointer;min-height:44px}
.swap-pick canvas{display:block;width:100%;height:auto;border-radius:4px;box-shadow:0 0 0 1px var(--line)}
.swap-pick:hover{border-color:var(--accent)}
.swap-pick:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.swap-pick:disabled{opacity:.5}
.swap .btn{justify-self:start}
.viewer.swapping .pv-card.big{height:min(24dvh,280px)}
.viewer.swapping .joker-duo .pv-card.big{height:min(20dvh,240px)}
.viewer.swapping .reveal-why,.viewer.swapping #chg-open,.viewer.swapping .versions{display:none}

/* =========== Desktop: every screen on one screen, no scrolling ===========
   Laptops have width to spare and little height (a browser window leaves
   about 680-800 px). So the page gets wider and the long screens use two
   columns: what you look at on the left, what you do on the right. */
@media (min-width:1000px){
  .intake .wrap.narrow{max-width:1080px}
  /* Name fields don't need the full width: a long line of empty box reads as unfinished */
  .intake[data-step="people"] #subjects,.intake[data-step="people"] .couple-q{max-width:680px}
  /* Check your answers: the answers in two columns, the rest beside them */
  .intake[data-step="review"] #step{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);column-gap:22px;align-content:center;align-content:safe center}
  .intake[data-step="review"] #step::before,.intake[data-step="review"] #step::after{display:none}
  .intake[data-step="review"] #step > *{grid-column:2;min-width:0}
  .intake[data-step="review"] #step > .q,.intake[data-step="review"] #step > .q-sub{grid-column:1 / -1}
  .intake[data-step="review"] #step > .rv:not(.rv-b){grid-column:1;grid-row:3 / span 30;align-self:start}
  /* Rows pinned, so hiding the subtitle on short screens can't shift the right column up */
  .intake[data-step="review"] #step > .rv-b{margin-top:0;grid-row:3}
  .intake[data-step="review"] #step > .rv-side{margin:14px 0 0;grid-row:4}
  .intake[data-step="review"] #step > #submit-err{grid-row:5}
  /* Photos and what each one loves: side by side */
  .intake[data-step="photos"] #photo-rows{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:stretch}
  .intake[data-step="photos"] .photo-subject{margin:0}
  .intake[data-step="photos"] .photo-tips{max-width:620px}
  .loves{grid-template-columns:repeat(auto-fit,minmax(320px,1fr))}
  /* A portrait to approve: the faces on the left, the question and buttons on the right */
  .pr-stage{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);column-gap:28px;row-gap:8px;align-items:center;justify-items:center}
  .pr-stage > *{grid-column:2}
  .pr-stage > .approve-head,.pr-stage > .cast-strip,.pr-stage > .cheer{grid-column:1 / -1}
  .pr-stage > .pr-left{grid-column:1;grid-row:3 / span 12;align-self:start}
  .pr-stage .approve-q,.pr-stage .role-line{text-align:center}
  /* The deck: cards on the left, the words and the order box on the right */
  .deck-screen{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,1fr);column-gap:28px;row-gap:8px;align-items:center;justify-items:center;align-content:start}
  .deck-screen > *{grid-column:2}
  .deck-screen > .q,.deck-screen > .q-sub,.deck-screen > .cheer,.deck-screen > .paid-status,.deck-screen > .timeline{grid-column:1 / -1}
  .deck-screen > .deck-wrap{grid-column:1;grid-row:span 12;align-self:start}
  .deck-screen .deck-grid,.deck-screen:has(.meter) .deck-grid,.deck-screen:has(.etsy-pay) .deck-grid,.deck-screen:has(.back-panel) .deck-grid{width:min(calc(100% - 236px),440px,calc((100dvh - 250px) * 1.19))}
  .deck-screen .pay,.deck-screen .etsy-pay{width:100%}
  /* One card, big: like the phone, one centered column (card, its line,
     the two actions under it) with room below. Only while a change or a
     swap is open does the card step left and the panel sit beside it. */
  .viewer:not(:has(.back-pair)) .pv-card.big{height:min(calc(100dvh - 330px),540px)}
  .viewer.has-versions:not(.changing):not(.swapping) .pv-card.big{height:min(calc(100dvh - 400px),480px)}
  .viewer:not(:has(.back-pair)) > .pv-top{max-width:min(100%,480px)}
  .viewer:is(.changing,.swapping):not(:has(.back-pair)){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:40px;row-gap:8px;align-items:center;justify-items:center;align-content:center;max-width:1040px;margin-inline:auto;width:100%}
  .viewer:is(.changing,.swapping):not(:has(.back-pair)) > *{grid-column:2}
  .viewer:is(.changing,.swapping):not(:has(.back-pair)) > .pv-top{grid-column:1 / -1;grid-row:1;justify-self:stretch;max-width:none}
  .viewer:is(.changing,.swapping):not(:has(.back-pair)) > .pv-stage{grid-column:1;grid-row:2 / span 14}
  .viewer:is(.changing,.swapping):not(:has(.back-pair)) .pv-card.big{height:min(calc(100dvh - 260px),540px)}
  .viewer:is(.changing,.swapping) .joker-duo .pv-card.big{height:min(calc(100dvh - 300px),360px)}
  .viewer.changing .reveal-why{display:block}
  .viewer .redo,.viewer .swap{width:100%}
}
@media (min-width:1000px) and (max-height:820px){
  .intake .q-sub{margin-bottom:8px}
  .intake[data-step="review"] .rv-row{min-height:44px;padding-block:4px}
  .intake[data-step="review"] .rv-h{padding-block:10px 0}
}
@media (min-width:1000px) and (max-height:740px){
  .intake[data-step="review"] #step > .q-sub{display:none}
  .intake[data-step="review"] #step > .q{max-width:none}
  .intake[data-step="review"] .rv-row{min-height:36px;padding-block:2px;font-size:15px}
  .intake[data-step="review"] .rv-v{-webkit-line-clamp:1}
  .intake[data-step="review"] :is(.rv-edit,.rv-add){min-height:32px}
  .intake[data-step="review"] .rv-face img,.intake[data-step="review"] .rv-av{width:24px;height:24px}
  .intake[data-step="review"] .rv-h{padding-block:8px 0}
  .intake[data-step="review"] .rv-side ol{gap:0;font-size:13px}
  .intake[data-step="review"] .rv-side{padding:12px 16px}
}
.card-acts{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}
/* One card, big: close (×) top left with the count, arrows on the card's
   sides (swipe works too), Change and Swap as buttons under it. */
.pv-top{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;width:100%;max-width:560px}
.pv-top .reveal-count{grid-column:2;margin:0}
.pv-x{grid-column:1;width:44px;height:44px;padding:0;border:0;background:none;cursor:pointer;display:grid;place-items:center}
.pv-x span{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:var(--field);border:1px solid var(--line);color:var(--ink);font:500 22px/1 var(--body);transition:background .12s}
.pv-x:hover span{background:var(--bg)}
.pv-x:focus-visible{outline:none}
.pv-x:focus-visible span{outline:2px solid var(--accent);outline-offset:2px}
.pv-stage{position:relative;display:flex;justify-content:center;align-items:center;width:fit-content;max-width:100%;min-width:0}
.pv-stage:has(.joker-duo),.pv-stage:has(.back-pair){width:100%}
.pv-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:3;width:44px;height:44px;padding:0;border-radius:50%;border:1px solid var(--line);background:var(--field);color:var(--ink);display:grid;place-items:center;cursor:pointer;box-shadow:0 2px 10px -2px rgb(0 0 0 / .25)}
.pv-arrow svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.pv-arrow.prev{inset-inline-start:-8px}
.pv-arrow.next{inset-inline-end:-8px}
.pv-arrow:hover{background:var(--bg)}
.pv-arrow:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
[dir="rtl"] .pv-arrow svg{transform:scaleX(-1)}
@media (min-width:1000px){.pv-arrow.prev{inset-inline-start:-56px}.pv-arrow.next{inset-inline-end:-56px}.pv-stage:has(.joker-duo) .pv-arrow.prev,.pv-stage:has(.back-pair) .pv-arrow.prev{inset-inline-start:-12px}.pv-stage:has(.joker-duo) .pv-arrow.next,.pv-stage:has(.back-pair) .pv-arrow.next{inset-inline-end:-12px}}
@media (min-width:1000px){
  /* Both Jokers must fit their column side by side */
  .viewer .joker-duo .pv-card.big,.viewer.changing .joker-duo .pv-card.big,.viewer.swapping .joker-duo .pv-card.big{height:min(calc(100dvh - 260px),360px)}
  .viewer .joker-duo{max-width:100%}
  /* The deck screen starts at the top instead of floating mid-page */
  .stage.deck-screen{margin-block:0 auto}
}

/* Desktop deck: the cards and the back on top, the payment below as one
   wide row (price + how · your code · Pay on Etsy), all on one screen. */
@media (min-width:1000px){
  .deck-screen{display:flex;flex-direction:column;align-items:center;gap:10px}
  .deck-screen .deck-wrap{flex-wrap:nowrap;justify-content:center;align-items:center}
  .deck-screen .deck-grid,.deck-screen:has(.meter) .deck-grid,.deck-screen:has(.etsy-pay) .deck-grid,.deck-screen:has(.back-panel) .deck-grid{width:min(460px,calc((100dvh - 380px) * 1.2))}
  .deck-screen:has(.meter) .deck-grid{width:min(460px,calc((100dvh - 300px) * 1.2))}
  .deck-screen .changes-left{margin:0}
}

/* ===== Calmer deck screen ===== */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
/* A changed card: a small dot in the corner, not a pill */
.slot-new{position:absolute;top:6%;inset-inline-end:8%;bottom:auto;z-index:2;width:9px;height:9px;padding:0;border-radius:50%;background:var(--accent);box-shadow:0 0 0 2px #fff}
.changes-left{color:var(--muted);white-space:nowrap}
.deck-grid{gap:8px}
.back-panel .bp-title{font-weight:600}
@media (min-width:1000px){
  .deck-screen{gap:18px}
  .deck-screen > .q{margin-bottom:0}
  .deck-screen .deck-wrap{gap:36px;margin-block:6px}
  .deck-screen .deck-grid{gap:10px}
  .deck-screen .back-panel{background:none;border:0;padding:0;width:200px;gap:10px}
  .deck-screen .etsy-pay{margin-top:4px}
}

/* "Your answers": a quiet link in the header, opening a panel over the page */
.intake .top{display:flex;justify-content:space-between;align-items:center;gap:12px}
.answers-top{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:6px 12px;border:1px solid var(--line);border-radius:999px;background:var(--panel);color:var(--ink);font:500 14px var(--body);cursor:pointer}
.answers-top svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round}
.answers-top:hover{border-color:var(--accent)}
.answers-top:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
/* The word stays on phones too: an icon alone isn't clear (audit F25) */
@media (max-width:420px){.answers-top{padding:6px 10px;font-size:13.5px}}
.sheet-backdrop{position:fixed;inset:0;z-index:50;background:rgb(15 20 25 / .42);display:flex;justify-content:flex-end;align-items:stretch}
.sheet{width:min(480px,100%);height:100%;background:var(--bg);box-shadow:-12px 0 40px -12px rgb(0 0 0 / .35);display:flex;flex-direction:column;text-align:start}
.sheet-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:18px 20px 10px}
.sheet-head .q{margin:0}
.sheet-x{width:44px;height:44px;border:0;border-radius:50%;background:var(--panel);color:var(--ink);font-size:24px;line-height:1;cursor:pointer}
.sheet-x:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.sheet-body{overflow-y:auto;padding:4px 20px 24px}
.sheet-body .sum{margin:0}
@media (max-width:640px){.sheet-backdrop{align-items:flex-end}.sheet{height:auto;max-height:86dvh;width:100%;border-radius:18px 18px 0 0;box-shadow:0 -12px 40px -12px rgb(0 0 0 / .35)}}
@media (prefers-reduced-motion:no-preference){.sheet{animation:sheet-in .22s var(--ease-out,ease-out) both}@media (max-width:640px){.sheet{animation-name:sheet-up}}}
@keyframes sheet-in{from{transform:translateX(30px);opacity:0}}
@keyframes sheet-up{from{transform:translateY(40px);opacity:0}}

/* Versions: an x in the corner of each one not in use (shown on hover or
   focus with a mouse, always on touch). 22 px circle, 44 px to tap. */
.ver-wrap{position:relative;display:grid}
.ver-x{position:absolute;top:-10px;inset-inline-end:-10px;width:44px;height:44px;padding:0;border:0;background:none;cursor:pointer;display:grid;place-items:center;z-index:2}
.ver-x span{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--ink);color:var(--bg);font:600 15px/1 var(--body);box-shadow:0 1px 4px rgb(0 0 0 / .25);transition:transform .12s,background .12s}
.ver-x:hover span{background:var(--danger);transform:scale(1.08)}
.ver-x:focus-visible{outline:none}
.ver-x:focus-visible span{outline:2px solid var(--accent);outline-offset:2px}
@media (hover:hover) and (pointer:fine){.ver-wrap .ver-x{opacity:0}.ver-wrap:hover .ver-x,.ver-wrap:focus-within .ver-x{opacity:1}}
.ver-row{align-items:flex-start;padding-top:6px}
/* Undo bar */
.snack{position:fixed;left:50%;bottom:calc(18px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);z-index:60;display:flex;align-items:center;gap:16px;padding:10px 10px 10px 16px;border-radius:12px;background:var(--ink);color:var(--bg);font-size:14.5px;box-shadow:0 8px 24px -8px rgb(0 0 0 / .45);max-width:min(92vw,420px)}
.snack-undo{min-height:36px;padding:6px 14px;border:0;border-radius:8px;background:transparent;color:var(--accent-soft);font:700 14.5px var(--body);cursor:pointer;text-transform:uppercase;letter-spacing:.04em}
.snack-undo:hover{background:rgb(255 255 255 / .12)}
.snack-undo:focus-visible{outline:2px solid var(--accent-soft);outline-offset:2px}
@media (prefers-reduced-motion:no-preference){.snack{animation:snack-in .2s ease-out both}}
@keyframes snack-in{from{opacity:0;transform:translate(-50%,10px)}}

/* Both Jokers: sized by the width they have, never wider than their column,
   never cut, never covering anything. Height follows the card's shape. */
.viewer .joker-duo{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(10px,2vw,20px);width:min(100%,calc((100dvh - 260px) * 1.47 + 20px));max-width:100%;min-width:0}
.viewer .joker-duo figure{min-width:0}
.viewer .joker-duo .pv-card.big{height:auto !important;width:100%;aspect-ratio:819 / 1114}
.viewer .joker-duo .pv-card canvas{width:100%;height:100%}
.viewer.changing .joker-duo,.viewer.swapping .joker-duo{width:min(100%,calc(26dvh * 1.47 + 20px))}
@media (min-width:1000px){.viewer .joker-duo{width:min(100%,calc((100dvh - 220px) * 1.47 + 20px))}.viewer > *{min-width:0;max-width:100%}}
/* back panel: a touch wider so its title sits on one line */
@media (min-width:1000px){.deck-screen .back-panel{width:230px}}
@media (max-width:999px){
  .viewer.has-versions .joker-duo{width:min(100%,calc(27dvh * 1.47 + 20px))}
  .viewer.has-versions .joker-note{display:none}
}
.ver-x{min-height:24px;padding:2px 6px}
@media (max-width:640px){.viewer.has-versions:not(.changing):not(.swapping) .pv-card.big{height:min(37dvh,420px)}}

/* Your answers panel: faces first, then the answers, start over at the foot */
.sheet-h{font:600 12px var(--body);letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:14px 0 8px}
.sheet-faces .sheet-h{margin-top:0}
.face-rows{display:grid;gap:10px}
.face-row{display:flex;gap:12px;align-items:center;padding:8px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.face-portrait{width:56px;aspect-ratio:5/7;object-fit:cover;border-radius:8px;background:#fff;border:1px solid var(--line);flex:none}
.face-portrait.empty{display:block}
.face-info{display:grid;gap:4px;min-width:0}
.face-info .small{margin:0}
.face-photos{display:flex;gap:6px;flex-wrap:wrap}
.face-photos img{width:40px;height:40px;object-fit:cover;border-radius:8px;border:1px solid var(--line)}
.sheet-foot{border-top:1px solid var(--line);padding:14px 20px calc(16px + env(safe-area-inset-bottom,0px));display:grid;gap:8px;justify-items:start;background:var(--bg)}
.sheet-foot .small{margin:0}
.sheet-foot .row{gap:8px}
.restart-q{margin:0}

/* Phones: the deck in three columns, big enough to see the art and to tap
   (about 110px a card). The page scrolls a little; that's normal on a phone. */
@media (max-width:699px){
  .deck-screen .deck-grid,.deck-screen:has(.meter) .deck-grid,.deck-screen:has(.etsy-pay) .deck-grid,.deck-screen:has(.back-panel) .deck-grid{width:100%;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
}

/* =========== Consistency pass (audit F21-F29, F34, F38-F42) =========== */
/* Actions are buttons (links only go somewhere): the small, quiet size */
.small-btn{min-height:44px;padding:8px 14px;font-size:14px}
.court-chips .small-btn{margin-inline-start:6px}
.skip-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin-top:4px}
.back-panel .small-btn{font-size:13.5px}
/* Free changes left: its own small chip under the hint */
.changes-left{margin:0 0 0 8px;display:inline-block;vertical-align:middle;padding:3px 10px;border-radius:999px;border:1px solid var(--line);background:var(--field);font-size:13px;font-weight:600;color:var(--ink)}
/* A changed card says "New"; a card being made says "Making…" */
.slot-new{top:5%;inset-inline-end:6%;bottom:auto;width:auto;height:auto;padding:2px 7px;border-radius:999px;background:var(--accent);color:#fff;font:700 11px/1.3 var(--body);letter-spacing:.02em;text-transform:none;box-shadow:0 0 0 2px #fff}
.slot-making{position:absolute;bottom:7%;left:50%;transform:translateX(-50%);z-index:3;padding:2px 8px;border-radius:999px;background:rgb(255 255 255 / .92);color:var(--ink);font:600 12px/1.3 var(--body);white-space:nowrap;box-shadow:0 0 0 1px rgb(0 0 0 / .08)}
/* Text at least 12-13px, also in placeholders and captions */
.slot:not(.done) .slot-idx.word{font-size:12px}
.slot:not(.done) .slot-idx.word i{font-size:13px}
.always-card .mini-idx{font-size:12px}
.bp-pair figcaption{font-size:13px}
.fan-label{font:600 12.5px/1 var(--body);letter-spacing:.08em}
/* The welcome fan: the right card's top corner hides under the middle one */
.fan-card:nth-child(3) .idx:not(.flip){visibility:hidden}
/* Tap targets at least 44px */
.etsy-wait .row .btn{min-height:44px}
.etsy-help{max-width:44ch}
/* Card back colors: two rows of four on phones, never touching the edge */
@media (max-width:520px){
  .back-edit .sw-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));justify-items:center;gap:8px 4px}
  .back-edit .sw{width:auto;font-size:12.5px}
}
.back-edit .field .small{margin-top:4px}
/* Portrait check on a laptop: portrait left, the question and its buttons
   beside it, both starting at the same top; header and names centered over both. */
@media (min-width:1000px){
  .pr-stage{align-items:start;align-content:start;justify-items:start;text-align:start}
  .pr-stage > .pr-left{justify-self:center}
  .pr-stage .approve-q,.pr-stage .role-line{text-align:start}
  .pr-stage > .approve-head{justify-content:center;justify-self:center;gap:16px}
  .pr-stage > .cast-strip{justify-self:center}
  .pr-stage > .approve-q{margin-top:18px}
}
.slot.now:not(.done) .slot-idx{display:none} /* the brush line and "Making…" say it; the faded index under them read as clutter */

/* Phones: the chip on its own line under the hint (never a line starting with a dot) */
@media (max-width:699px){.changes-left{display:block;width:fit-content;margin:8px auto 0}}
#share-deck{min-height:44px}

/* =========== Every screen in the middle =========== */
/* Up and down, two kinds of screen:
   - Steps (questions, forms, the deck, the viewer) start at the same spot,
     a little below the top, every time: the title never jumps between
     steps and nothing moves while you add things. The rest of the space
     goes below.
   - Moments with one message (start, waiting, needs a photo, expired,
     waiting for Etsy, the gift cover) sit in the middle.
   Both spacers shrink to nothing when a screen is taller than the window,
   so long screens start at the top and scroll. */
.intake main#step::before{content:"";flex:0 1 clamp(8px,7dvh,72px);min-height:0}
.intake main#step::after{content:"";flex:1 1 0;min-height:0}
.intake main#step:has(> :is(.entry,.moment,.reveal-cover))::before{flex:1 1 0}
.intake main#step > :is(.stage,.entry){margin-block:0}
.intake .choices,.intake .style-pick,.intake .rv,.intake .rv-side{flex:0 0 auto}
@media (max-height:620px){.intake .choices{grid-auto-rows:minmax(44px,auto)}}
/* Side to side: the question, its line and the chips are centered; forms,
   panels and lists keep their own left-aligned layout inside the column. */
.intake main#step > .q,.intake main#step > .q-sub{text-align:center;text-wrap:balance;margin-inline:auto;max-width:min(100%,62ch)}
@media (min-width:700px){.intake main#step > .q{max-width:min(100%,26ch)}}
.intake main#step > .seg.chips{justify-content:center;max-width:780px;margin-inline:auto}
.intake main#step > .add-own{margin-inline:auto;width:100%}
.intake main#step > :is(.choices,.style-pick,.loves,#subjects,.photo-tips,#photo-rows,.fields,.photo-note,.consent,.consent-done){width:100%;max-width:820px;margin-inline:auto}
.intake main#step > .photo-note{text-align:center;margin-top:4px}
/* Photo tips: two equal boxes, same columns as the people under them. */
.intake main#step > .photo-tips{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-width:820px}
.intake main#step > .photo-tips .tip{margin:0}

/* =========== Etsy pay box: one alignment grid =========== */
/* Phones: a short list, each row "label ... control" on one centre line,
   hairlines between, then the full-width button and the how-to under it. */
.etsy-pay{display:grid;gap:0;width:min(100%,460px);text-align:start;justify-items:stretch;padding:6px 16px 14px}
.etsy-pay .pay-field{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;border-bottom:1px solid var(--line)}
.etsy-pay .pay-label{font-size:14px;font-weight:500;color:var(--muted)}
.etsy-pay .pay-value{font:600 22px/1 var(--body);font-variant-numeric:tabular-nums;color:var(--ink)}
.etsy-pay .qty{gap:6px}
.etsy-pay .etsy-code-row{gap:2px;flex-wrap:nowrap;justify-content:flex-end}
.etsy-pay .etsy-code{font-size:19px;letter-spacing:.04em;white-space:nowrap}
.etsy-pay #etsy-go{width:100%;margin-top:14px}
.etsy-pay .pay-howto{margin:8px 0 0;text-align:center}
.etsy-pay .err{margin-top:8px}
@media (max-width:380px){.etsy-pay .pay-code{flex-wrap:wrap;padding-block:8px}.etsy-pay .pay-code .etsy-code-row{width:100%;justify-content:space-between}}
/* Order box, two halves: what you're buying | how to pay. Phones stack them
   as label-left / control-right rows; wide screens put them side by side,
   label over value, with one type scale: labels 13px muted, the price in
   the display face, the code in mono (it's typed), one primary button. */
.etsy-pay .pay-sum,.etsy-pay .pay-act{display:grid;align-content:start}
.etsy-pay .pay-label{font-size:13px;letter-spacing:.01em}
.etsy-pay .pay-value{font:600 26px/1 var(--display);color:var(--ink);font-variant-numeric:lining-nums tabular-nums}
.etsy-pay .pay-total{border-bottom:0;min-height:48px}
.etsy-pay .pay-ship{margin:-6px 0 0;padding-bottom:10px;border-bottom:1px solid var(--line);font-size:13px;color:var(--muted);text-align:end}
.etsy-pay .pay-act .pay-field{border-bottom:0}
.etsy-pay .pay-legal{margin:6px 0 0;font-size:12.5px}
@media (min-width:1000px){
  .deck-screen .etsy-pay{width:min(100%,880px);grid-template-columns:minmax(0,1fr) minmax(0,1.35fr);column-gap:0;padding:0;align-items:stretch}
  .deck-screen .etsy-pay .pay-sum{padding:14px 24px;gap:2px;border-inline-end:1px solid var(--line)}
  .deck-screen .etsy-pay .pay-act{padding:14px 24px;gap:6px}
  .deck-screen .etsy-pay .pay-field{display:grid;gap:6px;min-height:0;border:0;justify-items:start}
  .deck-screen .etsy-pay .pay-value{font-size:36px}
  .deck-screen .etsy-pay .pay-ship{margin:0;padding:0;border:0;text-align:start}
  .deck-screen .etsy-pay .pay-qty{margin-top:6px;grid-template-columns:auto auto;align-items:center;justify-content:start;column-gap:14px}
  .deck-screen .etsy-pay .pay-code{grid-template-columns:auto 1fr;align-items:center;column-gap:14px}
  .deck-screen .etsy-pay .pay-code .etsy-code-row{justify-content:flex-start}
  .deck-screen .etsy-pay .etsy-code{font-size:22px}
  .deck-screen .etsy-pay #etsy-go{width:100%;margin:2px 0 0;min-height:48px}
  .deck-screen .etsy-pay .pay-howto,.deck-screen .etsy-pay .pay-legal{text-align:start;margin:0}
}

/* Phones: the bar pinned to the bottom until the order box is on screen. */
.pay-dock{position:fixed;inset-inline:0;bottom:0;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px max(16px,env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));background:var(--panel);border-top:1px solid var(--line);box-shadow:0 -8px 20px -14px rgba(0,0,0,.35)}
.pay-dock p{margin:0;display:grid;gap:2px;line-height:1.1;text-align:start;justify-items:start}
.pay-dock p span{font-size:12.5px;color:var(--muted)}
.pay-dock p b{font:600 22px/1 var(--display);font-variant-numeric:lining-nums tabular-nums}
.pay-dock .btn{min-height:48px;padding-inline:22px}
@media (min-width:1000px){.pay-dock{display:none}}

/* =========== Card viewer: arrows in their own lane =========== */
/* The arrows sit beside the card(s), never on top of them and never past
   the screen edge (where they got cut off): the stage keeps a 44px lane
   plus a gap on each side, and the card shrinks to fit between them. */
.pv-stage{box-sizing:border-box;padding-inline:52px;max-width:100%}
.pv-stage .pv-arrow.prev{inset-inline-start:0}
.pv-stage .pv-arrow.next{inset-inline-end:0}
.viewer .pv-stage .pv-card.big{max-height:calc((100vw - 32px - 104px) * 1.36)}
.viewer .pv-stage .joker-duo .pv-card.big{max-height:calc((100vw - 32px - 104px - 20px) / 2 * 1.36)}
@media (min-width:1000px){
  .pv-stage{padding-inline:60px}
  .pv-stage .pv-arrow.prev,.pv-stage:has(.joker-duo) .pv-arrow.prev,.pv-stage:has(.back-pair) .pv-arrow.prev{inset-inline-start:0}
  .pv-stage .pv-arrow.next,.pv-stage:has(.joker-duo) .pv-arrow.next,.pv-stage:has(.back-pair) .pv-arrow.next{inset-inline-end:0}
}
/* Card back next to the box: the back is as tall as its own picture. The
   viewer's fixed card heights are for single cards; on the back they left
   a white block under the art. */
.viewer .back-pair .pv-card.big{height:auto !important;max-height:none}

/* =========== Alignment pass =========== */
/* Photo and portrait side by side: bottoms line up, so "Your photo" and
   "Portrait" read as one caption line. */
.compare{align-items:flex-end}
/* Number-card choice: the three tiles share rows, so a title that wraps to
   two lines pushes every description down together (subgrid). */
.modes{grid-template-rows:auto auto auto}
.mode{grid-row:span 3;grid-template-rows:subgrid;row-gap:3px}
/* People step: the add buttons and the couple question sit in the same
   column as the name fields, starting at its left edge. */
.intake[data-step="people"] main#step > :is(.row,.couple-q){width:100%;max-width:820px;margin-inline:auto}
@media (min-width:1000px){.intake[data-step="people"] main#step > :is(#subjects,.row,.couple-q){max-width:680px}}

/* The photo and portrait, and the versions under them, move as one block,
   so opening a panel on the right never pushes the versions down. */
.pr-left{display:grid;justify-items:center;gap:10px;width:100%;min-width:0}
.pr-left .compare{margin:0 auto}

/* ---- photo consent box (photo step + late photo) ---- */
.consent{display:grid;gap:4px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--panel);margin:4px 0 10px}
.consent-check{display:flex;gap:10px;align-items:flex-start;font-size:14px;line-height:1.4;font-weight:500;cursor:pointer;padding-block:2px}
.consent-done{display:flex;flex-wrap:wrap;gap:4px 6px;align-items:center;margin:2px 0 8px;font-size:13px;color:var(--muted)}
.consent-done svg{width:16px;height:16px;fill:none;stroke:var(--ok);stroke-width:2.5}
.consent-done a{color:inherit;text-decoration:underline}
.consent-check input{flex:none;width:20px;height:20px;margin:1px 0 0;accent-color:var(--accent)}
.consent-more{margin:0 0 0 30px;font-size:13px;color:var(--muted)}
.consent-more a{color:inherit;text-decoration:underline}
.consent .err{margin:0 0 0 30px}
.consent.nudge{border-color:var(--danger);animation:consent-nudge .4s}
@keyframes consent-nudge{25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}
@media (prefers-reduced-motion:reduce){.consent.nudge{animation:none}}

/* ---- legal links + pages ---- */
.entry-legal{display:flex;gap:8px;justify-content:center;margin:14px 0 0;font-size:13px;color:var(--muted)}
.entry-legal a,.pay-legal a{color:inherit;text-decoration:underline}
.pay-legal{margin:6px 0 0;color:var(--muted);text-align:center}
.legal{max-width:68ch;padding-bottom:48px}
.legal h3{font-size:17px;margin:22px 0 6px}
.legal p,.legal li{line-height:1.55}
.legal ul{padding-inline-start:20px;display:grid;gap:4px}
.legal-date{color:var(--muted);margin-top:-6px}
.legal-back{margin-top:28px}
#brand a{color:inherit;text-decoration:none}
