/* Confete player: one question per screen, big tappable answers, a host that reacts, a hold-to-commit moment and a
   story-style finale. Everything is driven by CSS variables set from the form's theme (player.js applyTheme). */
.pf, .pf * { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.pf-body { background: var(--bg, #fff); overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
.pf {
  --ease: cubic-bezier(.22, 1, .36, 1); --dur: 420ms; --stag: 45ms; --press: .97;
  --accent-soft: color-mix(in srgb, var(--accent) 13%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 55%, transparent);
  --line: color-mix(in srgb, var(--card-ink) 12%, transparent);
  --shadow: 0 1px 2px color-mix(in srgb, var(--card-ink) 6%, transparent);
  position: fixed; inset: 0; display: flex; flex-direction: column; color: var(--ink); font-family: var(--fb), system-ui, sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%); overflow: hidden; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.pf[data-motion="bouncy"] { --ease: cubic-bezier(.34, 1.56, .64, 1); --dur: 560ms; --stag: 60ms; --press: .94; }
.pf[data-motion="snappy"] { --ease: cubic-bezier(.2, .9, .1, 1); --dur: 280ms; --stag: 28ms; --press: .97; }
.pf[data-motion="dreamy"] { --ease: cubic-bezier(.45, 0, .2, 1); --dur: 760ms; --stag: 85ms; --press: .98; }
.pf-bd { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.pf-top, .pf-stage, .pf-foot { position: relative; z-index: 2; width: 100%; max-width: 560px; margin: 0 auto; }

/* top bar: back, progress, sound */
.pf-top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 14px; padding: calc(env(safe-area-inset-top) + 12px) 16px 6px; min-height: 64px; }
.pf-iconbtn { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; color: var(--ink);
  background: color-mix(in srgb, var(--ink) 7%, transparent); transition: transform .15s, opacity .25s, background .2s; }
.pf-iconbtn:active { transform: scale(.9); }
.pf-iconbtn svg { width: 22px; height: 22px; }
.pf-iconbtn[hidden] { display: grid; visibility: hidden; opacity: 0; pointer-events: none; }
.pf-prog { height: 7px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 11%, transparent); overflow: hidden; transition: opacity .3s; max-width: 260px; justify-self: center; width: 100%; }
.pf-prog > i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .6s var(--ease); box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 45%, transparent); }
.pf-prog.off { opacity: 0; }
.pf-brand { justify-self: center; font: 600 13px/1 var(--fb); letter-spacing: .02em; opacity: .75; display: flex; gap: 6px; align-items: center; }

/* the stage and its screens */
.pf-stage { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; perspective: 1200px; }
.pf-stage::-webkit-scrollbar { display: none; }
.pf-screen { min-height: 100%; display: flex; flex-direction: column; padding: 18px 20px 28px; transform-origin: 50% 40%; will-change: transform, opacity; }
.pf-screen.center { justify-content: center; }
.pf-screen.hero { justify-content: center; text-align: center; padding-bottom: 40px; }
.pf-head { text-align: center; margin: 10px 0 26px; }
.pf-title { font-family: var(--fd), var(--fb), system-ui, sans-serif; font-weight: 800; font-size: calc(var(--ts, 31px) * var(--fs, 1)); line-height: 1.12; letter-spacing: -.02em; margin: 0; color: var(--ink); text-wrap: balance; overflow-wrap: anywhere; }
.pf-title.xl { --ts: 40px; line-height: 1.04; }
.pf-sub { margin: 12px auto 0; max-width: 30em; font-size: 17px; line-height: 1.45; color: var(--muted-bg); text-wrap: pretty; white-space: pre-line; }
.pf-emoji { display: grid; place-items: center; margin: 0 auto 14px; }
.pf-emoji img, .pf-emoji .lot { filter: drop-shadow(0 10px 18px color-mix(in srgb, var(--ink) 18%, transparent)); }
.pf-hero-art { margin: 0 auto 18px; }
/* the float loop lives on an inner element: an element that also gets a WAAPI entrance is not composited by Chrome,
   which then ticks the loop on the main thread (about a third of a slow phone's CPU on the welcome screen) */
