.spf { position: fixed; inset: 0; z-index: 40; color: var(--ink, #15141a); font-family: var(--type); -webkit-tap-highlight-color: transparent; }
.spf[hidden] { display: none; }
.spf::before { content: ""; position: absolute; inset: 0; background: rgba(222, 213, 196, 0.84); opacity: 0; transition: opacity 0.32s ease; }
.spf.on::before { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .spf::before { background: rgba(222, 213, 196, 0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); } }
.spf-scroll { position: absolute; inset: 0; box-sizing: border-box; display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: max(clamp(10px, 3.2vh, 48px), env(safe-area-inset-top)) clamp(8px, 3vw, 40px) max(clamp(20px, 5vh, 60px), env(safe-area-inset-bottom)); }
.spf-scroll::before { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: calc(100% + 1px); pointer-events: none; }

.spf-sheet { position: relative; flex: none; box-sizing: border-box; width: min(100%, 36em); margin: auto; padding: clamp(22px, 4vh, 40px) clamp(20px, 4.4vw, 50px) clamp(22px, 3.6vh, 36px); font-size: clamp(15px, 0.3vw + 13.6px, 18.5px); line-height: 1.6; outline: none;
  background: linear-gradient(177deg, #fdfaf3 0%, #f9f5eb 55%, #f6f1e5 100%); border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(60, 45, 30, 0.05), 0 1px 2px rgba(60, 45, 30, 0.12), 0 14px 34px rgba(60, 45, 30, 0.16), 0 40px 90px rgba(60, 45, 30, 0.14);
  opacity: 0; transform: translateY(54px) rotate(-1.3deg); transition: opacity 0.26s ease, transform 0.48s cubic-bezier(0.2, 0.8, 0.25, 1); }
.spf.on .spf-sheet { opacity: 1; transform: none; }
.spf-sheet::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background-image: var(--grain); background-size: 256px 256px; opacity: calc(var(--grain-opacity, 0.045) * 1.15); }
.spf-in { --gut: 18px; position: relative; z-index: 1; margin: calc(-1 * var(--gut)); padding: var(--gut); }
.spf-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.spf-kick { margin: 0 4.4em 1em 0; font-size: 0.74em; line-height: 1.4; letter-spacing: 0.06em; opacity: 0.6; }
.spf-h.hand { display: block; width: fit-content; margin: 0 0 0.16em; font-size: clamp(27px, 1.4vw + 21px, 42px); line-height: 1.1; --rot: -1.7deg; --dx: 0px; }
.spf-ask { margin: 0 0 0.9em; max-width: 30em; opacity: 0.86; text-wrap: balance; }
.spf-x { position: absolute; top: calc(var(--gut) - 0.7em); right: calc(var(--gut) - 0.6em); z-index: 3; margin: 0; padding: 8px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; opacity: 0.82; transition: opacity 0.2s; }
.spf-x:hover { opacity: 0.55; }
.spf-x:focus-visible { outline: 1.5px dashed currentColor; outline-offset: 2px; }
.spf-x .w { display: none; font-size: 0.86em; line-height: 1.3; border-bottom: 1px solid rgba(21, 20, 26, 0.45); padding-bottom: 1px; }
.spf-x svg { display: block; width: 26px; height: 26px; overflow: visible; }
.spf-x path { fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; }
@media (hover: none), (pointer: coarse) { .spf-x { top: calc(var(--gut) - 0.5em); right: calc(var(--gut) - 0.3em); padding: 10px 8px; } .spf-x .w { display: block; } .spf-x svg { display: none; } }

.spf-fields { display: grid; row-gap: 0.3em; }
.spf-f { --fs: clamp(18px, 0.35vw + 15.5px, 22px); display: grid; grid-template-columns: 5.3em minmax(0, 1fr); column-gap: 0.5em; align-items: end; }
.spf-cap { display: block; margin: 0; padding: 0 0 0.58em; font-size: 0.82em; line-height: 1.2; letter-spacing: 0.03em; opacity: 0.66; white-space: nowrap; transition: opacity 0.2s; }
.spf-f.spf-long { grid-template-columns: minmax(0, 1fr); margin-top: 0.8em; }
.spf-long .spf-cap { padding-bottom: 0; }
.spf .hi { position: relative; display: block; min-width: 0; min-height: 1.9em; font-family: "Special Elite", monospace; font-size: var(--fs); line-height: 1.9; letter-spacing: 0.02em; cursor: text; }
.spf .hi input, .spf .hi textarea { position: absolute; inset: 0; box-sizing: border-box; width: 100%; height: 100%; margin: 0; padding: 0 0.1em; border: 0; outline: 0; background: none; font: inherit; letter-spacing: inherit; color: transparent; caret-color: transparent; -webkit-text-fill-color: transparent; border-radius: 0; -webkit-appearance: none; appearance: none; resize: none; overflow: hidden; }
.spf .hi textarea { white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; }
.spf .hi input:-webkit-autofill, .spf .hi input:-webkit-autofill:hover, .spf .hi input:-webkit-autofill:focus, .spf .hi input:autofill { -webkit-text-fill-color: transparent; -webkit-box-shadow: 0 0 0 100px transparent inset; box-shadow: 0 0 0 100px transparent inset; background-color: transparent !important; background-image: none !important; transition: background-color 600000s 0s, color 600000s 0s; animation: af 0.01s; }
.spf .hi input::selection, .spf .hi textarea::selection { background: rgba(21, 20, 26, 0.14); }
.spf .hi-ink { position: relative; z-index: 1; display: block; white-space: pre; overflow: hidden; padding: 0 0.1em; pointer-events: none; min-height: 1.9em; }
.spf .ch { display: inline-block; opacity: var(--o, 1); transform: translateY(var(--y, 0em)); }
.spf .ch.new { animation: tw-hit 0.1s ease-out both; }
.spf .hi-ph { position: absolute; z-index: 1; left: 0.1em; top: 0; font-size: 0.6em; line-height: 3.17; opacity: 0.36; pointer-events: none; transition: opacity 0.2s; white-space: nowrap; }
.spf .hi.has .hi-ph { opacity: 0; }
.spf .rule { display: block; height: 0.11em; margin-top: -0.2em; background-image: repeating-linear-gradient(90deg, currentColor 0 0.5em, transparent 0.5em 0.62em); opacity: 0.75; }
.spf-long .hi-ink { white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; overflow: visible; min-height: 5.7em; }
.spf-long .ch { display: inline; position: relative; top: var(--y, 0em); transform: none; }
.spf-long .rules { position: absolute; inset: 0; pointer-events: none; opacity: 0.75; background-image: repeating-linear-gradient(90deg, currentColor 0 0.5em, transparent 0.5em 0.62em);
  -webkit-mask-image: repeating-linear-gradient(180deg, transparent 0 1.7em, #000 1.7em 1.81em, transparent 1.81em 1.9em); mask-image: repeating-linear-gradient(180deg, transparent 0 1.7em, #000 1.7em 1.81em, transparent 1.81em 1.9em); }
.spf .ham { position: absolute; left: 0; top: 0; z-index: 1; width: 0.62em; height: 1.1em; pointer-events: none; opacity: 0; transform: translate(var(--px, 0px), calc(var(--py, 0px) + 1.5em)); transition: transform 0.1s linear, opacity 0.25s; }
.spf .hi.focus .ham { opacity: 0.8; }
.spf .hi.focus .ham.strike { animation: tw-strike 0.13s cubic-bezier(0.3, 0, 0.7, 1); }
.spf-need { position: absolute; z-index: 1; right: 0.1em; top: 0; font-size: 0.56em; line-height: 3.4; letter-spacing: 0.04em; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.spf-f.miss .spf-need { opacity: 0.86; }
.spf-f.miss .rule { opacity: 1; background-image: linear-gradient(currentColor, currentColor); }
.spf-f.miss .spf-cap { opacity: 1; }

.spf-tiers { margin: 0.9em 0 0; }
.spf-tiers .spf-cap { padding-bottom: 0.1em; }
.spf-boxes { display: flex; flex-wrap: wrap; gap: 0 1.35em; }
.spf-box { position: relative; display: inline-flex; align-items: baseline; gap: 0.5em; padding: 0.34em 0; cursor: pointer; -webkit-user-select: none; user-select: none; }
.spf-box input { position: absolute; left: 0; top: 50%; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.spf-tick { white-space: nowrap; }
.spf-tick i { display: inline-block; min-width: 0.7em; text-align: center; font-style: normal; opacity: 0; --y: 0em; --o: 1; }
.spf-box input:checked + .spf-tick i { opacity: 1; animation: tw-hit 0.1s ease-out both; }
.spf-word { border-bottom: 1px solid transparent; }
.spf-box input:checked ~ .spf-word { border-bottom-color: rgba(21, 20, 26, 0.5); }
.spf-box input:focus-visible ~ .spf-word { outline: 1.5px dashed currentColor; outline-offset: 4px; }

.spf-send { display: flex; align-items: center; flex-wrap: wrap; gap: 0.3em 1.5em; margin-top: 1.3em; }
.spf .go { position: relative; padding: 0.5em 0.9em; margin: 0 0 0 -0.2em; font: inherit; font-size: clamp(17px, 0.5vw + 15px, 23px); color: inherit; background: none; border: 0; cursor: pointer; transition: opacity 0.3s; -webkit-tap-highlight-color: transparent; }
.spf .go[disabled] { opacity: 0.4; }
.spf .go:focus-visible { outline: 1.5px dashed currentColor; outline-offset: 6px; }
.spf .go svg { position: absolute; inset: -6% -4%; width: 108%; height: 112%; overflow: visible; pointer-events: none; }
.spf .go path { fill: none; stroke: currentColor; stroke-linecap: round; }
.spf .go .spf-pre { stroke-width: 1.5; stroke-dasharray: 2.2 3.4; opacity: 0.5; transition: opacity 0.3s; }
.spf .go .spf-ink { stroke-width: 2.6; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset 0.55s ease-out, opacity 0.15s; }
.spf-sheet.ok .go .spf-pre { opacity: 0; }
.spf-sheet.ok .go .spf-ink { stroke-dashoffset: 0; opacity: 1; }
.spf-alt { margin: 0; font-size: 0.86em; opacity: 0.74; }
.spf-alt a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(21, 20, 26, 0.35); padding-bottom: 1px; }
.spf-oops { margin: 0.7em 0 0; font-size: 0.9em; opacity: 0.86; }
.spf-oops:empty { display: none; }
.spf-hp { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; overflow: hidden; }

.spf-done { display: none; outline: none; padding: 0.3em 0 0.2em; }
.spf-sheet.sent .spf-ask, .spf-sheet.sent .spf-fields, .spf-sheet.sent .spf-tiers, .spf-sheet.sent .spf-note, .spf-sheet.sent .spf-send, .spf-sheet.sent .spf-oops { display: none; }
.spf-sheet.sent .spf-done { display: block; }
.spf-stamp { display: block; width: min(13.5em, 74%); margin: 1.1em 0 1.3em 0.5em; overflow: visible; transform: rotate(-7deg); transform-origin: 30% 60%; opacity: 0.8; }
.spf-stamp rect { fill: none; stroke: currentColor; }
.spf-stamp text { fill: currentColor; font-family: "Special Elite", monospace; }
.spf-sheet.sent .spf-stamp { animation: spf-stamp 0.24s cubic-bezier(0.5, 0, 0.9, 0.4) both; }
@keyframes spf-stamp { from { opacity: 0; transform: rotate(-7deg) scale(1.55); } to { opacity: 0.8; transform: rotate(-7deg) scale(1); } }
.spf-thanks { margin: 0 0 0.5em; font-size: clamp(19px, 0.8vw + 15px, 28px); }
.spf-kept { margin: 0 0 1em; max-width: 30em; font-size: 0.84em; opacity: 0.66; }
.spf-back { margin: 0.5em 0 0; padding: 0 0 1px; font: inherit; font-size: 0.92em; color: inherit; background: none; border: 0; border-bottom: 1px solid rgba(21, 20, 26, 0.4); border-radius: 0; cursor: pointer; }
.spf-back:focus-visible { outline: 1.5px dashed currentColor; outline-offset: 4px; }

@media (max-width: 600px) {
  .spf-scroll { padding: max(10px, env(safe-area-inset-top)) 8px max(28px, env(safe-area-inset-bottom)); }
  .spf-sheet { padding: 22px 18px 26px; font-size: 15px; }
  .spf-f { --fs: 18px; grid-template-columns: 4.6em minmax(0, 1fr); }
  .spf-boxes { gap: 0 1.1em; }
}
@media (prefers-reduced-motion: reduce) {
  .spf::before, .spf-sheet, .spf .ham, .spf .go path, .spf .go .spf-pre, .spf .go .spf-ink { transition: none; }
  .spf-sheet { transform: none; }
  .spf .ch.new, .spf .hi.focus .ham.strike, .spf-box input:checked + .spf-tick i, .spf-sheet.sent .spf-stamp { animation: none !important; }
}
