/* Not My Event: the look of "The Last Supper Before Black Friday" (public/templates/last-supper-before-black-friday.html), a traditional Thanksgiving home told by a distinguished,
   mildly exasperated turkey in an old-master portrait. Burgundy #672B36, copper #B67842, antique gold #D5B878, cream #EDE0C8, walnut #403026.
   The drawings are /assets/supper-art.js. Moving things use only transform and opacity. */
:root {
  --burg: #672B36; --burgD: #431a22; --copper: #B67842; --gold: #D5B878; --goldL: #efe0b4; --cream: #EDE0C8; --walnut: #403026; --ink: #EDE0C8; --ink2: #d9c9a8;
  --accent: #D5B878; --accentInk: #2a1f18; --btn: #8a3a48; --tint: rgba(0, 0, 0, 0); --panel: rgba(42, 28, 22, .86); --line: rgba(213, 184, 120, .5);
  --serif: "Playfair Display", "Cormorant Garamond", Georgia, serif; --ui: "Lato", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
[data-theme="copper"] { --btn: #9a5a28; --tint: rgba(182, 120, 66, .16); --accent: #efc58e; }
[data-theme="walnut"] { --btn: #5c4535; --tint: rgba(40, 28, 20, .22); --accent: #D5B878; }
* { box-sizing: border-box; }
html, body { background: #1b110e; color: var(--ink); }
body { margin: 0; font-family: var(--ui); font-size: 17px; line-height: 1.55; overflow-x: clip; -webkit-tap-highlight-color: transparent; }
body.modal { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 700; line-height: 1.15; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 12px; top: -64px; z-index: 100; padding: 10px 16px; border-radius: 6px; background: var(--accent); color: var(--accentInk); font-weight: 700; transition: top .15s; }
.skip:focus { top: 12px; }

/* ---------- the stage: the house, behind everything ---------- */
#stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #1b110e; }
.world { position: absolute; inset: 0; overflow: hidden; transform-origin: 0 0; will-change: opacity; }
.world > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.grade { position: absolute; inset: 0; pointer-events: none; }
.g-warm { background: radial-gradient(120% 90% at 50% 55%, rgba(255, 190, 110, .08), rgba(16, 6, 4, .5) 100%); }
.g-tint { background: var(--tint); }
#fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* things in the drawings that move */
.flm { transform-box: fill-box; transform-origin: 50% 100%; animation: flick .9s ease-in-out infinite alternate; }
.flm.b { animation-duration: 1.3s; animation-delay: -.4s; } .flm.a { animation-duration: 1.1s; }
@keyframes flick { 0% { transform: scale(1, 1) skewX(0); } 50% { transform: scale(.93, 1.08) skewX(2deg); } 100% { transform: scale(1.05, .94) skewX(-2deg); } }
.glint { transform-box: fill-box; transform-origin: 50% 50%; animation: glint 2.6s ease-in-out infinite; }
@keyframes glint { 0%, 60%, 100% { opacity: 0; transform: scale(.4); } 75% { opacity: 1; transform: scale(1.2); } }
.stm { animation: stm 3.4s ease-out infinite; }
.stm.s1 { animation-delay: -1.1s; } .stm.s2 { animation-delay: -2.2s; }
@keyframes stm { 0% { opacity: .6; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-18px); } }
.hot { cursor: pointer; pointer-events: all; }
.hit { pointer-events: all; }
#spend { animation: swing 2s ease-in-out infinite alternate; }
@keyframes swing { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
#sknock.knock { animation: knock .6s ease-out; }
@keyframes knock { 0% { transform: rotate(0); } 18% { transform: rotate(-34deg); } 36% { transform: rotate(0); } 54% { transform: rotate(-20deg); } 72% { transform: rotate(0); } 100% { transform: rotate(0); } }
#sfire .flm { animation-duration: .8s; }
.gl { animation: gl 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 50%; }
.gl.g1 { animation-delay: -.6s; } .gl.g2 { animation-delay: -1.2s; } .gl.g3 { animation-delay: -1.8s; }
@keyframes gl { 0%, 100% { opacity: .5; transform: scale(1); } 50% { opacity: 1; transform: scale(1.6); } }
#slid { transition: transform .8s cubic-bezier(.3, 1.2, .5, 1); }
.box-open #slid { transform: rotate(-72deg); }
#scards { transition: transform .9s ease .2s; }
.box-open #scards { transform: translateY(-40px); }
#sdchair { transition: transform 1.1s cubic-bezier(.5, 0, .2, 1); }
.chair-in #sdchair { transform: translateX(120px); }
.chair-half #sdchair { transform: translateX(60px); }
#spc { transition: transform .9s ease; transform-box: fill-box; transform-origin: 50% 100%; }
.card-up #spc { transform: translateY(-10px); }
.shine #sshine .sp { animation: sp 1.8s ease-out infinite; }
.shine #sshine .sp.s1 { animation-delay: -.45s; } .shine #sshine .sp.s2 { animation-delay: -.9s; } .shine #sshine .sp.s3 { animation-delay: -1.35s; }
@keyframes sp { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
.glim .gl { animation-duration: .45s; }
.lite .flm, .lite .gl, .lite .glint, .lite #spend, .lite .stm { animation: none; }

/* ---------- the turkey in his portrait: eyes that follow you, brows, a jaw that talks, a bow tie, and a back for when he turns away ---------- */
.portrait { --px: 0; --py: 0; }
.p-pupil { transform: translate(calc(var(--px) * 1px), calc(var(--py) * 1px)); transition: transform .18s ease-out; }
.p-lid { transition: transform .35s ease; }
.m-annoyed .p-lid { transform: translateY(4px); } .m-bored .p-lid { transform: translateY(6px); } .m-pleased .p-lid { transform: translateY(-3px); }
.p-brow { transform-box: fill-box; transform-origin: 50% 50%; transition: transform .35s ease; }
.m-annoyed .p-brow.bl { transform: rotate(12deg) translateY(1px); } .m-annoyed .p-brow.br { transform: rotate(-12deg) translateY(1px); }
.m-bored .p-brow.bl { transform: rotate(4deg); } .m-bored .p-brow.br { transform: rotate(-4deg); }
.m-pleased .p-brow.bl { transform: rotate(-8deg) translateY(-2px); } .m-pleased .p-brow.br { transform: rotate(8deg) translateY(-2px); }
.p-fan { transform-box: fill-box; transform-origin: 50% 90%; transition: transform .6s ease; }
.m-pleased .p-fan { transform: scale(1.07); } .m-annoyed .p-fan { transform: scale(.96); }
.p-jaw { transform-box: fill-box; transform-origin: 50% 0; }
.talk .p-jaw { animation: jaw .24s ease-in-out infinite alternate; }
@keyframes jaw { from { transform: rotate(0) translateY(0); } to { transform: rotate(14deg) translateY(2px); } }
.p-fig { transform-box: fill-box; transform-origin: 50% 100%; animation: breathe 5s ease-in-out infinite alternate; }
@keyframes breathe { from { transform: translateY(0) scale(1); } to { transform: translateY(-1px) scale(1.012); } }
.p-back { opacity: 0; transition: opacity .6s ease; }
.turned .p-back { opacity: 1; } .turned .p-face { opacity: 0; transition: opacity .6s ease; } .turned .p-tie { opacity: 0; }
.lite .p-fig, .lite .talk .p-jaw { animation: none; }

/* ---------- the heads-up display and the turkey's subtitles ---------- */
.hud { position: fixed; z-index: 20; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: max(10px, env(safe-area-inset-top)) 12px 10px; background: linear-gradient(rgba(27, 17, 14, .78), rgba(27, 17, 14, 0)); pointer-events: none; }
.hud > * { pointer-events: auto; }
.brand { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--goldL); text-shadow: 0 1px 6px rgba(0, 0, 0, .7); max-width: 38vw; line-height: 1.15; }
.hud-r { display: flex; gap: 6px; align-items: center; }
.hbtn { min-height: 44px; padding: 8px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: rgba(42, 28, 22, .78); font-size: 13px; letter-spacing: .02em; }
.hbtn.solid { background: var(--btn); border-color: transparent; font-weight: 700; }
#gauge { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px; border-radius: 999px; border: 1.5px solid var(--line); background: rgba(42, 28, 22, .78); }
#gauge svg { width: 42px; height: 26px; display: block; overflow: visible; }
#gauge .needle { transform-origin: 21px 22px; transform: rotate(var(--ang, 0deg)); transition: transform .6s cubic-bezier(.3, 1.3, .5, 1); }
#gauge b { font-size: 12px; color: var(--goldL); min-width: 2ch; font-variant-numeric: tabular-nums; }
#prog { position: fixed; z-index: 21; left: 0; top: 0; height: 3px; width: 100%; background: rgba(255, 255, 255, .1); }
#prog i { display: block; height: 100%; width: 100%; background: var(--gold); transform: scaleX(0); transform-origin: 0 50%; }
.dots { position: fixed; z-index: 15; right: 8px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 4px; }
.dots button { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 30px; padding: 0 2px; border: 0; background: none; color: var(--ink2); font-size: 12px; }
.dots button span { opacity: 0; transition: opacity .2s; padding: 2px 8px; border-radius: 6px; background: rgba(42, 28, 22, .9); white-space: nowrap; }
.dots button:hover span, .dots button:focus-visible span { opacity: 1; }
.dots i { display: block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--goldL); }
.dots button[aria-current="true"] i { background: var(--goldL); }
#sub { position: fixed; z-index: 18; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(94vw, 640px); display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 16px; background: var(--panel); border: 1.5px solid var(--line); pointer-events: none; }
#sub .cam { flex: none; width: 52px; height: 62px; }
#sub .cam svg { width: 100%; height: 100%; display: block; }
#sub .tx { min-width: 0; }
#sub b { display: block; font: 700 11px var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--goldL); }
#sub span { display: block; font-family: var(--serif); font-size: 16px; line-height: 1.3; }
#sub.in { animation: subin .3s ease-out; }
@keyframes subin { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ---------- the story: words over the house ---------- */
#story { position: relative; z-index: 2; pointer-events: none; padding-bottom: 90px; }
.scene { position: relative; }
.beat { min-height: 100vh; min-height: 100svh; padding: 92px 18px 36px; display: flex; flex-direction: column; justify-content: flex-start; gap: 14px; max-width: 560px; margin: 0 auto; }
.beat.spacer { justify-content: flex-end; min-height: 80svh; padding-bottom: 110px; }
.beat > * { pointer-events: auto; }
.intro { display: grid; gap: 10px; padding: 18px 20px 20px; border-radius: 16px; background: var(--panel); border: 1.5px solid var(--line); }
.kick { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--goldL); }
h1 { font-size: clamp(32px, 8vw, 50px); }
h2 { font-size: clamp(22px, 5.4vw, 32px); }
.lead { font-family: var(--serif); font-size: clamp(17px, 4.4vw, 21px); font-style: italic; color: var(--ink); }
.tagline { font-size: 14px; color: var(--ink2); }
.cue { align-self: center; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); padding: 10px 14px; border-radius: 999px; background: var(--panel); }
.btn { min-height: 48px; padding: 12px 22px; border: 0; border-radius: 999px; background: var(--btn); color: #fff; font-weight: 700; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.btn.ghost { background: rgba(42, 28, 22, .85); border: 1.5px solid var(--line); box-shadow: none; }
.btn:disabled { opacity: .6; cursor: default; }
.linkish { align-self: flex-start; min-height: 44px; padding: 8px 4px; border: 0; background: none; color: var(--goldL); text-decoration: underline; text-underline-offset: 3px; }
.f-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: rgba(42, 28, 22, .85); font-size: 14px; }
.chip[aria-pressed="true"], .chip.done { border-color: var(--goldL); background: rgba(138, 58, 72, .6); }
.hint { font-size: 14px; color: var(--ink2); }
.card, .paper { padding: 18px; border-radius: 16px; background: rgba(42, 28, 22, .92); border: 1.5px solid var(--line); box-shadow: 0 12px 36px rgba(0, 0, 0, .45); }
.q-count { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--goldL); margin-bottom: 8px; }
.note { font-size: 14px; color: var(--ink2); }
.who { display: grid; gap: 6px; }
.counter { display: flex; flex-wrap: wrap; gap: 8px; min-height: 8px; padding: 10px; margin-top: 10px; border-radius: 10px; background: linear-gradient(#c9a06a, #8a6a3a); }
.counter:empty { display: none; }
.plate { display: flex; flex-direction: column; align-items: center; padding: 8px 12px; border-radius: 50%; background: #fffaf0; color: #3a2a18; font-size: 12px; font-weight: 700; text-align: center; min-width: 92px; animation: plop .55s cubic-bezier(.3, 1.5, .5, 1); }
.plate small { font-weight: 400; color: #7a5a3a; }
@keyframes plop { from { transform: translateY(-40px) scale(.7); opacity: 0; } }
.confirm { margin-top: 10px; padding: 10px 14px; border-radius: 10px; background: rgba(213, 184, 120, .18); font-family: var(--serif); font-style: italic; }

/* the three assessment cards: they rise out of the antique box and turn over one at a time */
.qcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; perspective: 900px; margin-top: 6px; }
.qc { position: relative; min-height: 64px; border-radius: 10px; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3, 1.1, .5, 1), opacity .5s; opacity: 0; transform: translateY(40px) rotateX(20deg); }
.qcards.up .qc { opacity: 1; transform: none; }
.qcards.up .qc:nth-child(2) { transition-delay: .15s; } .qcards.up .qc:nth-child(3) { transition-delay: .3s; }
.qc i { position: absolute; inset: 0; border-radius: 10px; display: grid; place-items: center; backface-visibility: hidden; font: italic 700 22px var(--serif); }
.qc .back { background: repeating-linear-gradient(45deg, var(--burg), var(--burg) 6px, #7a3441 6px, #7a3441 12px); border: 2px solid var(--gold); color: var(--goldL); }
.qc .front { transform: rotateY(180deg); background: #f4ead4; color: var(--burg); border: 2px solid var(--gold); }
.qc.flip { transform: rotateY(180deg); }
.qcards.up .qc.flip { transform: rotateY(180deg); }
.qwrap h3 { font-size: 22px; margin-bottom: 10px; }
.opts { display: grid; gap: 8px; }
.opt { min-height: 50px; padding: 10px 14px; text-align: left; border-radius: 12px; border: 1.5px solid var(--line); background: rgba(255, 255, 255, .06); }
.opt.picked { border-color: var(--goldL); background: rgba(138, 58, 72, .6); }
.react { margin-top: 8px; min-height: 26px; font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--goldL); }
.qnav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.verdict { display: grid; gap: 8px; }
.verdict .emb { display: inline-block; justify-self: start; padding: 6px 14px; border: 2px solid var(--gold); border-radius: 6px; font: 700 14px var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--goldL); transform: rotate(-2deg); }

.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; }
label, legend, .flabel { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--goldL); padding: 0; }
input[type="text"], textarea { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: rgba(255, 255, 255, .08); color: var(--ink); font: inherit; }
textarea { min-height: 84px; resize: vertical; }
input::placeholder, textarea::placeholder { color: rgba(237, 224, 200, .45); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; flex: 1 1 140px; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: rgba(255, 255, 255, .05); text-transform: none; letter-spacing: 0; font-size: 16px; text-align: center; color: var(--ink); }
.choice input:checked + span { border-color: var(--goldL); background: rgba(138, 58, 72, .7); font-weight: 700; }
.choice input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.stepper { display: flex; align-items: center; gap: 14px; }
.stepper button { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--line); background: rgba(255, 255, 255, .08); font-size: 24px; }
.stepper output { min-width: 32px; text-align: center; font-size: 22px; font-weight: 700; }
.err { padding: 10px 14px; border-radius: 10px; background: rgba(200, 60, 60, .25); border: 1.5px solid #c85a5a; }
.result h3 { font-size: 24px; color: var(--goldL); margin-bottom: 8px; }
.f-rows { display: grid; gap: 8px; margin: 0; }
.f-rows > div { display: grid; grid-template-columns: 104px 1fr; gap: 8px; }
.f-rows dt { color: var(--goldL); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding-top: 4px; }
.f-rows dd { margin: 0; }
.overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; padding: 14px; background: rgba(14, 6, 4, .74); }
.sheet { position: relative; width: min(100%, 520px); max-height: 86svh; overflow: auto; padding: 22px 18px; border-radius: 20px; background: #2e211b; border: 1.5px solid var(--line); }
.sheet h2 { margin-bottom: 12px; padding-right: 48px; }
.sheet .x { position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); font-size: 26px; line-height: 1; }
.teaser { margin: 4px 0 12px; padding: 18px; border-radius: 4px; background: #f4ead4; color: #3a2a18; font-family: "Playfair Display", Georgia, serif; font-style: italic; font-size: 19px; animation: unfold .7s cubic-bezier(.3, 1.1, .5, 1) both; transform-origin: 50% 0; }
@keyframes unfold { from { transform: scaleY(.1); opacity: 0; } }

@media (min-width: 900px) {
  .beat { margin-left: max(5vw, 40px); margin-right: auto; max-width: 480px; }
  .dots { right: 20px; }
  .brand { font-size: 17px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