.pf-float { animation: pf-float 4.5s ease-in-out infinite; }
@keyframes pf-float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
.pf-badge { display: inline-flex; align-items: center; gap: 6px; margin: 0 auto 16px; padding: 7px 13px; border-radius: 99px; font: 600 14px/1 var(--fb);
  background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }

/* answer cards */
.pf-opts { display: flex; flex-direction: column; gap: 12px; }
.pf-opts.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pf-opts.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pf-opt { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 66px; padding: 14px 18px; border-radius: var(--r); cursor: pointer;
  font: 500 18px/1.25 var(--fb); color: var(--card-ink); text-align: left; background: var(--surface); border: 2px solid transparent; box-shadow: var(--shadow);
  transition: transform .18s var(--ease), background .2s, border-color .2s, box-shadow .2s, color .2s; }
.pf-opt:active { transform: scale(var(--press)); }
.pf-opt .ic { flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center; }
.pf-opt .ic img { width: 40px; height: 40px; }
.pf-opt .tx { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pf-opt .ck { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); transform: scale(0); transition: transform .3s var(--ease); }
.pf-opt .ck svg { width: 16px; height: 16px; }
.pf-opt.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.pf-opt.on .ck { transform: scale(1); }
.pf-opt.multi .ck { transform: scale(1); background: transparent; border: 2px solid var(--line); }
.pf-opt.multi.on .ck { background: var(--accent); border-color: var(--accent); }
.pf-opt.multi:not(.on) .ck svg { opacity: 0; }
.pf-opts.grid .pf-opt, .pf-opts.duo .pf-opt { flex-direction: column; justify-content: center; text-align: center; gap: 10px; min-height: 132px; padding: 18px 12px; font-weight: 600; }
.pf-opts.duo .pf-opt { min-height: 168px; font-size: 19px; }
.pf-opts.grid .pf-opt .ic, .pf-opts.duo .pf-opt .ic { width: 64px; height: 64px; }
.pf-opts.grid .pf-opt .ic img, .pf-opts.duo .pf-opt .ic img { width: 64px; height: 64px; }
.pf-opts.duo .pf-opt .ic, .pf-opts.duo .pf-opt .ic img { width: 76px; height: 76px; }
.pf-opts.grid .pf-opt .ck, .pf-opts.duo .pf-opt .ck { position: absolute; top: 10px; right: 10px; }
.pf-opt .key { position: absolute; left: 8px; top: 6px; font: 600 11px/1 var(--fb); opacity: .35; display: none; }
@media (hover: hover) and (pointer: fine) { .pf-opt:hover { border-color: var(--accent-line); } .pf-opt .key { display: block; } }
.pf-opt.pop { animation: pf-pop .5s var(--ease); }
@keyframes pf-pop { 0% { transform: scale(1); } 35% { transform: scale(1.045); } 100% { transform: scale(1); } }
.pf-opt.dim { opacity: .45; }

