/* VOICE   tender and unhurried, a picture book read slowly at bedtime
   IDEA    a dreamy sky journal: pastel clouds on paper, doodled stars and dashed flight paths, flat animal friends
   PICTURE the example page resting on a cloud, a sleepy elephant beside it, a balloon looping in on a dashed path
   COLOUR  paper ground, powder-blue sky leads, butter and blush clouds support, coral marks what matters; night sky in dark
   TYPE    Satisfy brush script for big titles, Caveat pen handwriting for small titles and notes, Nunito for reading
   LAYOUT  laptop: title and actions left, the sky picture right; phone: title, picture, then actions */
:root {
  color-scheme: light dark;
  --bg: light-dark(#fbf9f5, #1b1f31);
  --surface: light-dark(#ffffff, #262b42);
  --raised: light-dark(#f5f2ec, #2d3350);
  --ink: light-dark(#313449, #eef0fa);
  --muted: light-dark(#5c5f73, #b4b8ce);
  --line: light-dark(rgba(49, 52, 73, .15), rgba(238, 240, 250, .16));
  --edge: light-dark(rgba(49, 52, 73, .55), rgba(238, 240, 250, .5));
  --sky: light-dark(#d6e4f7, #243052);
  --butter: light-dark(#fcebb3, #34304f);
  --blush: light-dark(#f9dcd6, #3b2c46);
  --mint: light-dark(#d4ecdc, #233b3a);
  --lilac: light-dark(#e4dff6, #2f2b4f);
  --sky-b: light-dark(#c3d8f4, #33426b);
  --butter-b: light-dark(#f8e09a, #4a4466);
  --blush-b: light-dark(#f6cdc6, #4d3a57);
  --mint-b: light-dark(#c4e4cf, #2d4a48);
  --lilac-b: light-dark(#d9d1f3, #3d3863);
  --cloud: light-dark(#ffffff, #34406a);
  --butter-cloud: light-dark(#fbe6a0, #3d3a5f);
  --blush-cloud: light-dark(#f8d1ca, #47375a);
  --ribbon: light-dark(#a7c3ec, #a7c3ec);
  --ribbon-ink: #22263a;
  --coral: light-dark(#e56f5c, #f39b8a);
  --ease: light-dark(#4f9a72, #8fd3ad);
  --coral-ink: light-dark(#bf4d3b, #f5ab9c);
  --star: light-dark(#363a55, #f6e3a1);
  --dash: light-dark(#5d6488, #a9b3d9);
  --link: light-dark(#3a51a0, #b2cbf2);
  --warn: light-dark(#a5483e, #f0a097);
  --warn-soft: light-dark(#f9dcd6, #4f2f2b);
  --focus: light-dark(#4a63c9, #b2cbf2);
  --shadow: 0 1px 2px rgba(40, 44, 70, .08), 0 8px 22px rgba(40, 44, 70, .09);
  --grain: 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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .33 0 0 0 0 .4 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  --f-script: 'Satisfy', 'Caveat', 'Segoe Script', cursive;
  --f-display: 'Caveat', 'Segoe Print', 'Chalkboard SE', cursive;
  --f-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-hand: 'Caveat', 'Segoe Print', cursive;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
* { box-sizing: border-box; min-width: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grain), var(--bg); color: var(--ink); font: 16px/1.55 var(--f-body); overflow-x: clip; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 700; line-height: 1.08; text-wrap: balance; margin: 0; }
h1, h2 { font-family: var(--f-script); font-weight: 400; line-height: 1.15; }
h1 { font-size: clamp(54px, 7vw, 86px); }
h2 { font-size: clamp(36px, 4.4vw, 50px); }
h3 { font-size: 27px; }
p { margin: 0; }
a { color: var(--link); }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(16px, 4vw, env(safe-area-inset-left, 0px)); padding-right: max(16px, 4vw, env(safe-area-inset-right, 0px)); }
.band { padding-block: clamp(28px, 4vw, 56px); }
.muted { color: var(--muted); }
.fine { font-size: 14px; color: var(--muted); }
.hand { font-family: var(--f-hand); font-weight: 700; font-size: 24px; line-height: 1.1; color: var(--coral-ink); }
.curl { width: 46px; height: 32px; flex: none; color: var(--coral-ink); }

/* top bar */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.top .wrap { display: flex; align-items: center; gap: 6px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--f-script); font-weight: 400; font-size: 30px; background: none; border: 0; padding: 4px 0; cursor: pointer; white-space: nowrap; color: var(--ink); }
.brand svg { width: 44px; height: 31px; margin-top: -6px; }
.top .brand, .top .btn.pause { flex-shrink: 0; white-space: nowrap; }
.top .sp { flex: 1; }
.navlink { background: none; border: 0; padding: 0 10px; min-height: 44px; font-weight: 800; font-size: 15px; cursor: pointer; color: var(--ink); border-radius: 999px; }
.navlink:hover { text-decoration: underline dashed; text-underline-offset: 5px; }
.navlink { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.navlink svg { width: 22px; height: 22px; display: none; }
@media (max-width: 420px) { .brand svg { display: none; } .navlink svg { display: block; } .navlink span { display: none; } .navlink { min-width: 44px; justify-content: center; padding: 0; } .top .wrap { gap: 2px; } }
@media (max-width: 560px) { .brand { font-size: 25px; } .brand svg { width: 34px; height: 24px; } .navlink.hide-s { display: none; } .navlink { padding: 0 6px; font-size: 14px; } .top .btn { padding-inline: 12px; font-size: 14px; } }

/* buttons */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--edge); background: var(--surface); cursor: pointer; font-weight: 800; font-size: 15px; text-decoration: none; color: var(--ink); white-space: nowrap; isolation: isolate; }
.btn:hover { background: var(--raised); }
.btn.primary { border: 0; border-radius: 4px; background: none; color: var(--ribbon-ink); min-height: 50px; padding: 0 34px; font-family: var(--f-display); font-weight: 700; font-size: 24px; }
.btn.primary::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ribbon); clip-path: polygon(0 0, 100% 0, calc(100% - 13px) 50%, 100% 100%, 0 100%, 13px 50%); transition: transform .2s ease; }
.btn.primary::after { content: ""; position: absolute; inset: 6px 20px; border-block: 1.5px dashed rgba(34, 38, 58, .55); pointer-events: none; }
.btn.primary:hover { background: none; }
.btn.primary:hover::before { transform: translateY(-2px); background: color-mix(in srgb, var(--ribbon) 88%, #fff); }
.btn.primary.small { min-height: 40px; padding: 0 26px; font-size: 21px; }
.btn.primary.small::after { inset: 5px 16px; }
.btn.soft { background: var(--sky); border-color: transparent; }
.btn.soft:hover { background: var(--sky-b); }
.btn.pause { background: var(--butter-b); border-color: transparent; color: var(--ink); }
.btn.pause:hover { background: var(--butter); }
.btn.danger { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }
.linkbtn { background: none; border: 0; padding: 8px 0; color: var(--link); font-weight: 800; cursor: pointer; min-height: 44px; text-decoration: underline; text-decoration-style: dashed; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.plainbtn { border: 0; background: none; padding: 0; cursor: pointer; display: block; }
.row-btns { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* cloud bands: flat pastel fields with bubbly edges */
.cloudband { position: relative; background: var(--cb); margin-block: 64px; }
.cloudband::before, .cloudband::after { content: ""; position: absolute; left: 0; right: 0; height: 40px; pointer-events: none;
  background: radial-gradient(circle at 50% 100%, var(--cb) 33px, transparent 34px) 0 100% / 84px 40px repeat-x,
    radial-gradient(circle at 50% 100%, var(--cb) 22px, transparent 23px) 31px 100% / 58px 40px repeat-x,
    radial-gradient(circle at 50% 100%, var(--cb) 14px, transparent 15px) 12px 100% / 37px 40px repeat-x; }
.cloudband::before { bottom: calc(100% - 1px); }
.cloudband::after { top: calc(100% - 1px); transform: scaleY(-1); }
.c-sky { --cb: var(--sky); }
.c-butter { --cb: var(--butter); }
.c-blush { --cb: var(--blush); }
.skyband { --cb: var(--sky); background: var(--cb); position: relative; margin-bottom: 56px; padding-bottom: clamp(36px, 5vw, 64px); }
.skyband::after { content: ""; position: absolute; left: 0; right: 0; top: calc(100% - 1px); height: 40px; pointer-events: none; transform: scaleY(-1);
  background: radial-gradient(circle at 50% 100%, var(--cb) 33px, transparent 34px) 0 100% / 84px 40px repeat-x,
    radial-gradient(circle at 50% 100%, var(--cb) 22px, transparent 23px) 31px 100% / 58px 40px repeat-x,
    radial-gradient(circle at 50% 100%, var(--cb) 14px, transparent 15px) 12px 100% / 37px 40px repeat-x; }
.sechead { display: grid; gap: 6px; }
.sechead p { max-width: 60ch; }

/* hero */
.heroband { --cb: var(--sky); background: var(--cb); position: relative; padding-block: clamp(20px, 3vw, 40px) 8px; margin-bottom: 48px; }
.heroband::after { content: ""; position: absolute; left: 0; right: 0; top: calc(100% - 1px); height: 40px; pointer-events: none; transform: scaleY(-1);
  background: radial-gradient(circle at 50% 100%, var(--cb) 33px, transparent 34px) 0 100% / 84px 40px repeat-x,
    radial-gradient(circle at 50% 100%, var(--cb) 22px, transparent 23px) 31px 100% / 58px 40px repeat-x,
    radial-gradient(circle at 50% 100%, var(--cb) 14px, transparent 15px) 12px 100% / 37px 40px repeat-x; }
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "title pic" "act pic"; column-gap: clamp(20px, 3vw, 48px); align-items: center; }
.hero-title { grid-area: title; align-self: end; display: grid; gap: 14px; padding-top: 24px; }
.hero-act { grid-area: act; align-self: start; display: grid; gap: 16px; justify-items: start; padding-top: 18px; }
.lede { font-size: 20px; max-width: 30ch; }
.hero-act .hand { display: flex; align-items: center; gap: 4px; margin: -4px 0 0 18px; }
.hero-act .hand .curl { transform: scale(-1, -1) rotate(-8deg); margin-top: -18px; }
.based { color: var(--muted); font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; }
.based .linkbtn { min-height: 32px; padding: 0; }
.hero-pic { grid-area: pic; position: relative; aspect-ratio: 640 / 560; width: 100%; max-width: 720px; justify-self: end; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.scene.front { pointer-events: none; }
.hero-pic .frame { position: absolute; left: 25%; top: 6.5%; width: 44%; transform: rotate(3deg); transition: transform .3s ease; }
.hero-pic .frame:hover { transform: rotate(1.5deg) translateY(-4px); }
.hero-pic .frame::before, .hero-pic .frame::after { content: ""; position: absolute; z-index: 2; width: 26%; height: 7%; background: color-mix(in srgb, var(--coral) 55%, transparent); }
.hero-pic .frame::before { left: -7%; top: 3%; transform: rotate(-38deg); background: color-mix(in srgb, #f2c46b 70%, transparent); }
.hero-pic .frame::after { right: -8%; top: 2%; transform: rotate(32deg); }
.hero-pic .cap { position: absolute; left: 2%; top: 75%; display: flex; align-items: flex-start; gap: 2px; font-family: var(--f-hand); font-weight: 700; font-size: clamp(20px, 2.2vw, 26px); color: var(--coral-ink); transform: rotate(-5deg); pointer-events: none; }
.hero-pic .cap .curl { margin-top: -14px; }
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "pic" "act"; }
  .hero-title { padding-top: 8px; }
  .hero-pic { justify-self: center; max-width: 560px; margin-top: 4px; }
  .hero-act { padding-top: 0; }
}

/* how a page comes together: five stations on a dashed path */
.how .wrap { display: grid; gap: 28px; }
.pathwrap { position: relative; }
.pathwrap .wave { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 96px; }
.path { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.path li { display: grid; gap: 8px; justify-items: center; text-align: center; }
.path .badge { width: 96px; height: 96px; }
.path b { font-family: var(--f-display); font-size: 26px; font-weight: 700; line-height: 1.15; }
.path b span { color: var(--coral-ink); }
.path p { font-size: 15px; color: var(--muted); max-width: 24ch; }
@media (max-width: 760px) {
  .pathwrap .wave { display: none; }
  .path { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .path li { grid-template-columns: 72px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 16px; row-gap: 2px; justify-items: start; text-align: left; position: relative; padding-bottom: 18px; }
  .path li:not(:last-child)::before { content: ""; position: absolute; left: 35px; top: 76px; bottom: 2px; border-left: 2px dashed var(--dash); }
  .path .badge { width: 72px; height: 72px; grid-row: span 2; }
  .path b { align-self: end; }
  .path p { max-width: none; align-self: start; }
}

/* scaled page (thumbnails, hero, previews) */
.thumb { position: relative; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 3px; box-shadow: var(--shadow); background: #fbf6ec; }
.thumb > .pg { position: absolute; left: 0; top: 0; transform: scale(var(--k, .3)); transform-origin: 0 0; pointer-events: none; }
.pg { position: relative; width: 600px; height: 800px; overflow: hidden; background-size: 600px 800px; background-color: #fbf6ec; }
.el { position: absolute; transform-origin: 50% 50%; user-select: none; -webkit-user-select: none; }
.el img { position: absolute; pointer-events: none; max-width: none; -webkit-user-drag: none; }
.el .ph { object-fit: cover; }
.nt { position: absolute; pointer-events: none; white-space: pre; overflow: visible; }
.nt .nh { font-family: var(--f-body); font-weight: 700; opacity: .62; white-space: pre; }

/* your pages: polaroids with washi tape */
.shelf-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 34px 26px; }
.card { position: relative; display: grid; gap: 6px; background: var(--surface); border: 0; padding: 10px 10px 14px; text-align: left; cursor: pointer; color: inherit; box-shadow: var(--shadow); border-radius: 3px; transform: rotate(var(--tilt, -1deg)); transition: transform .25s ease; }
.card:nth-child(3n+2) { --tilt: 1.2deg; }
.card:nth-child(3n) { --tilt: -.4deg; }
.card::before { content: ""; position: absolute; left: 50%; top: -10px; width: 74px; height: 22px; transform: translateX(-50%) rotate(-3deg); background: color-mix(in srgb, var(--ribbon) 70%, transparent); z-index: 1; }
.card:nth-child(3n+2)::before { background: color-mix(in srgb, #f2c46b 70%, transparent); transform: translateX(-50%) rotate(4deg); }
.card:nth-child(3n)::before { background: color-mix(in srgb, var(--coral) 45%, transparent); }
.card:hover { transform: rotate(0deg) translateY(-4px); }
.card .thumb { box-shadow: none; border-radius: 0; margin-bottom: 6px; }
.card .t { font-family: var(--f-display); font-weight: 700; font-size: 24px; line-height: 1.2; }
.card .d { font-size: 14px; color: var(--muted); }
.chip-lvl { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; background: var(--mint); padding: 2px 10px; border-radius: 999px; width: fit-content; font-variant-numeric: tabular-nums; }
.chip-lvl.draft { background: var(--blush); }
.empty { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; align-items: center; max-width: 720px; padding: 24px 28px; border-radius: 28px; border: 2px dashed var(--dash); }
.empty img { width: 100%; }
.empty > div { display: grid; gap: 10px; justify-items: start; }
@media (max-width: 560px) { .empty { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; } .empty img { width: 160px; } .empty > div { justify-items: center; } }
.status { font-size: 14px; color: var(--muted); }

/* research summary and care bands */
.rsband .shelf-head { margin-bottom: 30px; }
.synth { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 30px 20px; }
.scard { position: relative; background: var(--surface); border-radius: 4px; padding: 20px 20px 16px; display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 14px; row-gap: 6px; align-content: start; box-shadow: var(--shadow); }
.scard::before { content: ""; position: absolute; left: 22px; top: -9px; width: 64px; height: 20px; transform: rotate(-4deg); background: color-mix(in srgb, var(--ribbon) 70%, transparent); }
.scard:nth-child(even)::before { left: auto; right: 22px; transform: rotate(5deg); background: color-mix(in srgb, var(--coral) 45%, transparent); }
.scard img { width: 56px; height: 56px; grid-row: span 3; }
.scard h3 { margin: 0; font-size: 26px; line-height: 1.15; align-self: center; }
.scard p { margin: 0; }
.src { font-size: 13px; color: var(--muted); }
.src .linkbtn { min-height: 28px; padding: 0; font-size: 13px; }
.care .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; align-items: start; }
.care ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
@media (max-width: 760px) { .care .wrap { grid-template-columns: minmax(0, 1fr); } }

/* session */
.steps { display: flex; gap: 0; row-gap: 10px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0 0 30px; align-items: center; }
.steps li { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; color: var(--muted); }
.steps li + li::before { content: ""; width: 26px; margin: 0 8px; border-top: 2px dashed var(--dash); opacity: .6; }
.steps li span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--line); font-size: 13px; font-weight: 800; }
.steps li.on { color: var(--ink); }
.steps li.on span { width: 38px; height: 38px; border: 0; border-radius: 0; background: #f6d067; color: #22263a; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); padding-top: 4px; }
.steps li.done span { background: var(--mint-b); border-color: transparent; color: var(--ink); }
@media (max-width: 640px) { .steps li:not(.on) { font-size: 0; gap: 0; } .steps li + li::before { width: 14px; margin: 0 5px; } }
.sheet { position: relative; background: var(--surface); border-radius: 26px; box-shadow: var(--shadow); padding: clamp(20px, 4vw, 44px); margin-top: 26px; }
.sheet::before { content: ""; position: absolute; left: 34px; top: -30px; width: 200px; height: 32px; pointer-events: none;
  background: radial-gradient(circle at 34px 40px, var(--surface) 28px, transparent 29px), radial-gradient(circle at 92px 46px, var(--surface) 38px, transparent 39px), radial-gradient(circle at 156px 42px, var(--surface) 26px, transparent 27px); }
.form { display: grid; gap: 28px; max-width: 760px; }
.form > header { display: grid; gap: 8px; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; }
legend, .lbl { font-weight: 800; font-size: 17px; padding: 0; margin-bottom: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--raised); cursor: pointer; font-weight: 700; font-size: 15px; }
.chip:hover { border-color: var(--edge); }
.chip[aria-pressed="true"] { background: var(--sky); border-color: var(--dash); color: var(--ink); }
.chip[aria-pressed="true"]::before { content: "✓ "; color: var(--link); }
.meter { display: grid; gap: 8px; }
.meter input[type=range] { width: 100%; accent-color: var(--coral); height: 32px; }
.meter .ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.meter .val { font-family: var(--f-display); font-size: 54px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.meter .row { display: flex; align-items: baseline; gap: 14px; }
.msg { border-radius: 16px; padding: 12px 16px; background: var(--sky); font-size: 15px; display: grid; gap: 10px; justify-items: start; }
.msg.warm { background: var(--blush); }
textarea, input[type=text] { width: 100%; border: 1.5px solid var(--line); background: var(--raised); border-radius: 14px; padding: 12px 14px; font-size: 16px; line-height: 1.55; resize: vertical; }
textarea { min-height: 110px; }
textarea:focus, input[type=text]:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.q { display: grid; gap: 8px; }
.q label { font-weight: 700; font-size: 17px; line-height: 1.4; }
.stepnav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.practices { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.pr { display: grid; grid-template-columns: 56px 1fr; gap: 4px 14px; text-align: left; padding: 16px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--raised); cursor: pointer; align-items: start; }
.pr:hover { border-color: var(--edge); }
.pr img { width: 56px; height: 56px; grid-row: span 4; }
.pr b { font-family: var(--f-display); font-weight: 700; font-size: 23px; line-height: 1.25; }
.pr .bl { font-size: 14px; color: var(--muted); line-height: 1.45; }
.pr[aria-pressed="true"] { border-color: var(--dash); background: var(--sky); box-shadow: 0 0 0 2px var(--dash) inset; }
.depth { font-size: 12px; font-weight: 800; padding: 1px 9px; border-radius: 999px; width: fit-content; }
.depth.gentle { background: var(--mint-b); color: var(--ink); }
.depth.steady { background: var(--butter-b); color: var(--ink); }
.depth.deep { background: var(--blush-b); color: var(--ink); }
.hint { font-size: 13px; font-weight: 800; color: var(--link); }
.hint.later { color: var(--muted); font-weight: 600; }
.quote { font-family: var(--f-hand); font-size: 24px; line-height: 1.25; border-left: 3px solid var(--coral); padding-left: 14px; }
.quote cite { display: block; font-family: var(--f-body); font-size: 13px; font-style: normal; color: var(--muted); margin-top: 4px; }
.insight { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: start; background: var(--butter); border-radius: 18px; padding: 14px 16px; }
.insight img { width: 52px; height: 52px; }
.insight b { font-family: var(--f-display); font-size: 24px; }
.insight p { margin: 2px 0 0; }
.sort { display: grid; gap: 14px; }
.sort .add { display: flex; gap: 8px; flex-wrap: wrap; }
.sort .add input { flex: 1 1 220px; }
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.col { border-radius: 16px; padding: 12px; background: var(--raised); border: 1.5px dashed var(--dash); display: grid; gap: 8px; align-content: start; min-height: 120px; }
.col h4 { margin: 0; font-size: 21px; }
.item { background: var(--surface); border-radius: 12px; padding: 8px 10px; display: grid; gap: 6px; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); font-size: 15px; }
.item .acts { display: flex; gap: 4px; flex-wrap: wrap; }
.item .acts button { font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--raised); cursor: pointer; min-height: 28px; }
@media (max-width: 640px) { .cols { grid-template-columns: minmax(0, 1fr); } }
.release { display: grid; gap: 12px; position: relative; }
.slip { font-family: var(--f-hand); font-size: 22px; background: #fbf4e6; color: #4a443d; padding: 14px 18px; border-radius: 4px; box-shadow: 0 2px 6px rgba(0, 0, 0, .1); }
.slip.go { animation: fold 2.6s ease-in forwards; }
@keyframes fold { 0% { transform: none; opacity: 1; } 30% { transform: scale(.35) rotate(-8deg); opacity: 1; border-radius: 30%; } 100% { transform: translate(60vw, -30px) scale(.2) rotate(12deg); opacity: 0; } }
.boat { width: 90px; animation: sail 3.2s ease-in-out forwards; }
@keyframes sail { 0% { transform: translateX(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateX(min(60vw, 520px)) translateY(-8px); opacity: 0; } }
.closing { display: grid; gap: 18px; justify-items: center; text-align: center; padding-block: 40px; }
.closing .thumb { width: min(320px, 80vw); transform: rotate(-1.5deg); }
.refs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.refs li { padding-left: 2em; text-indent: -2em; overflow-wrap: anywhere; }
.refs a { word-break: break-all; }
.refbox { margin-top: 26px; padding-top: 20px; border-top: 2px dashed var(--line); display: grid; gap: 10px; text-align: left; justify-items: start; max-width: 760px; width: 100%; }
.refbox h3 { margin: 0; font-size: 27px; }

/* editor */
.edbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.edbar .sep { width: 1px; height: 26px; background: var(--line); margin: 0 4px; }
.edbar .status { margin-left: auto; }
.ibtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; min-width: 40px; padding: 0 10px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; font-size: 13px; }
.ibtn:hover { border-color: var(--edge); }
.ibtn svg { width: 18px; height: 18px; }
.ibtn[disabled] { opacity: .4; cursor: not-allowed; }
.ibtn.on { background: var(--sky); border-color: var(--dash); }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.editor.ex { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.stage { display: grid; justify-items: center; }
.fit { position: relative; width: calc(600px * var(--z, .6)); height: calc(800px * var(--z, .6)); }
.fit > .pg { position: absolute; left: 0; top: 0; transform: scale(var(--z, .6)); transform-origin: 0 0; touch-action: none; box-shadow: 0 2px 4px rgba(40, 44, 70, .12), 0 18px 40px rgba(40, 44, 70, .16); border-radius: 3px; }
.fit .el { cursor: grab; }
.fit .el:focus { outline: none; }
.selbox { position: absolute; border: calc(1.6px / var(--z, .6)) dashed #4a63c9; pointer-events: none; transform-origin: 50% 50%; }
.hd { position: absolute; width: calc(28px / var(--z, .6)); height: calc(28px / var(--z, .6)); border-radius: 50%; background: #fffdf8; border: calc(2px / var(--z, .6)) solid #4a63c9; pointer-events: auto; display: grid; place-items: center; touch-action: none; }
.hd svg { width: 60%; height: 60%; pointer-events: none; }
.hd.rot { left: 50%; top: calc(-44px / var(--z, .6)); transform: translateX(-50%); cursor: grab; }
.hd.scale { right: calc(-14px / var(--z, .6)); bottom: calc(-14px / var(--z, .6)); cursor: nwse-resize; }
.hd.del { left: calc(-14px / var(--z, .6)); top: calc(-14px / var(--z, .6)); cursor: pointer; border-color: #b8574f; }
.tools { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); display: grid; align-content: start; overflow: hidden; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 76px); max-height: calc(100vh - 100px); }
.tabs { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: 1 0 auto; border: 0; background: none; padding: 8px 10px; border-radius: 12px; font-weight: 800; font-size: 14px; cursor: pointer; color: var(--muted); min-height: 40px; }
.tabs button[aria-selected="true"] { background: var(--sky); color: var(--ink); }
.tabbody { padding: 14px; overflow-y: auto; display: grid; gap: 14px; align-content: start; }
.cats { display: flex; gap: 6px; flex-wrap: wrap; }
.cats .chip { min-height: 32px; padding: 0 12px; font-size: 13px; }
.cats .chip[aria-pressed="true"]::before { content: none; }
.stk { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.stk button { aspect-ratio: 1; border: 0; background: var(--raised); border-radius: 12px; cursor: pointer; padding: 6px; display: grid; place-items: center; }
.stk button:hover { background: var(--sky); }
.stk img { width: 100%; height: 100%; object-fit: contain; }
.words { display: grid; gap: 6px; }
.words button { text-align: left; border: 0; background: var(--raised); border-radius: 12px; padding: 8px 12px; cursor: pointer; font-family: var(--f-hand); font-size: 21px; line-height: 1.2; min-height: 40px; }
.words button small { display: block; font-family: var(--f-body); font-size: 12px; color: var(--muted); }
.words button:hover { background: var(--sky); }
.nstyles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.nstyles button { border: 1.5px solid var(--line); background: var(--raised); border-radius: 12px; cursor: pointer; padding: 8px; display: grid; gap: 4px; justify-items: center; font-size: 13px; font-weight: 700; }
.nstyles button[aria-pressed="true"] { border-color: var(--dash); background: var(--sky); }
.nstyles img { width: 100%; height: 44px; object-fit: contain; }
.papers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.papers button { border: 2px solid transparent; border-radius: 8px; padding: 0; cursor: pointer; background: none; display: grid; gap: 4px; font-size: 12px; font-weight: 700; }
.papers img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 6px; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.papers button[aria-pressed="true"] img { outline: 3px solid var(--dash); outline-offset: 1px; }
.insp { display: grid; gap: 12px; }
.insp .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.insp select { font-size: 16px; min-height: 40px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--raised); padding: 0 10px; flex: 1; }
.insp input[type=range] { flex: 1; accent-color: var(--coral); }
.inks { display: flex; gap: 6px; flex-wrap: wrap; }
.inks button { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; }
.inks button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--focus); }
.upload { display: grid; gap: 10px; justify-items: start; }
.upload input { font-size: 14px; }
.tip { font-size: 13px; color: var(--muted); line-height: 1.45; }
@media (max-width: 900px) {
  .editor, .editor.ex { grid-template-columns: minmax(0, 1fr); }
  .tools { position: static; max-height: none; }
  .stk { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 480px) { .stk { grid-template-columns: repeat(4, minmax(0, 1fr)); } .edbar .lbl-t { display: none; } }
@media (max-width: 480px) { .edbar { gap: 4px; } .edbar .sep { display: none; } .edbar .ibtn { flex: 1 1 0; min-width: 36px; padding-inline: 0; } .edbar .status { flex-basis: 100%; margin-left: 0; text-align: right; } }

/* page view */
.pv-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; justify-content: space-between; margin-bottom: 18px; }
.pv-head .t { display: grid; gap: 4px; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); margin-bottom: 16px; }
.seg button { border: 0; background: none; border-radius: 999px; padding: 0 18px; min-height: 38px; font-weight: 800; cursor: pointer; color: var(--muted); }
.seg button[aria-selected="true"] { background: var(--sky); color: var(--ink); }
.refl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 18px; }
.rcard { background: var(--surface); border-radius: 20px; padding: 20px; box-shadow: var(--shadow); display: grid; gap: 10px; align-content: start; }
.rcard h3 { font-size: 27px; }
.rcard dl { margin: 0; display: grid; gap: 8px; }
.rcard dt { font-size: 13px; font-weight: 800; color: var(--muted); }
.rcard dd { margin: 0; white-space: pre-wrap; }
.confirm { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--warn-soft); padding: 10px 14px; border-radius: 14px; margin-bottom: 14px; }

/* research page */
.research { display: grid; gap: 24px; }
.research .intro { max-width: 70ch; margin: 0; font-size: 17px; }
.research .sub { font-size: 36px; margin: 12px 0 0; }
.studies { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.study { background: var(--surface); border-radius: 18px; padding: 18px 20px; display: grid; gap: 6px; align-content: start; scroll-margin-top: 84px; box-shadow: var(--shadow); }
.study.hl { box-shadow: 0 0 0 3px var(--coral), var(--shadow); }
.study .by { margin: 0; font-weight: 800; color: var(--coral-ink); font-size: 14px; }
.study h4 { margin: 0; font-family: var(--f-body); font-weight: 800; font-size: 17px; line-height: 1.3; }
.study p { margin: 0; }
.study ul { margin: 4px 0; padding-left: 20px; display: grid; gap: 4px; }
.refsec { display: grid; gap: 14px; background: var(--surface); border-radius: 22px; padding: clamp(18px, 3vw, 30px); box-shadow: var(--shadow); }
.refsec .sub { margin: 0; }

/* how far I've come */
.journey { display: grid; gap: 22px; }
.journey .t { display: grid; gap: 8px; justify-items: start; }
.jtop { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; align-items: end; }
.jfind { font-size: 20px; max-width: 46ch; }
.figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.figs div { background: var(--surface); border-radius: 20px; padding: 12px 16px 14px; box-shadow: var(--shadow); display: grid; gap: 2px; }
.figs b { font-family: var(--f-display); font-size: 50px; line-height: 1; font-variant-numeric: tabular-nums; }
.figs small { font-size: 26px; color: var(--muted); }
.figs span { font-size: 14px; font-weight: 700; color: var(--muted); }
.jcard { background: var(--surface); border-radius: 24px; padding: clamp(16px, 3vw, 28px); box-shadow: var(--shadow); display: grid; gap: 14px; align-content: start; }
.jcard .empty { border: 0; padding: 0; max-width: none; }
.jhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 20px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend .k { width: 12px; height: 12px; border-radius: 50%; }
.legend .k.in { border: 2px solid var(--ink); background: var(--surface); }
.legend .k.out { background: var(--ease); }
.legend .k.up { background: var(--coral); }
.legend .k.same { background: var(--dash); }
.fig { position: relative; height: 300px; }
.fig > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fig text { paint-order: stroke; stroke: var(--surface); stroke-width: 4px; font: 13px var(--f-body); fill: var(--muted); }
.fig .dumb { cursor: pointer; }
.fig .dumb:hover .hit { fill: color-mix(in srgb, var(--sky) 70%, transparent); }
.jrow { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 22px; }
.wkept { display: flex; flex-wrap: wrap; gap: 16px 12px; align-content: start; }
.wk { display: grid; justify-items: center; padding: 8px 16px 6px; background: var(--butter); border-radius: 4px; transform: rotate(var(--r, 0deg)); box-shadow: 0 1px 2px rgba(40, 44, 70, .1); }
.wk:nth-child(3n+2) { background: var(--blush); }
.wk:nth-child(3n) { background: var(--sky); }
.wk b { font-family: var(--f-hand); font-weight: 700; font-size: 25px; line-height: 1.1; }
.wk small { font-size: 12px; color: var(--muted); }
.ptried { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 10px; }
.pt { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 10px; align-items: center; align-content: start; padding: 10px; border-radius: 14px; background: var(--raised); }
.pt img { width: 40px; height: 40px; grid-row: span 3; }
.pt b { font-size: 14px; line-height: 1.25; }
.pt span { font-size: 13px; color: var(--muted); }
.pt.not { background: none; border: 1.5px dashed var(--line); }
.pt.not img { opacity: .5; }
.pt .linkbtn { min-height: 28px; padding: 0; font-size: 13px; justify-self: start; }
.stops { list-style: none; margin: 0; padding: 0; display: grid; }
.stop { position: relative; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 20px; padding-bottom: 28px; }
.stop:not(:last-child)::before { content: ""; position: absolute; left: 55px; top: 162px; bottom: 8px; border-left: 2px dashed var(--dash); opacity: .6; }
.tthumb { width: 110px; transform: rotate(-2deg); align-self: start; }
.stop:nth-child(even) .tthumb { transform: rotate(2deg); }
.sbody { display: grid; gap: 6px; align-content: start; justify-items: start; max-width: 70ch; }
.sdate { font-size: 14px; font-weight: 800; color: var(--coral-ink); }
.sbody h4 { font-size: 27px; }
.slv { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 15px; }
.mini { position: relative; width: 130px; height: 16px; flex: none; }
.mini::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; border-radius: 2px; background: var(--line); }
.mini i { position: absolute; top: 2px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; }
.mini .ring { border: 2px solid var(--ink); background: var(--surface); z-index: 1; }
.mini .dot { background: var(--ease); z-index: 2; }
.mini .dot.up { background: var(--coral); }
.mini .dot.same { background: var(--dash); }
.mini .seg { top: 6px; height: 4px; margin-left: 0; border-radius: 2px; background: color-mix(in srgb, var(--ease) 55%, transparent); }
.mini .seg.up { background: color-mix(in srgb, var(--coral) 55%, transparent); }
.spill { font-family: var(--f-hand); font-weight: 700; font-size: 22px; line-height: 1.3; background: var(--butter); padding: 0 12px; border-radius: 999px; }
.snote { color: var(--muted); font-style: italic; }
.slook { font-size: 15px; background: var(--sky); padding: 8px 12px; border-radius: 12px; }
.bkcard { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 28px; }
.bkcard .sechead p.muted { max-width: 70ch; }
.bkcard .row-btns { justify-content: flex-end; }
@media (max-width: 860px) { .jtop, .jrow, .bkcard { grid-template-columns: minmax(0, 1fr); } .bkcard .row-btns { justify-content: flex-start; } }
@media (max-width: 560px) { .fig { height: 250px; } .figs b { font-size: 40px; } .stop { grid-template-columns: 76px minmax(0, 1fr); gap: 14px; } .tthumb { width: 76px; } .stop:not(:last-child)::before { left: 38px; top: 116px; } }

/* pause */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(27, 31, 49, .5); display: grid; place-items: center; padding: max(40px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); overflow-y: auto; }
.pausebox { background: var(--surface); border-radius: 28px; max-width: 560px; width: 100%; padding: clamp(22px, 4vw, 36px); display: grid; gap: 18px; box-shadow: var(--shadow); position: relative; }
.pausebox::before { content: ""; position: absolute; left: 40px; top: -30px; width: 200px; height: 32px; pointer-events: none;
  background: radial-gradient(circle at 34px 40px, var(--surface) 28px, transparent 29px), radial-gradient(circle at 92px 46px, var(--surface) 38px, transparent 39px), radial-gradient(circle at 156px 42px, var(--surface) 26px, transparent 27px); }
.pausebox .x { position: absolute; right: 14px; top: 14px; }
.breath { display: grid; justify-items: center; gap: 14px; padding: 8px 0; }
.orb { width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff6d6, #f6d067 55%, var(--ribbon)); transform: scale(.55); transition: transform 4s ease-in-out; }
.orb.in { transform: scale(1); transition-duration: 4s; }
.orb.out { transform: scale(.55); transition-duration: 6s; }
.breath p { font-family: var(--f-script); font-size: 32px; font-weight: 400; min-height: 34px; }
.ground { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ground label { display: flex; gap: 10px; align-items: center; min-height: 36px; cursor: pointer; }
.ground input { width: 20px; height: 20px; flex: none; margin: 0; accent-color: var(--coral); }
.crisis { background: var(--surface); border-radius: 20px; padding: 16px 18px; font-size: 15px; display: grid; gap: 6px; box-shadow: var(--shadow); }
.pausebox .crisis { background: var(--blush); box-shadow: none; }
.crisis ul { margin: 0; padding-left: 18px; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; z-index: 60; box-shadow: var(--shadow); }

/* footer: a parade of friends standing on one line */
footer.foot { padding-block: 0 36px; font-size: 15px; color: var(--muted); }
.foot .parade { display: block; width: 100%; height: clamp(120px, 14vw, 170px); }
.fcols { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 24px 32px; padding-block: 26px 18px; }
.fcols > div { display: grid; gap: 6px; align-content: start; justify-items: start; }
.fcols h4 { font-size: 23px; color: var(--ink); }
.fbrand { font-family: var(--f-script); font-weight: 400; font-size: 32px; line-height: 1.1; color: var(--ink); }
.foot .linkbtn { min-height: 0; padding: 0; }
@media (max-width: 860px) { .fcols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .fcols { grid-template-columns: minmax(0, 1fr); } }

/* ---------- account ---------- */
.acct { display: grid; gap: 16px; max-width: 560px; margin-inline: auto; }
.acct .seg { justify-self: start; margin-bottom: 0; }
.aform { display: grid; gap: 14px; }
.aform label { display: grid; gap: 6px; font-weight: 800; font-size: 15px; }
.aform input[type=text], .aform input[type=password] { width: 100%; border: 1.5px solid var(--line); background: var(--raised); border-radius: 14px; padding: 12px 14px; font-size: 16px; color: var(--ink); }
.aform input[type=text]:focus, .aform input[type=password]:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.aform .chk { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.aform .chk input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--coral); }
.aform .btn { justify-self: start; }
.acct details.danger { border-top: 1.5px dashed var(--line); padding-top: 14px; }
.acct details.danger summary { cursor: pointer; font-weight: 800; color: var(--coral-ink); min-height: 32px; }
.acct details.danger .aform { margin-top: 12px; }
.linkbtn.inl { min-height: 0; padding: 0; font-size: inherit; }
.navlink.acct span { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) { .navlink.acct svg { display: block; } .navlink.acct span { display: none; } .navlink.acct { min-width: 44px; justify-content: center; } }
@media (max-width: 420px) { .brand { font-size: 22px; } .top .btn.pause { padding-inline: 10px; font-size: 13.5px; } }
@media (max-width: 360px) { .navlink.homelink { display: none; } .brand { font-size: 19px; } .top .btn.pause { padding-inline: 8px; font-size: 12.5px; } }

/* ---------- motion ----------
   Slow and soft on purpose: nothing flashes, nothing loops faster than a calm breath.
   Every moving rule needs html.motion, which app.js sets from the device's reduce-motion setting
   unless the person chose otherwise with the footer switch ("Let the pictures move" / "Keep the pictures still").
   Looping scenery reads --t (set on #app each render) so a re-render picks up where the motion was. */
.tw, .drift, .float, .fly, .breathe, .rock, .sway, .swim, .hop { transform-box: fill-box; transform-origin: 50% 50%; }
.float, .breathe, .sway { transform-origin: 50% 100%; }
.closing { position: relative; }
.moves { display: grid; gap: 6px; }
.moves .row { flex-wrap: wrap; }
.shower { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 3; }
.fstar { position: absolute; top: 0; opacity: 0; }

@media screen {
  /* scenery that keeps gently moving */
  .motion .drift { animation: drift 16s ease-in-out infinite alternate; }
  .motion .float { animation: float 6.5s ease-in-out infinite; }
  .motion .fly { animation: fly 5.5s ease-in-out infinite; }
  .motion .breathe { animation: breathe 6s ease-in-out infinite; }
  .motion .rock { animation: rock 10s ease-in-out infinite; }
  .motion .sway { animation: sway 7s ease-in-out infinite; }
  .motion .swim { animation: swim 8s ease-in-out infinite; }
  .motion .tw { animation: tw 3.6s ease-in-out infinite; }
  .motion .march { animation: march 2.2s linear infinite; }
  .motion .drift, .motion .float, .motion .fly, .motion .breathe, .motion .rock, .motion .sway, .motion .swim, .motion .tw, .motion .march { animation-delay: calc(var(--o, 0s) - var(--t, 0s)); }
  /* the example page floats a little above its cloud; the hand-drawn arrows nudge toward what they point at */
  .motion .hero-pic .frame { animation: bob 7s ease-in-out infinite; animation-delay: calc(-1 * var(--t, 0s)); }
  .motion .hero-pic .cap .curl, .motion .hero-act .hand .curl { animation: nudge 3.2s ease-in-out infinite; animation-delay: calc(-1 * var(--t, 0s)); }
  /* cloud edges roll slowly sideways; each layer moves a whole number of its own bumps, so the loop is seamless */
  .motion .heroband::after, .motion .skyband::after, .motion .cloudband::before, .motion .cloudband::after { animation: roll 48s linear infinite; animation-delay: calc(-1 * var(--t, 0s)); }
  /* entrances: only when a view first opens or scrolls into sight (app.js adds .rv and then .in) */
  .motion .rv:not(.in) { opacity: 0; }
  .motion .rv.in { animation: rise .8s cubic-bezier(.2, .75, .25, 1) backwards; }
  .motion .grid > .card.rv.in { animation-name: drop; }
  .motion .write { animation: write 1.9s cubic-bezier(.45, 0, .3, 1) backwards; }
  .motion .starpop { animation: starpop .9s cubic-bezier(.3, 1.4, .5, 1) backwards; }
  .motion .path li.rv.in .badge { animation: pop .7s cubic-bezier(.3, 1.5, .5, 1) backwards; animation-delay: inherit; }
  .motion .grow .dumb { animation: rise .7s cubic-bezier(.2, .75, .25, 1) backwards; }
  .motion .grow > path { animation: fadein 1.2s ease .3s backwards; }
  .motion .rv:not(.in) .grow .dumb, .motion .rv:not(.in) .grow > path { animation-play-state: paused; }
  /* a new sticker or note lands on the page with a small bounce */
  .motion .el.pop { animation: pop .45s cubic-bezier(.3, 1.5, .5, 1); }
  /* stickers on a page move in their own way (app.js sets mo-* on each sticker; still ones get no motion) */
  .motion .mo-float > img { animation: float 6.5s ease-in-out infinite; }
  .motion .mo-fly > img { animation: fly 5.5s ease-in-out infinite; }
  .motion .mo-sway > img { animation: sway 5.5s ease-in-out infinite; transform-origin: 50% 88%; }
  .motion .mo-wiggle > img { animation: wiggle 4.6s ease-in-out infinite; }
  .motion .mo-twinkle > img { animation: glint 3.4s ease-in-out infinite; }
  .motion .mo-beat > img { animation: beat 2.6s ease-in-out infinite; }
  .motion .mo-spin > img { animation: spin 28s linear infinite; }
  .motion .mo-breathe > img { animation: breathe 6s ease-in-out infinite; transform-origin: 50% 88%; }
  .motion .mo-flicker > img { animation: flicker 2.8s ease-in-out infinite; transform-origin: 50% 88%; }
  .motion .el[class*="mo-"] > img { animation-delay: calc(var(--o, 0s) - var(--t, 0s)); }
  /* stars drift down once when a page is kept */
  .motion .fstar { animation: fall var(--du, 3s) cubic-bezier(.3, .2, .5, 1) var(--d, 0s) forwards; }
  /* small touches */
  .motion .btn { transition: background-color .2s ease, scale .12s ease; }
  .motion .btn:active:not(:disabled) { scale: .96; }
  .motion .linkbtn { transition: text-underline-offset .2s ease, color .2s ease; }
  .motion .linkbtn:hover { text-underline-offset: 7px; }
  .motion .path li:hover .hop, .motion .brand:hover svg { animation: hop .7s ease; }
  .motion .stk button img { transition: scale .2s ease, rotate .2s ease; }
  .motion .stk button:hover img { scale: 1.1; rotate: -5deg; }
  .motion .card::before { transition: rotate .3s ease; }
  .motion .card:hover::before { rotate: 4deg; }
  .motion .toast:not([hidden]) { animation: toastin .4s cubic-bezier(.2, .8, .2, 1); }
  .motion .overlay:not([hidden]) { animation: fadein .3s ease; }
  .motion .overlay:not([hidden]) .pausebox { animation: rise .5s cubic-bezier(.2, .75, .25, 1); }
}
@keyframes drift { from { translate: -12px 0; } to { translate: 14px 0; } }
@keyframes float { 0%, 100% { translate: 0 0; rotate: -2deg; } 50% { translate: 0 -9px; rotate: 2.5deg; } }
@keyframes fly { 0%, 100% { translate: 0 0; rotate: 0deg; } 30% { translate: 7px -8px; rotate: -5deg; } 65% { translate: -4px 3px; rotate: 2deg; } }
@keyframes breathe { 0%, 100% { scale: 1 1; } 45% { scale: 1.012 1.035; } }
@keyframes rock { 0%, 100% { rotate: -7deg; } 50% { rotate: 7deg; } }
@keyframes sway { 0%, 100% { rotate: -3deg; } 50% { rotate: 3deg; } }
@keyframes swim { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -6px; rotate: -2.5deg; } }
@keyframes tw { 0%, 100% { opacity: 1; scale: 1; } 50% { opacity: .3; scale: .65; } }
@keyframes march { to { stroke-dashoffset: -14; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@keyframes nudge { 0%, 70%, 100% { translate: 0 0; } 82% { translate: 4px -3px; } }
@keyframes roll { from { background-position: 0 100%, 31px 100%, 12px 100%; } to { background-position: -84px 100%, -85px 100%, 123px 100%; } }
@keyframes rise { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
@keyframes drop { from { opacity: 0; translate: 0 -18px; rotate: -3deg; } to { opacity: 1; translate: 0 0; rotate: 0deg; } }
@keyframes write { from { clip-path: inset(-30% 100% -30% -10%); } to { clip-path: inset(-30% -10% -30% -10%); } }
@keyframes starpop { from { scale: .2; rotate: -120deg; } to { scale: 1; rotate: 0deg; } }
@keyframes pop { 0% { scale: .3; opacity: 0; } 60% { scale: 1.08; opacity: 1; } 100% { scale: 1; } }
@keyframes fadein { from { opacity: 0; } }
@keyframes fall { 0% { opacity: 0; translate: 0 -20px; rotate: 0deg; } 12% { opacity: 1; } 75% { opacity: .9; } 100% { opacity: 0; translate: var(--dx, 0) 460px; rotate: var(--r, 180deg); } }
@keyframes hop { 0%, 100% { translate: 0 0; rotate: 0deg; } 35% { translate: 0 -8px; rotate: -6deg; } 70% { translate: 0 1px; rotate: 3deg; } }
@keyframes wiggle { 0%, 100% { rotate: 0deg; } 25% { rotate: -3.5deg; } 75% { rotate: 3.5deg; } }
@keyframes glint { 0%, 100% { scale: 1; opacity: 1; } 50% { scale: 1.1; opacity: .72; } }
@keyframes beat { 0%, 45%, 100% { scale: 1; } 12% { scale: 1.09; } 24% { scale: .98; } 34% { scale: 1.06; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes flicker { 0%, 100% { scale: 1 1; opacity: 1; } 30% { scale: .98 1.03; } 55% { scale: 1.01 .97; opacity: .88; } 80% { scale: .99 1.02; } }
@keyframes toastin { from { opacity: 0; translate: 0 18px; } }
@media (prefers-reduced-motion: reduce) {
  html:not(.motion) *, html:not(.motion) *::before, html:not(.motion) *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  html:not(.motion) .orb, html:not(.motion) .orb.in, html:not(.motion) .orb.out { transform: scale(.8); }
}
label > input[type="checkbox"] { flex: none; }
