@font-face { font-family: Caveat; src: url(fonts/Caveat.ttf) format('truetype'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Bad Script'; src: url(fonts/BadScript-Regular.ttf) format('truetype'); font-display: swap; }
@font-face { font-family: Jost; src: url(fonts/Jost.ttf) format('truetype'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #EEE8DC; --fg: #24221E; --muted: #6E695F; --soft: #8E897C; --line: #DCD4C3; --card: #F7F3EA;
  --coral: #C8512F; --navy: #213758; --chip: #E6DFD0; --btn: #1E1D1A; --btn-fg: #FBF8F1; --shadow: rgba(70, 55, 30, .16); --star: #D9A441;
  /* the paper stays light in both themes, as it does in the app */
  --paper: #F3EEE3; --ink: #213758; --ink2: #2F5A86; --pencil: #76736A; --pcoral: #D4583E;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1A1917; --fg: #ECE6D9; --muted: #A9A294; --soft: #8C8679; --line: #34312B; --card: #23211D;
    --coral: #E77457; --navy: #A9BEDD; --chip: #2E2B26; --btn: #ECE6D9; --btn-fg: #1A1917; --shadow: rgba(0, 0, 0, .4); --star: #E4B65A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1A1917; --fg: #ECE6D9; --muted: #A9A294; --soft: #8C8679; --line: #34312B; --card: #23211D;
  --coral: #E77457; --navy: #A9BEDD; --chip: #2E2B26; --btn: #ECE6D9; --btn-fg: #1A1917; --shadow: rgba(0, 0, 0, .4); --star: #E4B65A;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 17px/1.55 Jost, system-ui, sans-serif; overflow-x: hidden; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 6px; }
code { font: 500 .9em/1 'IBM Plex Mono', ui-monospace, monospace; background: var(--chip); padding: 2px 6px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--btn); color: var(--btn-fg); padding: 10px 16px; border-radius: 99px; }
.skip:focus { top: 12px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.eyebrow { font: 500 12.5px/1 Jost, sans-serif; letter-spacing: .22em; text-transform: uppercase; color: var(--soft); margin: 0 0 14px; }
h1 { font: 400 clamp(42px, 6.4vw, 72px)/1.04 'Bad Script', cursive; margin: 0 0 20px; color: var(--navy); letter-spacing: -.01em; }
/* the handwriting is in the diary's ink, as its titles are */
h2 { font: 400 clamp(30px, 4vw, 44px)/1.1 'Bad Script', cursive; margin: 0 0 18px; color: var(--navy); }
.lede { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.55; color: var(--muted); margin: 0; max-width: 600px; }
.lede b { color: var(--fg); font-weight: 500; letter-spacing: .04em; }

/* ---------------------------------------------------------------- the bar */
.bar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 97%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.bar-in { display: flex; align-items: center; gap: 18px; height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 500 15px/1 Jost, sans-serif; letter-spacing: .26em; color: var(--fg); }
.logo svg { color: var(--navy); }
.logo .star { fill: var(--star); }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; }
.nav a:hover { color: var(--fg); }
@media (max-width: 640px) { .nav { display: none; } .langs { margin-left: auto; } }
.langs { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; padding: 3px; }
.langs button { border: 0; background: transparent; padding: 5px 11px; border-radius: 99px; font: 500 13px/1 Jost, sans-serif; letter-spacing: .08em; color: var(--muted); cursor: pointer; }
.langs button[aria-pressed="true"] { background: var(--btn); color: var(--btn-fg); }

/* ---------------------------------------------------------------- hero + film */
.hero { display: grid; grid-template-columns: 1fr; gap: 36px; padding-top: 40px; padding-bottom: 64px; align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; padding-top: 64px; padding-bottom: 96px; } }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 99px; font: 500 16px/1 Jost, sans-serif; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .15s ease, background-color .15s ease; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--btn); color: var(--btn-fg); }
.btn.ghost { border-color: var(--line); color: var(--fg); background: transparent; }
.btn.ghost:hover { background: var(--chip); }