/* card styles */
.pf[data-card="outline"] .pf-opt { background: transparent; border-color: var(--line); box-shadow: none; }
.pf[data-card="outline"] .pf-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.pf[data-card="solid"] .pf-opt { box-shadow: 0 8px 22px color-mix(in srgb, var(--card-ink) 12%, transparent); }
.pf[data-card="solid"] .pf-opt.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pf[data-card="solid"] .pf-opt.on .ck { background: var(--accent-ink); color: var(--accent); }
.pf[data-card="glass"] .pf-opt { background: color-mix(in srgb, var(--surface) 62%, transparent); border-color: color-mix(in srgb, var(--card-ink) 14%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: none; }
.pf[data-card="glass"] .pf-opt.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 20%, color-mix(in srgb, var(--surface) 60%, transparent)); }
.pf[data-lite][data-card] .pf-opt, .pf[data-lite][data-card] .pf-input { -webkit-backdrop-filter: none; backdrop-filter: none; } /* beats the glass rules below */
.pf[data-lite][data-card="glass"] .pf-opt:not(.on), .pf[data-lite][data-card="glass"] .pf-input { background: color-mix(in srgb, var(--surface) 90%, transparent); }
.pf[data-card="brutal"] .pf-opt { border: 2.5px solid var(--card-ink); box-shadow: 4px 4px 0 var(--card-ink); }
.pf[data-card="brutal"] .pf-opt:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--card-ink); }
.pf[data-card="brutal"] .pf-opt.on { background: var(--accent); color: var(--accent-ink); border-color: var(--card-ink); }
.pf[data-card="brutal"] .pf-cta { border: 2.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.pf[data-card="brutal"] .pf-input { border: 2.5px solid var(--card-ink); box-shadow: 4px 4px 0 var(--card-ink); }

/* inputs */
.pf-field { display: flex; flex-direction: column; gap: 10px; }
.pf-input { width: 100%; min-height: 64px; padding: 16px 20px; border-radius: var(--r); border: 2px solid transparent; outline: none; background: var(--surface); color: var(--card-ink);
  font: 500 20px/1.3 var(--fb); box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; -webkit-user-select: text; user-select: text; }
.pf-input::placeholder { color: color-mix(in srgb, var(--card-ink) 42%, transparent); }
.pf-input:focus { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
textarea.pf-input { min-height: 150px; resize: none; line-height: 1.45; font-size: 18px; }
.pf[data-card="outline"] .pf-input { background: transparent; border-color: var(--line); }
.pf[data-card="glass"] .pf-input { background: color-mix(in srgb, var(--surface) 62%, transparent); border-color: color-mix(in srgb, var(--card-ink) 14%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
input.pf-input[type="date"], input.pf-input[type="datetime-local"] { appearance: none; -webkit-appearance: none; text-align: left; color-scheme: light; }
.pf[data-mode="dark"] input.pf-input[type="date"], .pf[data-mode="dark"] input.pf-input[type="datetime-local"] { color-scheme: dark; }
.pf-err { min-height: 22px; font: 600 15px/1.3 var(--fb); color: var(--ink); text-align: center; opacity: 0; transform: translateY(-4px); transition: .25s; }
.pf-err.on { opacity: .9; transform: none; }
.pf-hint { text-align: center; font-size: 14px; color: var(--muted-bg); }
.shake { animation: pf-shake .42s cubic-bezier(.36, .07, .19, .97); }
@keyframes pf-shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); } }

/* number stepper */
.pf-num { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: 6px; }
.pf-num-row { display: flex; align-items: center; gap: 22px; }
.pf-num-btn { width: 68px; height: 68px; border-radius: 50%; border: 0; cursor: pointer; font: 600 34px/1 var(--fb); color: var(--accent-ink); background: var(--accent); box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 35%, transparent); transition: transform .15s; display: grid; place-items: center; }
.pf-num-btn:active { transform: scale(.88); }
.pf-num-btn:disabled { opacity: .3; box-shadow: none; }
.pf-num-val { min-width: 2.2ch; text-align: center; font: 800 88px/1 var(--fd), var(--fb); color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.pf-num-unit { font: 600 17px/1 var(--fb); color: var(--muted-bg); }
.pf-num-crowd { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; min-height: 48px; max-width: 320px; }
.pf-num-crowd > * { animation: pf-in-pop .45s var(--ease) both; }
@keyframes pf-in-pop { from { transform: scale(0) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* rating */
.pf-stars { display: flex; justify-content: center; gap: 8px; margin: 8px 0 4px; }
.pf-star { width: 58px; height: 58px; border: 0; background: none; cursor: pointer; padding: 0; transition: transform .2s var(--ease); filter: grayscale(1) opacity(.32); }
.pf-star.on { filter: none; }
.pf-star.pop { animation: pf-pop .45s var(--ease); }
.pf-star img, .pf-star .emo { width: 58px; height: 58px; }
.pf-faces { display: flex; justify-content: space-between; gap: 6px; margin: 8px 0; }
.pf-face { flex: 1; aspect-ratio: 1; max-width: 72px; border: 0; background: none; cursor: pointer; padding: 0; transition: transform .25s var(--ease), filter .25s, opacity .25s; }
.pf-face img, .pf-face .emo { width: 100%; height: auto; }
.pf-faces.has .pf-face:not(.on) { filter: grayscale(.9); opacity: .45; transform: scale(.88); }
.pf-face.on { transform: scale(1.18); }
.pf-nps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.pf-nps button { aspect-ratio: 1; border-radius: 14px; border: 2px solid transparent; background: var(--surface); color: var(--card-ink); font: 700 19px/1 var(--fb); cursor: pointer; box-shadow: var(--shadow); transition: transform .15s, background .2s; }
.pf-nps button:active { transform: scale(.9); }
.pf-nps button.on { background: var(--accent); color: var(--accent-ink); }
.pf-scale-labels { display: flex; justify-content: space-between; font: 600 14px/1.2 var(--fb); color: var(--muted-bg); margin-top: 10px; gap: 12px; }
.pf-scale-labels span:last-child { text-align: right; }

/* slider */
.pf-slide { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 4px; }
.pf-slide-art { height: 120px; display: grid; place-items: center; }
.pf-slide-art > * { transition: transform .25s var(--ease); }
.pf-slide-val { font: 800 46px/1 var(--fd), var(--fb); color: var(--ink); font-variant-numeric: tabular-nums; }
.pf-range { width: 100%; -webkit-appearance: none; appearance: none; height: 14px; border-radius: 99px; outline: none; margin: 14px 0 0;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) var(--p, 50%), color-mix(in srgb, var(--ink) 12%, transparent) var(--p, 50%)); }
.pf-range::-webkit-slider-thumb { -webkit-appearance: none; width: 38px; height: 38px; border-radius: 50%; background: var(--surface); border: 4px solid var(--accent); box-shadow: 0 6px 16px rgba(0, 0, 0, .22); cursor: grab; }
.pf-range::-moz-range-thumb { width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 4px solid var(--accent); box-shadow: 0 6px 16px rgba(0, 0, 0, .22); cursor: grab; }
.pf-slide .pf-scale-labels { width: 100%; }

/* consent */
.pf-consent { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--r); background: var(--surface); color: var(--card-ink); cursor: pointer; border: 2px solid transparent; font: 500 17px/1.4 var(--fb); text-align: left; width: 100%; }
.pf-consent .box { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--line); display: grid; place-items: center; transition: .2s; }
.pf-consent .box svg { width: 18px; height: 18px; opacity: 0; transform: scale(.4); transition: .25s var(--ease); }
.pf-consent.on { border-color: var(--accent); }
.pf-consent.on .box { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pf-consent.on .box svg { opacity: 1; transform: none; }

/* the host talking (message screens + reply sheet) */
.pf-host { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.pf-bubble { position: relative; width: 100%; padding: 20px 22px; border-radius: 24px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 2.5px solid var(--accent); color: var(--card-ink); font: 500 19px/1.45 var(--fb); text-align: left; white-space: pre-line; }
.pf-bubble::before { content: ""; position: absolute; left: 50%; top: -12px; width: 20px; height: 20px; transform: translateX(-50%) rotate(45deg); background: inherit; border-left: 2.5px solid var(--accent); border-top: 2.5px solid var(--accent); border-radius: 4px 0 0 0; }
.pf-bubble b { font-weight: 700; }
.pf-fact { width: 100%; padding: 22px; border-radius: var(--r); background: var(--surface); color: var(--card-ink); text-align: left; box-shadow: var(--shadow); }
.pf-fact .k { font: 700 13px/1 var(--fb); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.pf-fact p { margin: 0; font: 500 18px/1.5 var(--fb); white-space: pre-line; }

/* hold to commit */
.pf-hold { position: relative; width: min(74vw, 290px); aspect-ratio: 1; margin: 18px auto 6px; border-radius: 50%; border: 0; cursor: pointer; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; box-shadow: 0 18px 50px color-mix(in srgb, var(--accent) 45%, transparent); transition: transform .3s var(--ease); touch-action: none; -webkit-touch-callout: none; }
.pf-hold.down { transform: scale(.93); }
.pf-hold.done { animation: pf-boom .7s var(--ease); }
@keyframes pf-boom { 0% { transform: scale(.93); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
.pf-hold svg.ring { position: absolute; inset: -14px; width: calc(100% + 28px); height: calc(100% + 28px); transform: rotate(-90deg); pointer-events: none; }
.pf-hold svg.ring circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.pf-hold svg.ring .bg { stroke: color-mix(in srgb, var(--ink) 10%, transparent); }
.pf-hold svg.ring .fg { stroke: var(--accent2); stroke-dasharray: 100; stroke-dashoffset: 100; }
.pf-hold .pulse { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--accent); animation: pf-ping 2.2s ease-out infinite; pointer-events: none; }
@keyframes pf-ping { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.35); opacity: 0; } }
.pf-hold-label { text-align: center; font: 700 17px/1.3 var(--fb); color: var(--ink); margin-top: 22px; }

/* loading */
.pf-load { display: flex; flex-direction: column; align-items: center; gap: 26px; margin-top: 8px; }
.pf-ring { position: relative; width: 168px; height: 168px; }
.pf-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pf-ring circle { fill: none; stroke-width: 12; stroke-linecap: round; }
.pf-ring .bg { stroke: color-mix(in srgb, var(--ink) 10%, transparent); }
.pf-ring .fg { stroke: var(--accent); stroke-dasharray: 100; stroke-dashoffset: 100; }
.pf-ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 800 40px/1 var(--fd), var(--fb); color: var(--ink); font-variant-numeric: tabular-nums; }
.pf-steps { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 12px; }
.pf-steps li { display: flex; align-items: center; gap: 14px; padding: 15px 18px; border-radius: var(--r); background: var(--surface); color: var(--card-ink); font: 500 17px/1.3 var(--fb); opacity: .4; transition: opacity .4s, transform .4s var(--ease); }
.pf-steps li .dot { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--line); display: grid; place-items: center; transition: .3s var(--ease); }
.pf-steps li .dot svg { width: 15px; height: 15px; opacity: 0; transition: .3s; }
.pf-steps li.go { opacity: 1; }
.pf-steps li.go .dot { border-color: var(--accent); border-top-color: transparent; animation: pf-spin .8s linear infinite; }
.pf-steps li.ok { opacity: 1; }
.pf-steps li.ok .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); animation: none; }
.pf-steps li.ok .dot svg { opacity: 1; }
@keyframes pf-spin { to { transform: rotate(360deg); } }

