/* Secret Santa — "but the gift talks back." Matches the December poster:
   ink night, cream tags, Keepsake red accent, gold numbers, Mynerve handwriting.
   Signature motions: gift tags sway; the organiser's draw shuffles the tags;
   your match is a box you unwrap; the QR tag on the gift opens a page that
   flips open, and they get three guesses at who wrote it. */
:root {
  --ink: #071013; --cream: #f3ede4; --paper: #fffaf4; --line: #d9d0c4; --muted: #6b6560;
  --red: #d70913; --red-d: #7d0a11; --red-bright: #e3141d; --gold: #c9a84c; --gold-d: #9c7f2f; --pine: #1f4d3a; --good: #2f9e6a;
  --sans: "Cabin", system-ui, sans-serif; --serif: "Mynerve", cursive; --mono: "Ubuntu", system-ui, sans-serif; --hand: "Mynerve", cursive;
  --night: #071013; --night-2: #15181f; --night-3: #1f232c; --edge: #2b2f38; --text: #f0ece6; --soft: #a8a29b;
  --ease: cubic-bezier(.2,.7,.2,1); --spring: cubic-bezier(.34,1.56,.64,1);
}
* { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; overflow-x: hidden; max-width: 100%; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
body { min-height: 100vh; min-height: 100dvh; background: var(--cream); color: var(--ink); font: 17px/1.45 var(--sans); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }

.screen { min-height: 100vh; min-height: 100dvh; width: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; position: relative;
  padding: max(14px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
.screen--center { justify-content: center; align-items: center; text-align: center; gap: 14px; }
.top { display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.logo { font-weight: 800; font-size: 18px; letter-spacing: -.02em; text-decoration: none; }
.mono { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; opacity: .75; }
.serif { font-family: var(--serif); font-style: normal; font-weight: 400; letter-spacing: 0; color: var(--red); }
.big { margin: 0; font-weight: 800; font-size: clamp(38px, 11.5vw, 60px); line-height: .94; letter-spacing: -.035em; }
.sub { margin: 10px 0 0; font-size: 18px; color: var(--muted); }
h2.h { margin: 26px 0 10px; font-size: 21px; letter-spacing: -.01em; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 0 24px; border: 0; border-radius: 15px; background: var(--red); color: #fff7f2; font-weight: 800; font-size: 18px; text-decoration: none; cursor: pointer; box-shadow: 0 4px 0 var(--red-d); transition: transform .1s, box-shadow .1s, opacity .2s; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--red-d); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--ink { background: var(--ink); color: var(--cream); box-shadow: 0 4px 0 #000; }
.btn--light { background: #fff; color: var(--ink); box-shadow: 0 4px 0 var(--line); border: 2px solid var(--ink); }
.btn--wide { width: 100%; }
.btn--confirm { background: var(--ink); box-shadow: 0 4px 0 #000; }
.btn:focus-visible, .chip:focus-visible, .linkbtn:focus-visible, .gift:focus-visible, .x:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.linkbtn { min-height: 44px; padding: 0 6px; border: 0; background: none; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; opacity: .85; }
.linkbtn--danger { color: var(--red); }

.field { display: grid; gap: 7px; font-weight: 700; font-size: 15px; }
.field em { font-style: normal; font-weight: 500; color: var(--muted); }
.field input, .field select, .wishes input { min-height: 50px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 14px; background: #fff; font-size: 17px; outline: 0; width: 100%; }
.field input:focus, .wishes input:focus { box-shadow: 4px 4px 0 var(--red); }
.wishes { display: grid; gap: 8px; }
.err { min-height: 1.3em; margin: 0; color: var(--red); font-weight: 700; }
.fine { margin: 8px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.form { display: grid; gap: 14px; margin-top: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 42px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 999px; background: transparent; font-weight: 700; cursor: pointer; }
.chip[aria-checked="true"] { background: var(--ink); color: var(--cream); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 700; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--red); }

.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.fact { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); font-weight: 700; font-size: 15px; }
.fact svg { flex: none; }

/* ── Gift tags on strings, swaying ── */
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.tag { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 26px; background: var(--paper); border: 1.5px solid #cfc3b2; color: var(--ink); font-weight: 700; font-size: 15px;
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%); border-radius: 0 8px 8px 0; transform-origin: 6px 50%; animation: sway 3.6s ease-in-out infinite; animation-delay: var(--d, 0s); }
.tag::before { content: ""; position: absolute; left: 10px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--cream); box-shadow: inset 0 0 0 1.5px #b9ab98; }
.tag.is-me { background: #fff3c4; }
.tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.tag .x { width: 28px; height: 28px; margin-right: -8px; border: 0; border-radius: 8px; background: rgba(11,13,18,.06); display: grid; place-items: center; cursor: pointer; }
.tag.is-open { background: #e6f2ea; }
@keyframes sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2.5deg); } }

/* ── The gift box ── */
.giftstage { position: relative; height: 330px; display: grid; place-items: end center; margin-top: 10px; }
.gift { position: relative; width: 190px; height: 250px; border: 0; padding: 0; background: none; cursor: pointer; }
.gift__box { position: absolute; left: 10px; right: 10px; bottom: 0; height: 150px; border-radius: 6px; background: linear-gradient(90deg, #a90f18, var(--red) 30%, #d21a24 60%, var(--red)); box-shadow: inset 0 -16px 24px rgba(0,0,0,.18), 0 26px 40px -22px rgba(0,0,0,.6); }
.gift__ribbon { position: absolute; left: 50%; bottom: 0; width: 28px; height: 150px; margin-left: -14px; background: linear-gradient(90deg, var(--gold-d), var(--gold) 40%, #e2c66d 60%, var(--gold)); transform-origin: top; }
.gift__lid { position: absolute; left: 0; right: 0; bottom: 142px; height: 44px; border-radius: 6px; background: linear-gradient(90deg, #b3111b, #d51c26 40%, var(--red)); box-shadow: 0 6px 10px -6px rgba(0,0,0,.5); }
.gift__lid::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 30px; margin-left: -15px; background: linear-gradient(90deg, var(--gold-d), var(--gold) 40%, #e2c66d 60%, var(--gold)); }
.gift__bow { position: absolute; left: 50%; bottom: 180px; width: 0; height: 0; }
.gift__bow i { position: absolute; bottom: 0; width: 56px; height: 36px; border: 9px solid var(--gold); border-radius: 50%; background: transparent; }
.gift__bow i:first-child { right: 0; transform: rotate(-24deg); transform-origin: right bottom; }
.gift__bow i:last-child { left: 0; transform: rotate(24deg); transform-origin: left bottom; }
.gift__bow b { position: absolute; left: -11px; bottom: -6px; width: 22px; height: 20px; border-radius: 6px; background: var(--gold-d); }
.gift.is-idle { animation: jiggle 2.8s ease-in-out infinite; }
@keyframes jiggle { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-3deg); } 88% { transform: rotate(3deg); } 92% { transform: rotate(-2deg); } 96% { transform: rotate(1deg); } }
.gift__tag { position: absolute; left: 50%; bottom: 60px; width: 160px; margin-left: -80px; padding: 16px 14px 14px 30px; background: var(--paper); border: 1.5px solid #cfc3b2; clip-path: polygon(18px 0, 100% 0, 100% 100%, 18px 100%, 0 50%); border-radius: 0 10px 10px 0; text-align: left; opacity: 0; }
.gift__tag small { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.gift__tag b { display: block; font-family: var(--hand); font-size: 26px; line-height: 1.1; font-weight: 400; }
.hint { margin: 16px 0 0; font-family: var(--serif); font-style: normal; font-size: 22px; text-align: center; }

/* ── Match card ── */
.match { position: relative; margin-top: 14px; padding: 22px 18px 18px 40px; background: var(--paper); border: 2px solid #cfc3b2; clip-path: polygon(26px 0, 100% 0, 100% 100%, 26px 100%, 0 50%); border-radius: 0 16px 16px 0; }
.match::before { content: ""; position: absolute; left: 20px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--cream); box-shadow: inset 0 0 0 2px #b9ab98; }
.match small { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.match__name { margin: 4px 0 0; font-family: var(--hand); font-size: clamp(40px, 12vw, 56px); line-height: 1; color: var(--red); overflow-wrap: anywhere; }
.match ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.match li { display: flex; gap: 8px; align-items: baseline; font-weight: 600; }
.match li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--gold); transform: translateY(-2px) rotate(45deg); }
.match .no { margin: 10px 0 0; color: var(--muted); font-size: 15px; }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.countdown div { padding: 10px 4px; border-radius: 12px; background: #fff; border: 1.5px solid var(--line); text-align: center; }
.countdown b { display: block; font-size: 24px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown small { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* Anonymous chat */
.thread { display: grid; gap: 8px; margin-top: 10px; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.bubble small { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; opacity: .7; margin-bottom: 2px; }
.bubble--me { justify-self: end; background: var(--ink); color: var(--cream); border-bottom-right-radius: 4px; }
.bubble--them { justify-self: start; background: #fff; border: 1.5px solid var(--line); border-bottom-left-radius: 4px; }
.compose { display: flex; gap: 8px; margin-top: 10px; }
.compose input { flex: 1; min-height: 48px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 14px; background: #fff; font-size: 16px; outline: 0; }
.compose button { min-height: 48px; padding: 0 16px; border: 0; border-radius: 14px; background: var(--ink); color: var(--cream); font-weight: 800; cursor: pointer; }
.panel { margin-top: 14px; padding: 16px; border-radius: 18px; background: #fff; border: 2px solid var(--ink); }
.panel--soft { border-color: var(--line); }
details.panel summary { min-height: 40px; display: flex; align-items: center; font-weight: 800; cursor: pointer; list-style: none; }
details.panel summary::-webkit-details-marker { display: none; }
details.panel summary::after { content: "+"; margin-left: auto; font-size: 22px; color: var(--red); }
details.panel[open] summary::after { content: "–"; }

/* Organiser */
.share-row { display: flex; gap: 8px; align-items: center; padding: 6px 6px 6px 14px; border-radius: 14px; background: #fff; border: 2px solid var(--ink); }
.share-row input { flex: 1; min-width: 0; border: 0; background: transparent; font-family: var(--mono); font-size: 14px; outline: 0; }
.share-row button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--ink); color: var(--cream); font-weight: 800; cursor: pointer; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.row2 .btn { padding: 0 10px; font-size: 16px; }
.apart { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.apart select { min-height: 48px; padding: 0 10px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; font-size: 16px; width: 100%; }
.apart button { min-height: 48px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--ink); color: var(--cream); font-weight: 800; cursor: pointer; }
.pairs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pair { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 6px 0 12px; border-radius: 999px; background: rgba(11,13,18,.07); font-weight: 700; font-size: 14px; }
.pair button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; cursor: pointer; }
.meter { height: 10px; border-radius: 5px; background: rgba(11,13,18,.1); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--good); transition: width .6s var(--ease); }
.people { display: grid; gap: 6px; margin-top: 10px; }
.person { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 46px; padding: 0 6px 0 14px; border-radius: 12px; background: #fff; border: 1.5px solid var(--line); font-weight: 700; }
.person span { display: inline-flex; align-items: center; gap: 8px; }
.person small { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--muted); }
.person button { min-height: 36px; padding: 0 10px; border: 0; border-radius: 10px; background: rgba(11,13,18,.06); font-weight: 700; font-size: 13px; cursor: pointer; }
.sticky { position: sticky; bottom: 0; z-index: 4; margin: 18px -20px 0; padding: 14px 20px max(14px, env(safe-area-inset-bottom)); background: linear-gradient(to bottom, rgba(243,237,228,0), var(--cream) 30%); }

/* confetti for the unwrap */
.bit { position: fixed; top: -20px; z-index: 30; width: 9px; height: 14px; border-radius: 2px; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--dx, 40px), 110vh) rotate(var(--rot, 540deg)); } }

.shot { position: fixed; left: -10000px; top: 0; width: 450px; height: 800px; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 56px 36px 40px; background: radial-gradient(80% 50% at 50% 0%, #3a0609, #071013 70%); color: #fff7f2; }
.shot__foot { display: flex; justify-content: space-between; align-items: flex-end; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.shot__foot b { font-family: var(--sans); font-size: 18px; letter-spacing: 0; text-transform: none; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } .bit { display: none; } }


/* ═════ Poster theme: ink night ═════ */
body { background: var(--night); color: var(--text); }
.sub, .fine, .field em, .person small, .countdown small, .match .no { color: var(--soft); }
.serif { color: var(--red-bright); }
.mono { color: var(--soft); opacity: 1; }
.btn--ink { background: var(--text); color: var(--night); box-shadow: 0 4px 0 #8f877b; }
.btn--light { background: transparent; color: var(--text); border: 2px solid var(--text); box-shadow: none; }
.btn--confirm { background: var(--text); color: var(--night); box-shadow: 0 4px 0 #8f877b; }
.linkbtn--danger { color: #ff8a8f; }
.err { color: #ff8a8f; }
.field input, .field select, .wishes input, .compose input, .apart select { background: var(--text); color: var(--night); border-color: transparent; }
.field input::placeholder, .wishes input::placeholder, .compose input::placeholder { color: #8a837b; }
.field input:focus, .wishes input:focus, .compose input:focus { box-shadow: 4px 4px 0 var(--red-bright); }
.chip { border-color: var(--text); color: var(--text); }
.chip[aria-checked="true"] { background: var(--red-bright); border-color: var(--red-bright); color: #fff; }
.fact { background: var(--night-2); border-color: var(--edge); color: var(--text); }
.panel { background: var(--night-2); border-color: var(--edge); }
.panel--soft { border-color: var(--edge); }
.countdown div { background: var(--night-2); border-color: var(--edge); }
.bubble--me { background: var(--red); color: #fff7f2; }
.bubble--them { background: var(--text); color: var(--night); border: 0; }
.compose button, .apart button, .share-row button { background: var(--red-bright); color: #fff; }
.share-row { background: var(--night-2); border-color: var(--edge); }
.share-row input { color: var(--text); }
.person { background: var(--night-2); border-color: var(--edge); }
.person button, .tag .x { background: rgba(255,255,255,.08); color: var(--text); }
.tag .x { background: rgba(11,13,18,.08); color: var(--night); }
.pair { background: var(--night-3); }
.pair button { color: var(--text); }
.meter { background: var(--night-3); }
.sticky { background: linear-gradient(to bottom, rgba(11,13,18,0), var(--night) 30%); }
h2.h { color: var(--text); }
.num { font-family: var(--mono); color: var(--gold); }

/* Poster title */
.poster-title { margin: 18px 0 0; display: flex; flex-direction: column; }
.poster-title b { font-weight: 800; font-size: clamp(64px, 21vw, 120px); line-height: .82; letter-spacing: -.05em; text-transform: uppercase; }
.poster-title b:first-child { color: var(--red-bright); }
.poster-title i { margin-top: 10px; font-family: var(--serif); font-size: clamp(28px, 8.4vw, 44px); line-height: 1.05; }
.poster-title i span { color: var(--red-bright); }
.steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: baseline; font-weight: 800; font-size: 19px; line-height: 1.15; }
.steps li span { font-family: var(--mono); font-weight: 400; font-size: 13px; color: var(--gold); }
.goldbar { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; padding: 18px; border-radius: 20px; background: var(--gold); color: var(--night); }
.goldbar p { margin: 0; font-family: var(--serif); font-style: normal; font-size: 24px; line-height: 1.05; }
.goldbar small { display: block; margin-top: 4px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-style: normal; }
.goldbar .btn { background: var(--night); color: var(--text); box-shadow: none; }

/* The poster's gift tag: cream card, punched hole, To / From ? ? ? */
.ptag { position: relative; width: min(300px, 82vw); padding: 22px 22px 20px; border-radius: 20px; background: var(--text); color: var(--night); box-shadow: 0 26px 50px -22px #000; transform: rotate(-5deg); }
.ptag__hole { width: 26px; height: 26px; border-radius: 50%; background: var(--night); box-shadow: inset 0 0 0 6px var(--text), 0 0 0 2px var(--night); }
.ptag__row { display: grid; gap: 2px; padding: 10px 0; border-bottom: 2px dashed #b9b2a8; }
.ptag__row small { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #6b6560; }
.ptag__to { font-family: var(--hand); font-size: 44px; line-height: 1; font-weight: 600; overflow-wrap: anywhere; }
.ptag__from { font-weight: 800; font-size: 40px; line-height: 1; letter-spacing: .14em; color: var(--red-bright); }
.ptag__foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; padding-top: 12px; }
.ptag__foot p { margin: 0; font-family: var(--serif); font-style: normal; font-size: 18px; line-height: 1.1; }
.ptag__qr { flex: none; width: 92px; height: 92px; padding: 5px; border-radius: 10px; background: #fff; }
.ptag__qr img, .ptag__qr canvas { display: block; width: 100% !important; height: 100% !important; }
.ptag__url { margin: 8px 0 0; font-family: var(--mono); font-size: 11px; color: #6b6560; }
.ptag--sway { animation: tagsway 4.5s ease-in-out infinite; transform-origin: 34px 34px; }
@keyframes tagsway { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(-1deg); } }
.string { position: absolute; left: 34px; top: -120px; width: 2px; height: 128px; background: var(--red-bright); }

/* Match card in the poster style */
.match { background: var(--text); color: var(--night); border: 0; clip-path: none; border-radius: 20px; padding: 20px 20px 18px; transform: rotate(-2deg); box-shadow: 0 26px 50px -22px #000; }
.match::before { position: static; display: block; width: 26px; height: 26px; margin: 0 0 8px; border-radius: 50%; background: var(--night); box-shadow: inset 0 0 0 6px var(--text), 0 0 0 2px var(--night); }
.match__name { font-family: var(--hand); font-weight: 600; color: var(--night); }
.match .no { color: #6b6560; }

/* Tag maker */
.maker textarea { display: block; width: 100%; min-height: 130px; margin-top: 10px; padding: 14px; border: 0; border-radius: 14px; background: var(--text); color: var(--night); font-family: var(--hand); font-size: 24px; line-height: 1.25; resize: vertical; outline: 0; }
.maker textarea:focus { box-shadow: 4px 4px 0 var(--red-bright); }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.photo { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--night-3); border: 2px dashed var(--edge); display: grid; place-items: center; color: var(--soft); font-weight: 700; font-size: 13px; text-align: center; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo .x { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(11,13,18,.7); color: #fff; display: grid; place-items: center; cursor: pointer; }
.photo .bar { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; }
.photo .bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .2s; }
.tagready { display: grid; justify-items: center; gap: 14px; margin-top: 16px; padding-top: 20px; }
.tagstatus { margin: 0; font-weight: 700; text-align: center; }
.tagstatus.is-found { color: var(--gold); }

/* ═════ The gift page (/g/<TAG>) ═════ */
.giftpage { perspective: 1400px; }
.flip { position: relative; width: min(330px, 86vw); margin: 130px auto 0; transform-style: preserve-3d; transition: transform 1s cubic-bezier(.3,.7,.2,1); }
.flip.is-open { transform: rotateY(180deg); }
.flip__front, .flip__back { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip__back { position: absolute; inset: 0; transform: rotateY(180deg); border-radius: 20px; background: var(--text); box-shadow: 0 26px 50px -22px #000; }
.letter { margin-top: 18px; padding: 22px 20px; border-radius: 20px; background: var(--text); color: var(--night); box-shadow: 0 26px 50px -22px #000; }
.letter__note { margin: 6px 0 0; font-family: var(--hand); font-size: clamp(26px, 7.6vw, 32px); line-height: 1.2; white-space: pre-wrap; overflow-wrap: anywhere; }
.polas { position: relative; height: 230px; margin-top: 18px; }
.pola { position: absolute; width: 58%; padding: 8px 8px 26px; background: #fff; box-shadow: 0 16px 30px -14px rgba(0,0,0,.6); }
.pola img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.pola:nth-child(1) { left: 0; top: 10px; transform: rotate(-6deg); }
.pola:nth-child(2) { right: 0; top: 0; transform: rotate(5deg); }
.pola:nth-child(3) { left: 20%; top: 60px; transform: rotate(-1deg); }
.pola--solo { left: 18% !important; width: 64%; }
.song { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 14px; border-radius: 16px; background: var(--night-2); border: 1px solid var(--edge); text-decoration: none; color: var(--text); }
.song .disc { flex: none; width: 44px; height: 44px; border-radius: 50%; background: repeating-radial-gradient(circle, #071013 0 2px, #22262f 2px 4px); display: grid; place-items: center; animation: spin 5s linear infinite; }
.song .disc i { width: 14px; height: 14px; border-radius: 50%; background: var(--red-bright); }
.song b { display: block; }
.song small { color: var(--soft); font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }
.guess { margin-top: 22px; }
.guess__names { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.guess__names button { min-height: 46px; padding: 0 16px; border: 2px solid var(--text); border-radius: 999px; background: transparent; color: var(--text); font-weight: 800; cursor: pointer; }
.guess__names button.is-wrong { border-color: var(--edge); color: var(--soft); text-decoration: line-through; cursor: default; }
.guess__names button.is-right { background: var(--gold); border-color: var(--gold); color: var(--night); }
.lives { display: flex; gap: 6px; }
.lives i { width: 12px; height: 12px; border-radius: 50%; background: var(--red-bright); }
.lives i.off { background: var(--edge); }
.shake { animation: shake .45s; }
@keyframes shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(4px); } }

/* Print: only the tags, at real size */
.printsheet { display: none; }
@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; }
  body > *:not(.printsheet) { display: none !important; }
  .printsheet { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10mm; }
  .printsheet .ptag { width: 80mm; transform: none; box-shadow: none; border: .4mm dashed #999; color: #000; background: #fff; }
  .printsheet .ptag__hole { background: #fff; box-shadow: inset 0 0 0 1.2mm #000; }
}