.film { margin: 0; display: flex; flex-direction: column; align-items: center; }
/* the film is cut to the phone itself; its corners are the phone's own (about 100 of its 816 x 1774 pixels) */
.phone { position: relative; width: min(100%, 360px); aspect-ratio: 720 / 1566; border-radius: 12.4% / 5.7%; overflow: hidden; background: #1E1D1B; box-shadow: 0 34px 40px rgba(60, 45, 20, .22), 0 6px 10px rgba(60, 45, 20, .12); transform: translateZ(0); }
.phone video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.film figcaption { margin-top: 18px; display: flex; justify-content: center; }
.sound { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px 0 13px; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 500 14px/1 Jost, sans-serif; cursor: pointer; }
.sound:hover { color: var(--fg); background: var(--chip); }
.sound[data-on="true"] { color: var(--fg); }
.sound .on { display: none; }
.sound[data-on="true"] .on { display: inline; }
.sound[data-on="true"] .off { display: none; }

/* ---------------------------------------------------------------- how */
.how { padding-top: 24px; padding-bottom: 80px; }
.steps { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.steps li { background: var(--card); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: 22px; padding: 24px 24px 26px; }
.steps .n { font: 700 54px/1 Caveat, cursive; color: var(--coral); display: block; margin-bottom: 6px; }
.steps h3 { font: 500 19px/1.3 Jost, sans-serif; margin: 0 0 8px; }
.steps p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; }

/* ---------------------------------------------------------------- try */
.try { padding: 72px 0 88px; background: color-mix(in srgb, var(--chip) 55%, var(--bg)); border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.desk { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 34px; align-items: start; }
@media (min-width: 980px) { .desk { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 48px; } }
.book { width: 100%; max-width: 560px; min-width: 0; margin: 0 auto; }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; border: 1px solid var(--line); background: transparent; border-radius: 99px; min-height: 34px; padding: 0 13px; font: 400 14px/1 Jost, sans-serif; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { background: var(--btn); color: var(--btn-fg); border-color: transparent; }
.tabs button.mine { border-style: dashed; }
.tabs button.mine[aria-selected="true"] { border-style: solid; }

.stage { position: relative; container-type: inline-size; margin-top: 10px;
  /* a sheet turning over the top shows above the pad as far as the tabs, and is cut there, as the app's screen cuts it */
  clip-path: inset(-26px -18px -44px -18px); }
.stage.turning { user-select: none; -webkit-user-select: none; }
@media (hover: hover) and (pointer: fine) { .stage { cursor: grab; } .stage.turning { cursor: grabbing; } }
/* the edge of the pad's other pages under the open one */
.stage::after { content: ''; position: absolute; left: .6%; width: 98.8%; top: 100%; height: 7px; border-radius: 0 0 4px 4px;
  background: repeating-linear-gradient(#EFEADF 0 1px, #D4CDBD 1px 2px); box-shadow: 0 10px 18px -8px rgba(50, 40, 25, .45); }
.sheet { position: relative; transform-origin: 50% 0; }
.sheet.loose { position: absolute; left: 0; top: 0; width: 100%; }
.turning .sheet { will-change: transform; }
.sheet .verso { position: absolute; inset: 0; transform: scaleY(-1); border-radius: 4px 4px 6px 6px; --u: calc(100cqw / 600);
  background: linear-gradient(rgba(40, 30, 15, .072), rgba(40, 30, 15, 0)), radial-gradient(circle at 0 0, rgba(98, 88, 66, .16) 1.25px, transparent 1.6px) 0 0 / calc(40 * var(--u)) calc(40 * var(--u)), #FCFAF3; }
.sheet .verso[hidden] { display: none; }
.leaf .shade { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.rings { --u: calc(100cqw / 600); position: absolute; z-index: 3; left: 0; right: 0; top: calc(-13.2 * var(--u)); height: calc(42 * var(--u)); display: grid; grid-template-columns: repeat(12, 1fr); justify-items: center; pointer-events: none; }
.rings i { width: calc(9.6 * var(--u)); height: 100%; border-radius: 99px; background: linear-gradient(90deg, #6D6A63 0, #D9D6CF 40%, #F4F2EC 55%, #8D8A82 100%); box-shadow: 0 1px 1.5px rgba(0, 0, 0, .35); }
.turns { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 14px 0 6px; }
.turn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--fg); display: grid; place-items: center; cursor: pointer; }
.turn:disabled { opacity: .35; cursor: default; }
.count { font: 500 14px/1 Jost, sans-serif; font-variant-numeric: tabular-nums; color: var(--soft); min-width: 64px; text-align: center; }

.field { display: flex; align-items: flex-end; gap: 10px; margin-top: 10px; background: #FBF8F1; border-radius: 26px; padding: 7px 7px 7px 9px; box-shadow: 0 1px 2px rgba(70, 55, 30, .12), 0 0 0 1px rgba(120, 100, 70, .1); }
.field textarea { flex: 1; min-width: 0; border: 0; outline: none; resize: none; background: transparent; font: 400 17px/1.45 Jost, sans-serif; color: #2A2925; padding: 9px 0; max-height: 180px; }
.field textarea::placeholder { color: #8B887E; }
.field:focus-within { box-shadow: 0 1px 2px rgba(70, 55, 30, .12), 0 0 0 2px var(--coral); }
/* the stickers, at the left inside the field, as in the app */
.field .stick { flex: none; width: 38px; height: 38px; margin: 0 -4px 2px 0; border-radius: 50%; border: 0; background: transparent; color: #8B887E; display: grid; place-items: center; cursor: pointer; transition: color .15s, background-color .15s; }
.field .stick:hover, .field .stick[aria-expanded="true"] { color: #213758; background: rgba(33, 55, 88, .07); }
.field .stick:focus-visible { outline: 2px solid var(--coral); outline-offset: 1px; }
.send { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #213758; color: #FBF8F1; display: grid; place-items: center; cursor: pointer; }
.send:disabled { opacity: .45; cursor: default; }
.status { min-height: 1.5em; margin: 10px 4px 0; font-size: 14.5px; color: var(--muted); }
.status.err { color: var(--coral); }
.status button { margin-left: 6px; }

.side { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 980px) { .side { position: sticky; top: 92px; padding-top: 46px; } }
.card { background: var(--card); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: 22px; padding: 24px; }
.card h3 { font: 500 19px/1.3 Jost, sans-serif; margin: 0 0 10px; }
.card p { margin: 0 0 14px; color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.card p:last-child { margin-bottom: 0; }
.card .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.card .small { font-size: 13.5px; color: var(--soft); }
.gpt { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 22px 0 18px; border-radius: 99px; background: #000; color: #fff; font: 500 16px/1 Jost, sans-serif; text-decoration: none; border: 1px solid rgba(255, 255, 255, .14); }
.gpt:hover { background: #1b1b1b; }
.gpt svg { flex: none; }
.who { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.who .av { width: 40px; height: 40px; border-radius: 50%; background: #F2D9BD; color: #3A352D; display: grid; place-items: center; font: 500 15px/1 Jost, sans-serif; box-shadow: 0 0 0 1.6px #4A4439 inset; }
.link { border: 0; background: transparent; padding: 0; color: var(--muted); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; cursor: pointer; font-size: 14.5px; }
.link:hover { color: var(--fg); }
.erase { margin: 0; padding-left: 4px; }

/* ---------------------------------------------------------------- the page (in the app's units: 600 wide) */
.leaf { --u: calc(100cqw / 600); position: relative; width: 100%; min-height: calc(860 * var(--u)); padding: calc(58 * var(--u)) calc(42 * var(--u)) calc(40 * var(--u)); background-color: var(--paper); color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .25 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  border-radius: 4px 4px 6px 6px; box-shadow: 0 0 0 .5px rgba(120, 100, 70, .14); overflow: hidden; }
.leaf .dots { position: absolute; inset: calc(13.67 * var(--u)); background-image: radial-gradient(circle, rgba(130, 120, 100, .42) calc(.95 * var(--u)), transparent calc(1.35 * var(--u))); background-size: calc(27.333 * var(--u)) calc(27.333 * var(--u)); pointer-events: none; }
.leaf .holes { position: absolute; left: 0; right: 0; top: calc(7.2 * var(--u)); height: calc(30 * var(--u)); pointer-events: none;
  background: radial-gradient(calc(27.5 * var(--u)) circle at 50% 50%, #5B564D 0 30%, #7A7468 34%, transparent 42%) 0 0 / calc(50 * var(--u)) 100% repeat-x; }
.leaf > :not(.dots):not(.holes):not(.shade):not(.stuck) { position: relative; }

.phdr { display: flex; align-items: flex-start; gap: calc(20 * var(--u)); min-height: calc(100 * var(--u)); }
.phdr .num { font: 700 calc(114 * var(--u)) / calc(88.9 * var(--u)) Caveat, cursive; letter-spacing: -.02em; color: var(--ink); }
.phdr .mw { display: flex; flex-direction: column; padding-top: calc(7 * var(--u)); }
.phdr .mo { font: 400 calc(38.4 * var(--u)) / calc(42.24 * var(--u)) 'Bad Script', cursive; color: var(--ink); white-space: nowrap; }
.phdr .wd { font: 600 calc(36 * var(--u)) / calc(36 * var(--u)) Caveat, cursive; color: var(--pcoral); margin-left: calc(2 * var(--u)); white-space: nowrap; }
.phdr .meta { margin-left: auto; text-align: right; font: 400 calc(15 * var(--u)) / calc(21 * var(--u)) Jost, sans-serif; letter-spacing: .1em; color: #8E897C; padding-top: calc(8 * var(--u)); white-space: nowrap; }
.phdr .meta .mr { display: flex; align-items: center; justify-content: flex-end; gap: calc(7 * var(--u)); }
.phdr .meta svg { width: calc(16 * var(--u)); height: calc(16 * var(--u)); }

.ttl { display: inline-block; position: relative; margin: calc(14 * var(--u)) 0 calc(26 * var(--u)); font: 400 calc(46 * var(--u)) / 1.25 'Bad Script', cursive; color: var(--ink); min-height: calc(58 * var(--u)); }
.ttl svg { position: absolute; left: calc(3 * var(--u)); bottom: calc(-6 * var(--u)); width: 100%; height: calc(14 * var(--u)); overflow: visible; }
.ttl path { fill: none; stroke: var(--pcoral); stroke-width: 2.2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ttl.write span { clip-path: inset(0 100% 0 0); animation: wipe .9s ease-out forwards; }
.ttl.write path { stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: dash .5s .75s ease-out forwards; }
.ttl.empty { min-height: calc(30 * var(--u)); margin-bottom: calc(10 * var(--u)); }
@keyframes wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes dash { to { stroke-dashoffset: 0; } }

.th { margin: 0 0 calc(12 * var(--u)) calc(18 * var(--u)); max-width: calc(500 * var(--u)); overflow-wrap: anywhere; }
.th.mine { font: 500 calc(32.1 * var(--u)) / calc(40 * var(--u)) Caveat, cursive; color: var(--ink2); white-space: pre-wrap; }
/* the pen writes each word from left to right, as in the app (penClip) */
.th.mine .wr { display: inline-block; max-width: 100%; clip-path: inset(-45% 100% -45% 0); animation: pen var(--w, .3s) var(--t, 0s) cubic-bezier(.3, .1, .4, 1) forwards; }
@keyframes pen { to { clip-path: inset(-45% -8% -45% -3%); } }
@keyframes ink { to { opacity: 1; } }
.th.pencil { font: 500 calc(28.2 * var(--u)) / calc(40 * var(--u)) Caveat, cursive; color: var(--pencil); display: flex; align-items: flex-start; gap: calc(6 * var(--u)); transform: rotate(-1deg); transform-origin: 0 50%; }
.th.pencil svg { flex: none; width: calc(24 * var(--u)); height: calc(40 * var(--u)); }
.th.pencil path { fill: none; stroke: var(--pencil); stroke-opacity: .9; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.th.pencil.write { animation: pencilIn .6s ease-out both; }
@keyframes pencilIn { from { opacity: 0; transform: rotate(-1deg) translateX(calc(-8 * var(--u))); } to { opacity: 1; transform: rotate(-1deg); } }
.mk { position: relative; isolation: isolate; }
.mk::before { content: ''; position: absolute; left: -.06em; right: -.06em; top: 48%; height: 42%; background: rgba(255, 206, 74, .55); z-index: -1; border-radius: 2px 6px 3px 5px; transform-origin: 0 50%; }
.mk.write::before { transform: scaleX(0); animation: grow .55s var(--d, 0s) ease-out forwards; }
@keyframes grow { to { transform: scaleX(1); } }
.fx { position: relative; display: inline-block; }
.fx .ps { position: absolute; left: -.06em; right: -.06em; top: 54%; height: .055em; background: rgba(118, 115, 106, .85); border-radius: .03em; transform: rotate(-3deg); }
.fx .pw { position: absolute; left: 50%; bottom: 72%; font: 500 .8em/1 Caveat, cursive; color: var(--pencil); white-space: nowrap; transform: translateX(-50%) rotate(-2deg); border: 0; background: transparent; padding: .1em .2em; cursor: pointer; }
.fx .pw:hover, .fx .pw:focus-visible { color: var(--ink2); }
.fx.write .ps { transform-origin: 0 50%; animation: grow .45s var(--d, 0s) ease-out both; }
.fx.write .pw { animation: ink .4s calc(var(--d, 0s) + .4s) ease-out both; }
.wt { margin: calc(8 * var(--u)) 0 0 calc(18 * var(--u)); font: 500 calc(25.8 * var(--u)) / calc(40 * var(--u)) Caveat, cursive; color: var(--pencil); }
.wt i { font-style: normal; display: inline-block; animation: blink 1.2s infinite both; }
.wt i:nth-child(2) { animation-delay: .2s; }
.wt i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: .15; } 40% { opacity: 1; } }
.ask-draw { margin: calc(10 * var(--u)) 0 0 calc(18 * var(--u)); border: 1px dashed rgba(118, 115, 106, .6); background: transparent; color: var(--pencil); font: 500 calc(26 * var(--u)) / 1.2 Caveat, cursive; border-radius: 99px; padding: calc(4 * var(--u)) calc(16 * var(--u)); cursor: pointer; }
.ask-draw:hover { color: var(--ink2); border-color: var(--ink2); }

.drw { position: relative; width: calc(100% + 42 * var(--u)); margin: calc(18 * var(--u)) calc(-21 * var(--u)) 0; aspect-ratio: 600 / 520; }
/* the engine's paper and pencil are SVG filters, dear to draw: the drawing and its living frames are layers of their
   own, so a living frame or the light on a sticker over the page never has the drawing under it drawn again */
.drw > .layer { will-change: transform; }
.drw > .layer { position: absolute; inset: 0; }
.drw svg { display: block; width: 100%; height: 100%; }
.drw .life > img { position: absolute; inset: 0; width: 100%; height: 100%; visibility: hidden; }
.drw .life > img.on { visibility: visible; }
.drw.done svg * { animation-duration: 0s !important; animation-delay: 0s !important; }

/* ---------------------------------------------------------------- privacy, foot */
.privacy { padding-top: 80px; padding-bottom: 80px; }
/* ---------------------------------------------------------------- the waitlist */
.notify { padding-bottom: 96px; }
.notify-in { background: var(--card); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: 28px; padding: 36px 22px 30px; text-align: center; }
@media (min-width: 720px) { .notify-in { padding: 52px 48px 40px; } }
.notify .lede { margin: 0 auto; }
.mail { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 540px; margin: 28px auto 0; }
.mail input[type="email"] { flex: 1 1 260px; min-width: 0; min-height: 48px; padding: 0 20px; border-radius: 99px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: 400 17px/1 Jost, sans-serif; }
.mail input[type="email"]::placeholder { color: var(--soft); }
.mail input[type="email"]:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; border-radius: 99px; }
.mail input[aria-invalid="true"] { border-color: var(--coral); }
.mail .btn { flex: 0 0 auto; }
.mail .btn:disabled { opacity: .6; cursor: default; }
.mail .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.mail-said { min-height: 1.5em; margin: 14px 0 0; font-size: 15.5px; color: var(--fg); }
.mail-said.error { color: var(--coral); }
.mail-note { margin: 4px auto 0; font-size: 13.5px; color: var(--soft); max-width: 460px; }
.notify.sent .mail { display: none; }

.why { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; max-width: 760px; }
.why li { position: relative; padding-left: 30px; color: var(--muted); font-size: 16.5px; line-height: 1.55; }
.why li::before { content: ''; position: absolute; left: 4px; top: .62em; width: 12px; height: 7px; border-left: 2px solid var(--coral); border-bottom: 2px solid var(--coral); transform: rotate(-45deg); }
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 15px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.foot b { font-weight: 500; letter-spacing: .2em; color: var(--fg); }
.foot .small { font-size: 13.5px; color: var(--soft); max-width: 620px; }

/* ---------------------------------------------------------------- stickers (the app's vinyl pack) */
.stk { position: absolute; aspect-ratio: 1 / var(--ar, 1); --k: .9px; transform: translate(-50%, -50%) rotate(var(--r, 0deg)); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.stk .vinyl { position: absolute; inset: 0; isolation: isolate; }
.stk .vinyl > * { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.stk .pr { filter: drop-shadow(0 calc(1.4 * var(--k)) calc(1.2 * var(--k)) rgba(40, 30, 20, .28)); }
.stk .holo, .stk .sheen { mask-size: 100% 100%; -webkit-mask-size: 100% 100%; mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; }
/* the foil's colours, as colour over the print, and a band of white light across it: as the app lays them
   (paintSkin), at (118 + 34 x) degrees, the colours a mirrored gradient 1.6 of the sticker long, both moving with the light */
.stk .holo { mix-blend-mode: color; opacity: calc(var(--holo) * .85); background-image: linear-gradient(calc(208deg + var(--lx, 0) * 34deg), #8FD3FF 0.00%, #AD96FF 6.00%, #FF8FD8 11.33%, #FFE680 16.67%, #9DFFB8 22.00%, #8FD3FF 27.33%, #FF8FD8 33.33%, #FF8FD8 33.33%, #8FD3FF 39.33%, #9DFFB8 44.67%, #FFE680 50.00%, #FF8FD8 55.33%, #AD96FF 60.67%, #8FD3FF 66.67%, #8FD3FF 66.67%, #AD96FF 72.67%, #FF8FD8 78.00%, #FFE680 83.33%, #9DFFB8 88.67%, #8FD3FF 94.00%, #FF8FD8 100.00%);
  background-size: 360% 360%; background-position: calc(50% - var(--lx, 0) * 23%) calc(50% - var(--ly, 0) * 23%); }
.stk .sheen { mix-blend-mode: screen; opacity: calc(var(--holo) * .9); background-image: linear-gradient(calc(208deg + var(--lx, 0) * 34deg), rgba(255, 255, 255, 0) 47.5%, rgba(255, 255, 255, .8) 50%, rgba(255, 255, 255, 0) 52.5%);
  background-size: 300% 300%; background-position: calc(50% - var(--lx, 0) * 45%) calc(50% - var(--ly, 0) * 45%); }
.stk .gl { mix-blend-mode: screen; opacity: calc(var(--gl) * .9 * var(--tw, .7)); }

.leaf > .stuck { position: absolute; inset: 0; z-index: 1; pointer-events: none; will-change: transform; }
.stuck .stk { --k: calc(1cqw * var(--wv, 30) / 100); pointer-events: auto; cursor: grab; }
.stuck .stk:focus-visible { outline: none; }
.stuck .stk:focus-visible .vinyl { outline: 2px solid var(--coral); outline-offset: 4px; border-radius: 8px; }
.stuck .stk.lifted { visibility: hidden; }
.stuck .stk.slap { animation: slap .34s cubic-bezier(.3, .7, .4, 1); }
.stuck .stk.slap .pr { animation: slapShade .34s ease-out; }
@keyframes slap { 0% { transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(1.07); } 45% { transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(.975); } 100% { transform: translate(-50%, -50%) rotate(var(--r, 0deg)); } }
@keyframes slapShade { from { filter: drop-shadow(0 calc(8 * var(--k)) calc(8 * var(--k)) rgba(40, 30, 20, .34)); } }
.stk.gone { animation: gone .32s ease-in forwards; pointer-events: none; }
@keyframes gone { to { transform: translate(-50%, calc(-50% - 36px)) rotate(var(--r, 0deg)) scale(.9); opacity: 0; } }

/* chosen: a dashed frame, a cross to take it off, a handle to size and turn it by */
.stk .frame { position: absolute; inset: -7%; border: 1.5px dashed rgba(33, 55, 88, .6); border-radius: 10px; pointer-events: none; }
.stk .x, .stk .hdl { position: absolute; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; transform: translate(-50%, -50%) rotate(calc(-1 * var(--r, 0deg))); box-shadow: 0 2px 6px rgba(40, 30, 20, .3); }
.stk .x { left: -7%; top: -7%; border: 0; padding: 0; background: #FBF8F1; color: #213758; cursor: pointer; }
.stk .hdl { left: 107%; top: 107%; background: #213758; color: #FBF8F1; cursor: nwse-resize; touch-action: none; }
.stk .x svg, .stk .hdl svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* the one in the hand: over everything, up off the paper, its shadow far below it */
.stk.carry { position: fixed; z-index: 90; pointer-events: none; }
.stk.carry .vinyl { transform: perspective(700px) rotateX(var(--bx, 0deg)) rotateY(var(--by, 0deg)) rotate(var(--lean, 0deg)) scale(1.04); }
.stk.carry .pr { filter: drop-shadow(0 calc(9 * var(--k)) calc(9 * var(--k)) rgba(40, 30, 20, .36)); }
.stk.carry.home { transition: left .28s cubic-bezier(.2, .8, .2, 1), top .28s cubic-bezier(.2, .8, .2, 1), width .28s cubic-bezier(.2, .8, .2, 1); }
/* the sheet in the hand is drawn over everything, in WebGL */
canvas.hand { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 90; pointer-events: none; }
canvas.hand[hidden] { display: none; }
body.peeling, body.peeling * { user-select: none; -webkit-user-select: none; }
body.carrying, body.carrying * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }

/* the pack: a sheet of backing paper with the stickers die-cut on it */
.pack { background: var(--card); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: 22px; padding: 18px 18px 16px; transition: opacity .16s; }
.pk-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pk-head h3 { font: 500 19px/1.3 Jost, sans-serif; margin: 0; }
.pk-close { display: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); place-items: center; cursor: pointer; }
.pk-sheet { background: #F3EEE3; border: 1px solid #E3DBC9; border-radius: 10px; padding: 10px 10px 6px; box-shadow: 0 4px 10px -6px rgba(60, 45, 20, .3); color: #213758; }
.pk-tag { display: flex; align-items: baseline; gap: 10px; margin: 0 4px 4px; min-height: 30px; }
.pk-name { font: 600 26px/28px Caveat, cursive; }
.pk-fin { font: 500 10.5px/1 Jost, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #8E897C; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.liner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pk { position: relative; aspect-ratio: 1 / .82; border: 0; padding: 0; background: transparent; cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; }
.pk .stk { left: 50%; top: 50%; transition: transform .18s cubic-bezier(.2, .8, .2, 1), opacity .16s; }
@media (hover: hover) { .pk:hover .stk { transform: translate(-50%, -52%) rotate(var(--r, 0deg)) scale(1.05); } }
.pk:focus-visible { outline: 2px solid var(--coral); outline-offset: -2px; border-radius: 10px; }
.pk.lifted .stk { opacity: .13; filter: grayscale(1) brightness(.6); transform: translate(-50%, -50%) rotate(var(--r, 0deg)); }
.pk-hint { margin: 12px 2px 0; font-size: 13.5px; line-height: 1.5; color: var(--soft); }
/* beside the diary the pack opens from the button in the field and closes by its cross */
@media (min-width: 980px) {
  .pack:not(.open) { display: none; }
  .pack.open { animation: pack-in .26s cubic-bezier(.2, .8, .2, 1); }
  .pk-close { display: grid; }
}
@keyframes pack-in { from { opacity: 0; transform: translateY(8px); } }

/* on a phone the pack is a sheet that comes up from below, and steps aside while a sticker is carried off it */
@media (max-width: 979px) {
  .pack { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; border-radius: 22px 22px 0 0; padding: 12px 14px calc(16px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 30px -12px rgba(0, 0, 0, .35); transform: translateY(105%); visibility: hidden; transition: transform .34s cubic-bezier(.2, .8, .2, 1), visibility 0s .34s, opacity .16s; }
  .pack.open { transform: none; visibility: visible; transition: transform .34s cubic-bezier(.2, .8, .2, 1), visibility 0s, opacity .16s; }
  .pack.away { opacity: 0; }
  .pk-close { display: grid; }
  .pk-hint { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .ttl.write span, .ttl.write path, .th.mine .wr, .th.pencil.write, .mk.write::before, .fx.write .ps, .fx.write .pw { animation: none !important; clip-path: none !important; stroke-dashoffset: 0 !important; opacity: 1 !important; transform: none !important; }
  .wt i { animation: none; opacity: .7; }
  .stk, .stk.slap, .stk .pr, .pk .stk, .pack { animation: none !important; transition: none !important; }
}