/* footer CTA */
.pf-foot { padding: 10px 20px calc(env(safe-area-inset-bottom) + 18px); display: flex; flex-direction: column; gap: 10px; }
.pf-foot.off { display: none; }
.pf-cta { width: 100%; min-height: 60px; border: 0; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font: 700 19px/1 var(--fb); letter-spacing: .005em; cursor: pointer;
  box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 38%, transparent); transition: transform .15s, opacity .25s, box-shadow .25s; }
.pf-cta:active { transform: scale(.97); }
.pf-cta:disabled { opacity: .38; box-shadow: none; cursor: default; }
.pf-cta.ghost { background: transparent; color: var(--ink); box-shadow: none; min-height: 44px; font-weight: 600; font-size: 16px; }
.pf-cta.in { animation: pf-cta-in .5s var(--ease) both; }
@keyframes pf-cta-in { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* reply sheet */
.pf-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; padding: 0 12px calc(env(safe-area-inset-bottom) + 12px); pointer-events: none; }
.pf-sheet .card { max-width: 540px; margin: 0 auto; padding: 22px 20px 18px; border-radius: 30px; background: var(--surface); color: var(--card-ink); box-shadow: 0 -10px 50px rgba(0, 0, 0, .18), 0 0 0 1px var(--line);
  transform: translateY(115%); transition: transform .5s var(--ease); pointer-events: auto; display: flex; flex-direction: column; gap: 16px; }
.pf-sheet.on .card { transform: none; }
.pf-sheet .who { display: flex; gap: 14px; align-items: center; }
.pf-sheet .who .av { flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); }
.pf-sheet .who p { margin: 0; font: 500 18px/1.4 var(--fb); }
.pf-sheet .pf-cta { box-shadow: none; }
.pf-scrim { position: absolute; inset: 0; z-index: 5; background: rgba(0, 0, 0, .18); opacity: 0; pointer-events: none; transition: opacity .4s; }
.pf-scrim.on { opacity: 1; pointer-events: auto; }

/* toast */
.pf-toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 96px); z-index: 50; transform: translate(-50%, 20px); opacity: 0; padding: 12px 18px; border-radius: 99px; background: #111; color: #fff; font: 600 15px/1.2 var(--fb), system-ui; transition: .3s var(--ease); pointer-events: none; }
.pf-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ======================= the story finale ======================= */
.pf-reel { position: absolute; inset: 0; z-index: 10; overflow: hidden; background: #000; color: #fff; display: none; }
.pf-reel.on { display: block; }
.pf-reel .bars { position: absolute; left: 0; right: 0; top: 0; z-index: 4; display: flex; gap: 4px; padding: calc(env(safe-area-inset-top) + 10px) 12px 0; max-width: 560px; margin: 0 auto; }
.pf-reel .bars i { flex: 1; height: 3.5px; border-radius: 9px; background: rgba(255, 255, 255, .32); overflow: hidden; }
.pf-reel .bars i b { display: block; height: 100%; width: 0; background: #fff; border-radius: inherit; }
.pf-reel .x { position: absolute; z-index: 5; top: calc(env(safe-area-inset-top) + 22px); right: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .16); color: inherit; display: grid; place-items: center; cursor: pointer; }
.pf-reel .x svg { width: 20px; height: 20px; }
.pf-reel .who { position: absolute; z-index: 4; top: calc(env(safe-area-inset-top) + 26px); left: 14px; display: flex; gap: 8px; align-items: center; font: 700 14px/1 var(--fb); opacity: .92; }
.pf-reel .who .av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .22); }
.pf-sl { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: calc(env(safe-area-inset-top) + 86px) 26px calc(env(safe-area-inset-bottom) + 60px); background: var(--sb); color: var(--si); overflow: hidden; }
.pf-sl > .in { position: relative; z-index: 2; width: 100%; max-width: 520px; margin: 0 auto; }
.pf-sl .deco { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.pf-sl .kick { font: 700 15px/1.2 var(--fb); letter-spacing: .09em; text-transform: uppercase; opacity: .85; margin-bottom: 18px; }
.pf-sl .big { font: 800 calc(64px * var(--fs, 1))/1 var(--fd), var(--fb); letter-spacing: -.03em; margin: 0; text-wrap: balance; overflow-wrap: anywhere; }
.pf-sl .huge { font: 800 calc(132px * var(--fs, 1))/.9 var(--fd), var(--fb); letter-spacing: -.05em; font-variant-numeric: tabular-nums; margin: 0; }
.pf-sl .lab { font: 700 26px/1.2 var(--fd), var(--fb); margin-top: 14px; text-wrap: balance; }
.pf-sl .body { font: 500 19px/1.45 var(--fb); opacity: .9; margin-top: 16px; text-wrap: pretty; white-space: pre-line; }
.pf-sl .w { display: inline-block; white-space: pre; }
.pf-sl .art { margin-bottom: 22px; }
.pf-sl .art.mid { display: grid; place-items: center; margin: 0 auto 26px; }
.pf-sl.center .in { text-align: center; }
.pf-sl .chips { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.pf-sl .chip { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px; background: color-mix(in srgb, var(--si) 13%, transparent); font: 600 18px/1.25 var(--fb); }
.pf-sl .chip small { display: block; font: 600 12.5px/1.2 var(--fb); letter-spacing: .06em; text-transform: uppercase; opacity: .7; margin-bottom: 4px; }
.pf-sl .chip img, .pf-sl .chip .emo { width: 40px; height: 40px; flex: 0 0 auto; }
.pf-ticket { position: relative; background: #fff; color: #161616; border-radius: 26px; padding: 26px 24px 22px; box-shadow: 0 30px 60px rgba(0, 0, 0, .3); text-align: left; overflow: hidden; }
.pf-ticket::before, .pf-ticket::after { content: ""; position: absolute; top: 64%; width: 30px; height: 30px; border-radius: 50%; background: var(--sb); }
.pf-ticket::before { left: -15px; } .pf-ticket::after { right: -15px; }
.pf-ticket .tk { font: 700 12.5px/1 var(--fb); letter-spacing: .14em; text-transform: uppercase; color: var(--tk, #7B2CFF); }
.pf-ticket h3 { font: 800 30px/1.08 var(--fd), var(--fb); margin: 10px 0 14px; letter-spacing: -.02em; }
.pf-ticket .ln { font: 500 16px/1.5 var(--fb); color: #333; }
.pf-ticket .cut { border-top: 2.5px dashed #ddd; margin: 20px -24px 16px; }
.pf-ticket .foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pf-ticket .nm { font: 800 20px/1.1 var(--fb); }
.pf-ticket .nm small { display: block; font: 600 11px/1 var(--fb); letter-spacing: .12em; text-transform: uppercase; color: #888; margin-bottom: 5px; }
.pf-ticket .code { display: flex; gap: 2px; height: 42px; align-items: stretch; }
.pf-ticket .code i { width: 3px; background: #161616; border-radius: 1px; }
.pf-ticket .code i:nth-child(3n) { width: 1.5px; } .pf-ticket .code i:nth-child(5n) { width: 5px; }
.pf-ticket .stamp { position: absolute; right: 18px; top: 18px; transform: rotate(12deg); border: 3px solid var(--tk, #7B2CFF); color: var(--tk, #7B2CFF); border-radius: 10px; padding: 6px 10px; font: 800 14px/1 var(--fb); letter-spacing: .1em; text-transform: uppercase; opacity: .9; }
.pf-sl .acts { display: flex; flex-direction: column; gap: 12px; margin-top: 30px; }
.pf-sl .acts button, .pf-sl .acts a { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 58px; border-radius: 99px; border: 0; cursor: pointer; text-decoration: none;
  font: 700 18px/1 var(--fb); background: var(--si); color: var(--sb); }
.pf-sl .acts .sec { background: color-mix(in srgb, var(--si) 16%, transparent); color: var(--si); }
.pf-sl .made { margin-top: 26px; font: 600 14px/1.3 var(--fb); opacity: .8; text-align: center; }
.pf-sl .made a { color: inherit; }
.pf-reel .tapl, .pf-reel .tapr { position: absolute; top: 0; bottom: 0; z-index: 3; }
.pf-reel .tapl { left: 0; width: 32%; } .pf-reel .tapr { right: 0; width: 68%; }
.pf-reel.last .tapr, .pf-reel.last .tapl { bottom: 46%; }
.pf-ray { position: absolute; left: 50%; top: 50%; width: 220vmax; height: 220vmax; margin: -110vmax 0 0 -110vmax; opacity: .16; animation: pf-rot 40s linear infinite;
  background: repeating-conic-gradient(from 0deg, var(--si) 0deg 9deg, transparent 9deg 22.5deg); border-radius: 50%; }
@keyframes pf-rot { to { transform: rotate(360deg); } }
.pf-blob { position: absolute; border-radius: 50%; opacity: .5; animation: pf-drift 9s ease-in-out infinite alternate; }
@keyframes pf-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(30px, -40px) scale(1.15); } }

/* done card (after closing the story) */
.pf-done { text-align: center; }
.pf-done .pf-cta { margin-top: 10px; }
.pf-made { display: inline-flex; gap: 6px; align-items: center; margin-top: 18px; padding: 9px 14px; border-radius: 99px; font: 600 14px/1 var(--fb); color: var(--ink); text-decoration: none; background: color-mix(in srgb, var(--ink) 8%, transparent); }

.emo { display: inline-grid; place-items: center; line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
@media (min-width: 760px) { .pf-screen { padding-top: 34px; } .pf-title { --ts: 36px; } .pf-title.xl { --ts: 48px; } }
@media (prefers-reduced-motion: reduce) { .pf, .pf * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
.pf-err-page { display: grid; place-items: center; height: 100%; text-align: center; padding: 30px; font-family: system-ui, sans-serif; color: #333; }
