/* Too Much Free Time — site.css
   The descent: overlook → canopy → trunks → clearing, and the sleeping-bag entries.
   Served as a file (never inline) so the Content-Security-Policy can forbid inline styles. */

/* =====================================================================
   Too Much Free Time — "descent" prototype, v2
   Three scenes, blended by scroll:
     1. the overlook: moon, mist, ridges of pines below
     2. the canopy: you drop into the treetops and it goes dark
     3. under the trees: trunks only, warming toward the clearing and fire
   No libraries, no external requests.
   ===================================================================== */
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url(/fonts/nunito.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-style: italic; font-weight: 200 1000; font-display: swap;
  src: url(/fonts/nunito-italic.woff2) format("woff2"); }

:root {
  --fire: 0;                    /* 0 → 1 as you near the clearing (JS) */
  --glow: 255 138 61;
  --moon: 205 215 240;
  --ember: #ff7a2e;
  --flame: #ffc46b;
  --ink: #f1e6d2;
  --ink-soft: #c9b9a0;
  --ink-faint: #8a7d6b;

  --shell: #4f6f8a;
  --flannel: #ece5d8;
  --flannel-ink: #2a2a31;
  --tag: #f07a1a;

  --font-verse: "Nunito", ui-rounded, system-ui, sans-serif;
  --font-prose: "Nunito", ui-rounded, system-ui, sans-serif;
  --font-ui: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --measure: 38rem;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: #030404; overscroll-behavior: none; }   /* no rubber-band bounce showing the layers behind */
body {
  margin: 0; color: var(--ink);
  font: 1.1rem/1.7 var(--font-prose);
  overflow-x: hidden; isolation: isolate;
  -webkit-font-smoothing: antialiased;
}

/* ================= Scene 1: the overlook ================= */
.vista { position: fixed; inset: 0; z-index: -10; pointer-events: none; overflow: hidden;
  background: linear-gradient(#020309 0%, #060b18 35%, #0f1828 58%, #141d2c 70%, #0a0f17 100%); }
.vista-stars { position: absolute; inset: 0 0 45% 0;
  background-image:
    radial-gradient(1.5px 1.5px at 8% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 17% 31%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 24% 7%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 33% 22%, #dfe7ff 50%, transparent 51%),
    radial-gradient(2px 2px at 41% 9%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 47% 36%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 61% 4%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 86% 34%, #dfe7ff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 93% 11%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 4% 44%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 97% 46%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 29% 47%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 12% 2%, #fff 50%, transparent 51%);
  animation: twinkle 7s ease-in-out infinite alternate; will-change: opacity; }

/* the moon, its halo, and the light it throws on the mist */
.moon { --k: .1; position: absolute; left: 84%; top: 11vh; width: 64px; height: 64px; translate: -50% -50%; will-change: transform; }
.moon::before { /* halo */
  content: ""; position: absolute; inset: -260px; border-radius: 50%;
  background: radial-gradient(circle, rgb(var(--moon) / 0.22) 0%, rgb(var(--moon) / 0.08) 22%, transparent 60%);
}
.moon::after { /* disc with soft maria */
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 34% 38%, rgb(150 155 170 / 0.35) 0 13%, transparent 15%),
    radial-gradient(circle at 60% 62%, rgb(150 155 170 / 0.3) 0 10%, transparent 12%),
    radial-gradient(circle at 63% 30%, rgb(150 155 170 / 0.22) 0 7%, transparent 9%),
    radial-gradient(circle at 40% 40%, #fbf8ee, #dedbd0 70%, #c9c6bd);
  box-shadow: 0 0 18px 4px rgb(var(--moon) / 0.55), 0 0 60px 18px rgb(var(--moon) / 0.18);
}
/* tonight's phase: forest.js draws the unlit part over the disc and sets --lit (0 new … 1 full) */
.moon .phase { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; overflow: visible; }
.moon .phase path { fill: rgb(12 16 28 / 0.93); }
.moon::before { opacity: calc(0.12 + 0.88 * var(--lit, 1)); }
.moon::after { box-shadow: 0 0 18px 4px rgb(var(--moon) / calc(0.55 * var(--lit, 1))), 0 0 60px 18px rgb(var(--moon) / calc(0.18 * var(--lit, 1))); }

/* a storm far off behind the ridges: dark until lightning lights it (forest.js) */
.storm { --k: .05; position: absolute; left: var(--sx, 30%); top: 30vh; width: min(70vw, 560px); height: 30vh;
  translate: -50% 0; opacity: 0; will-change: transform, opacity; }
.storm::before { content: ""; position: absolute; inset: -40% -30% -10%;
  background: radial-gradient(ellipse 50% 45% at 50% 70%, rgb(190 200 255 / 0.45), rgb(150 165 220 / 0.12) 55%, transparent 75%); }
.storm svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.storm .puff-in  { stop-color: rgb(170 182 225 / 0.5); }
.storm .puff-mid { stop-color: rgb(150 162 210 / 0.22); }
.storm .puff-out { stop-color: rgb(150 162 210 / 0); }
.storm .bolt { fill: none; stroke-linejoin: round; stroke-linecap: round; opacity: 0; }
.storm .bolt.core { stroke: #f4f6ff; stroke-width: 1.4; }
.storm .bolt.halo { stroke: rgb(190 205 255 / 0.35); stroke-width: 6; }

.ridge-band { position: absolute; left: 0; width: 100%; will-change: transform; }
.ridge-band svg { display: block; width: 100%; height: 100%; }
.ridge-fill { position: absolute; left: 0; width: 100%; will-change: transform; }

/* ================= Scene 2–3: under the trees ================= */
.under { position: fixed; inset: 0; z-index: -9; pointer-events: none; opacity: 0;
  background: #040605; will-change: opacity; }
.trunks { position: fixed; left: 0; top: 0; width: 100%; pointer-events: none; opacity: 0; will-change: transform, opacity; }
.trunks svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.trunks .warm { opacity: 0; will-change: opacity; }   /* firelit copy: JS fades it in */
/* the hand-drawn trunk and branch (brown #46341c with #282010 bark), darkened for night, per depth */
.trunks.far  { z-index: -8; --trunk: #11140f; --shade: #0a0c08; --lit-k: 0.12; }
.trunks.mid  { z-index: -6; --trunk: #1a140d; --shade: #0d0a06; --lit-k: 0.32; }
.trunks.near { z-index: 20; --trunk: #050404; --shade: #020202; --lit-k: 0.2; }
.trunks .t { fill: var(--trunk); }
.trunks pattern path { fill: var(--shade); }
.trunks .b0 { fill: var(--trunk); }
.trunks .b1 { fill: color-mix(in srgb, var(--trunk), black 22%); }
.trunks .b2 { fill: var(--shade); }
.trunks .b3 { fill: color-mix(in srgb, var(--trunk), white 8%); }
.trunks .lit-stop { stop-color: rgb(var(--glow) / calc(var(--lit-k) * var(--firelight, 1))); }
.trunks .lit-mid  { stop-color: rgb(var(--glow) / calc(var(--lit-k) * var(--firelight, 1) * 0.35)); }
/* measures the tallest the viewport gets, so a phone's toolbar hiding doesn't redraw the forest */
.vh-probe { position: fixed; top: 0; left: 0; width: 0; height: 100vh; height: 100lvh; visibility: hidden; pointer-events: none; }
.trunks .lit-none { stop-color: rgb(var(--glow) / 0); }
/* haze between the far and middle trees */
.haze { position: fixed; inset: 0; z-index: -7; pointer-events: none; opacity: 0;
  background: linear-gradient(to bottom, rgb(20 32 28 / 0.25), rgb(20 30 26 / 0.05) 60%, rgb(var(--glow) / 0.06)); will-change: opacity; }

/* firelight bloom from below */
.glow { position: fixed; left: 50%; bottom: -35vh; z-index: -5; pointer-events: none;
  width: 170vmax; height: 100vh; translate: -50% 0;
  opacity: 0; will-change: opacity; }
.glow::before { content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 28% 45% at 50% 70%, rgb(var(--glow) / 0.6), transparent 70%),
    radial-gradient(ellipse 60% 70% at 50% 75%, rgb(var(--glow) / 0.22), transparent 75%); animation: flicker 3s steps(1, end) infinite; will-change: opacity; }

.sparks { position: fixed; left: 50%; bottom: 0; width: 0; height: 0; z-index: -4; pointer-events: none;
  opacity: 0; will-change: opacity; }
.sparks i { position: absolute; bottom: 0; left: var(--x, 0px); width: 3px; height: 3px; border-radius: 50%;
  background: var(--flame); box-shadow: 0 0 6px 2px rgb(var(--glow) / 0.8);
  animation: rise var(--d, 4s) linear var(--delay, 0s) infinite; }

/* ================= Masthead & the way down ================= */
.masthead { min-height: 100vh; padding: 14vh 1.5rem 0; text-align: center; }
.site-title { margin: 0; font: 700 clamp(2.4rem, 8vw, 4.6rem)/1 var(--font-verse);
  color: #f3ead8;
  text-shadow: 0 0 18px rgb(var(--moon) / 0.35), 0 2px 6px rgb(0 0 0 / 0.6); }
.site-sub { margin: 1rem auto 0; max-width: 38rem; font: italic 0.98rem/1.6 var(--font-verse); color: #b9bfcc;
  text-shadow: 0 1px 4px rgb(0 0 0 / 0.8); }
.site-sub b { font-style: normal; color: #e9e6df; }
.into-dark { height: 95vh; }

/* ================= Sleeping bags (from v1) ================= */
/* ---------- Trail of entries ---------- */
.trail { width: min(100% - 2rem, var(--measure)); margin: 0 auto; }
.bag { margin: 0 0 30vh;
  --shell-light: color-mix(in oklab, var(--shell), white 22%);
  --shell-dark: color-mix(in oklab, var(--shell), black 38%); }
/* each story's bag colour, assigned in posting order by scripts/build.mjs */
.bag[data-color="slate"]   { --shell: #4f6f8a; }
.bag[data-color="pine"]    { --shell: #4a6e55; }
.bag[data-color="rust"]    { --shell: #a0563a; }
.bag[data-color="plum"]    { --shell: #6c5283; }
.bag[data-color="mustard"] { --shell: #a8853a; }
.bag[data-color="teal"]    { --shell: #357579; }
.bag[data-color="berry"]   { --shell: #8a3f55; }
.bag[data-color="olive"]   { --shell: #6f7240; }
.bag[data-color="navy"]    { --shell: #34507e; }
.bag[data-color="clay"]    { --shell: #8c6650; }

/* header above the roll */
.bag-head { text-align: center; margin-bottom: 1rem; }
.bag-date { font: 600 0.7rem var(--font-ui); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); }
.bag-title { margin: 0.3rem 0 0; font: 600 clamp(1.4rem, 4vw, 1.9rem)/1.2 var(--font-verse); }
.bag-title button {
  all: unset; cursor: pointer; color: var(--ink);
  text-shadow: 0 2px 4px rgb(0 0 0 / 0.6);
  border-radius: 4px;
}
.bag-title button:hover { color: var(--flame); text-shadow: 0 0 16px rgb(var(--glow) / 0.6); }
.bag-title button:focus-visible { outline: 2px dashed var(--flame); outline-offset: 6px; }

/* the part that unrolls */
.bag-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 1.2s cubic-bezier(.55,.05,.25,1);
}
.bag[data-open] .bag-body { grid-template-rows: 1fr; }
.bag-clip { min-height: 0; overflow: hidden; }

/* outer shell: one solid colour, lit on the left and shaded on the right */
.shell {
  position: relative;
  padding: 22px 34px 34px 22px;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--shell-light), var(--shell) 14%, var(--shell) 78%, var(--shell-dark));
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.7), 0 0 60px -10px rgb(var(--glow) / 0.1);
}
/* zipper down the right edge */
.shell::after {
  content: ""; position: absolute; top: 14px; bottom: 14px; right: 13px; width: 5px;
  border-radius: 3px; background: color-mix(in oklab, var(--shell), black 62%); box-shadow: inset 1px 0 0 rgb(255 255 255 / 0.18);
}
/* the orange tag, like the real thing */
.tag {
  position: absolute; right: 30px; bottom: 10px;
  padding: 2px 8px 2px 10px;
  font: 700 0.62rem var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff4e6; background: var(--tag);
  border-radius: 2px 6px 6px 2px;
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.4);
}

/* flannel lining: where the words live */
.flannel {
  position: relative;
  padding: 2rem 2rem 2.4rem;
  color: var(--flannel-ink);
  border-radius: 8px;
  background: var(--flannel);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08), inset 10px 0 16px -12px rgb(255 255 255 / 0.9),
              inset -14px 0 22px -14px rgb(0 0 0 / 0.3), inset 0 10px 18px -12px rgb(0 0 0 / 0.3);
  opacity: 0; translate: 0 -24px;
  transition: opacity .6s .35s, translate .9s .2s cubic-bezier(.2,.7,.2,1);
}
.bag[data-open] .flannel { opacity: 1; translate: 0 0; }

/* typography inside the flannel */
.origin {
  margin: 0 0 1.8rem; padding: 0.9rem 1.1rem;
  font-size: 0.92rem; color: #4a463f;
  background: rgb(255 252 245 / 0.7);
  border-left: 3px solid var(--tag);
  border-radius: 0 4px 4px 0;
}
.origin-label { display: block; font: 700 0.65rem var(--font-ui); letter-spacing: 0.16em; text-transform: uppercase; color: #b4520f; margin-bottom: .3rem; }
.origin p { margin: 0 0 0.5em; }
.origin p:last-child { margin: 0; }
.flannel > * + * { margin-top: 1.4rem; }
.stanza { font: 1.12rem/1.65 var(--font-verse); }
.stanza-label { display: block; font: 700 0.75rem var(--font-ui); letter-spacing: 0.2em; color: #b4520f; margin-bottom: .2rem; }
.line { display: block; padding-left: calc(var(--indent, 0) * 1.5em + 1.5em); text-indent: -1.5em; }
.i1{--indent:1}.i2{--indent:2}.i3{--indent:3}.i4{--indent:4}.i5{--indent:5}.i6{--indent:6}
.i7{--indent:7}.i8{--indent:8}.i9{--indent:9}.i10{--indent:10}.i11{--indent:11}.i12{--indent:12}
.line[data-align="center"] { text-align: center; padding-left: 0; text-indent: 0; }
.line[data-align="end"]    { text-align: end;    padding-left: 0; text-indent: 0; }
.paragraph { margin: 0; }
.epigraph { margin: 0 0 0 auto; max-width: 22rem; text-align: right; font: italic .95rem/1.5 var(--font-verse); color: #5a554c; }
.epigraph footer { font-style: normal; font-size: .82rem; }
.epigraph footer::before { content: "— "; }
.aside { margin: 0; }
.aside[data-voice="outside"] { font: 700 1.25rem/1.35 var(--font-verse); color: #b4440f; }
.aside[data-voice="outside"]::before { content: "out loud"; display: block; font: 700 .6rem var(--font-ui); letter-spacing: .18em; text-transform: uppercase; color: #c2410c; }
.aside[data-voice="inside"] { font: italic .85rem/1.5 var(--font-prose); color: #7a7368; padding-left: .9rem; border-left: 2px dotted #b9ad99; }
.brk { height: 6px; border: 0; margin-block: 2rem; background:
  radial-gradient(circle 3px at calc(50% - 16px) 50%, #b8380f 90%, transparent),
  radial-gradient(circle 3px at 50% 50%, var(--ember) 90%, transparent),
  radial-gradient(circle 3px at calc(50% + 16px) 50%, #b8380f 90%, transparent); }
code { font: .86em var(--font-mono); padding: .05em .3em; border-radius: 3px; background: rgb(0 0 0 / .07); }
s { text-decoration-color: #c2410c; text-decoration-thickness: 2px; }

/* ---------- The roll ---------- */
.roll {
  --h: 92px;
  position: relative;
  height: var(--h);
  border-radius: calc(var(--h) / 2);
  cursor: pointer;
  background: linear-gradient(180deg, var(--shell-light), var(--shell) 35%, var(--shell) 60%, var(--shell-dark));
  box-shadow: 0 -6px 10px -6px rgb(0 0 0 / 0.35), 0 24px 30px -18px rgb(0 0 0 / 0.8), 0 0 50px -12px rgb(var(--glow) / 0.12);
  transition: height 1.2s cubic-bezier(.55,.05,.25,1), opacity .5s .7s, filter .3s;
}
.roll:hover { filter: brightness(1.12); }
/* open: the bag is fully unrolled, so the roll is used up */
.bag[data-open] .roll { --h: 0px; opacity: 0; pointer-events: none; transition: height 1.2s cubic-bezier(.55,.05,.25,1), opacity .4s; }

/* compression straps */
.strap {
  position: absolute; top: -3px; bottom: -3px; width: 14px;
  background: linear-gradient(90deg, #111 0%, #2a2a2a 40%, #151515 100%);
  border-radius: 3px;
  transition: opacity .5s, translate .8s;
}
.strap.a { left: 22%; } .strap.b { left: 74%; }
.strap::after { /* buckle */
  content: ""; position: absolute; left: -3px; right: -3px; top: 38%; height: 14px;
  background: #3a3a3a; border-radius: 2px; box-shadow: inset 0 0 0 2px #555;
}
.bag[data-open] .strap { opacity: 0; translate: 0 30px; }



/* ---------- More block types inside the flannel (one rule per schema block) ---------- */
.flannel h3, .flannel h4, .flannel h5 { margin-bottom: 0; font-family: var(--font-verse); color: #7a3410; line-height: 1.25; }
.flannel a { color: #9a3d0c; text-underline-offset: .2em; }
.flannel a:hover { color: #c2410c; }
.content-notes { margin: 0 0 1.4rem; padding: .45rem .8rem; font: .8rem var(--font-ui); color: #5a4a3a;
  background: rgb(240 122 26 / .1); border: 1px solid rgb(240 122 26 / .4); border-radius: 4px; }
.hero { margin: 0 0 1.6rem; }
.hero img, .figure img, .gallery img { display: block; width: 100%; height: auto; border-radius: 4px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / .12), 0 10px 24px -14px rgb(0 0 0 / .6); }
.figure { margin: 0; }
.figure[data-size="wide"]       { margin-inline: -1rem; }
.figure[data-size="full-bleed"] { margin-inline: -2rem; }
.figure[data-size="full-bleed"] img { border-radius: 0; }
figcaption { margin-top: .5rem; font: italic .85rem/1.4 var(--font-verse); color: #6a6358; text-align: center; }
.credit { font: .72rem var(--font-ui); font-style: normal; }
.gallery { margin: 0; }
.gallery-grid { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.pre { margin: 0; padding: .9rem 1rem; overflow-x: auto; font: .82rem/1.4 var(--font-mono);
  color: #e8dcc4; background: #1e1a17; border-radius: 4px; }
.sc { font-variant: small-caps; letter-spacing: .03em; }
.redacted { background: #1a1512; color: transparent; border-radius: 2px; padding: 0 .15em; user-select: none; }
.fn-ref a { font: 700 .7em var(--font-ui); text-decoration: none; vertical-align: super; color: #b4520f; }
.footnotes { margin-top: 2rem; padding-top: .8rem; border-top: 1px dashed #b9ad99; font-size: .82rem; color: #5a554c; }
.footnotes ol { margin: 0; padding-left: 1.2rem; }
.entry-foot { margin-top: 1.8rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; font: .75rem var(--font-ui); }
.entry-foot .tags { display: contents; }
.tag-pill { padding: .1rem .55rem; border-radius: 999px; color: #4a463f;
  background: rgb(255 252 245 / .7); border: 1px solid #c9bda9; }
.series { font: 600 .75rem var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: #8a5a2c; margin: 0 0 1rem; }
.reading { width: 100%; margin: 0 0 1.4rem; }
.origin-facts { display: flex; flex-wrap: wrap; gap: .2rem 1rem; margin: .6rem 0 0; padding: 0; list-style: none; font: .75rem var(--font-ui); color: #7a7368; }
.origin-facts li::before { content: "◆ "; color: #c2410c; }
.aside .speaker { display: block; font: 700 .6rem var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: #8a7d6b; }
.paragraph.drop-cap::first-letter { float: left; font: 700 3.4em/.85 var(--font-verse); padding: .06em .1em 0 0; color: #b4440f; }
.brk[data-style="space"] { background: none; height: 1.5rem; }
.brk[data-style="rule"]  { background: linear-gradient(to right, transparent, #b9ad99, transparent); height: 1px; }
.brk[data-style="asterism"] { background: none; height: auto; text-align: center; color: #8a7d6b; overflow: visible; }
.brk[data-style="asterism"]::before { content: "⁂"; }
.site-title a { color: inherit; text-decoration: none; }
.camp-note a { color: var(--ink-faint); }
.camp-note a:hover { color: var(--flame); }
.entry-foot .permalink { margin-left: auto; color: #8a5a2c; }
.revisions { font: .75rem var(--font-ui); color: #6a6358; margin-top: 1rem; }
.revisions summary { cursor: pointer; }

/* ---------- Garden: stage, earlier versions ---------- */
.stage { padding: .05rem .5rem; border: 1px solid currentColor; border-radius: 999px; }
.stage[data-stage="seedling"]  { color: #a7c47f; }
.stage[data-stage="growing"]   { color: #d0b866; }
.stage[data-stage="evergreen"] { color: #74b394; }
.version-note { margin: .45rem 0 0; font: italic .85rem/1.4 var(--font-ui); color: var(--ink-soft); }
.version-note a { color: var(--flame); }
.versions { clear: both; margin-top: 1rem; font: .78rem var(--font-ui); color: #6a6358; }
.versions summary { cursor: pointer; }
.versions ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.versions a { color: #9a3d0c; }

/* ---------- Pixel art (art.js scales it by whole numbers) ---------- */
.figure.px img, .gallery .px-img, .hero .px-img { image-rendering: pixelated; border-radius: 0; box-shadow: none; }
.px-img { display: block; height: auto; max-width: 100%; margin-inline: auto; image-rendering: pixelated; }
.px-frame { all: unset; position: relative; display: block; width: fit-content; max-width: 100%; margin-inline: auto; cursor: pointer; }
.px-frame:focus-visible { outline: 2px dashed var(--tag); outline-offset: 4px; }
.px-label { position: absolute; left: 50%; bottom: .5rem; translate: -50% 0; padding: .15rem .6rem; pointer-events: none; white-space: nowrap;
  font: 600 .6rem var(--font-ui); letter-spacing: .16em; text-transform: uppercase; color: rgb(255 255 255 / .8);
  background: rgb(0 0 0 / .32); border-radius: 999px; transition: opacity .3s, background .2s; }
.px-frame:hover .px-label { background: rgb(0 0 0 / .5); }
.px-frame[aria-pressed="true"] .px-label { opacity: 0; }
/* art beside the words: the bag widens to make room, on screens wide enough for it */
.flannel::after { content: ""; display: block; clear: both; }
.entry-foot, .footnotes { clear: both; }
@media (min-width: 760px) {
  .bag[data-wide] { width: min(100vw - 3rem, 58rem); margin-left: 50%; translate: -50% 0; }
  .flannel .figure[data-size="side"] { float: right; width: min(44%, 24rem); margin: .2rem 0 1rem 1.8rem; }
}
.empty-trail { text-align: center; font: italic 1rem var(--font-verse); color: var(--ink-soft); margin-bottom: 30vh; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 50; padding: .4rem .8rem; background: #000; color: var(--flame); border-radius: 4px; }
.home-link { font: 600 .75rem var(--font-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-faint); text-decoration: none; }
.home-link:hover { color: var(--flame); }

/* ================= The clearing ================= */
.camp { position: relative; min-height: 100vh; display: grid; place-items: end center; padding-bottom: 9vh; text-align: center; }
.floor { position: absolute; left: 50%; bottom: 0; width: 100vw; height: 46vh; translate: -50% 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 34% 38% at 50% 62%, rgb(110 62 28 / 0.75), rgb(60 34 16 / 0.5) 45%, transparent 75%),
    linear-gradient(to bottom, transparent 0%, #0a0806 30%, #070504 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%);
          mask-image: linear-gradient(to bottom, transparent, #000 22%); }
.ferns { position: absolute; left: 0; right: 0; bottom: 0; height: 30vh; pointer-events: none; z-index: 1; }
.ferns svg { width: 100%; height: 100%; display: block; }
.ferns path { fill: #050605; }
.ferns .lit { fill: rgb(var(--glow) / 0.22); }
.fire { position: relative; width: 160px; height: 150px; margin: 0 auto; }
/* fire.js draws the fire on a canvas; the CSS flames below are the fallback with scripts off */
.fire canvas { position: absolute; left: 50%; bottom: -24px; width: 340px; height: 460px; translate: -50% 0;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.fire.live > span { display: none; }
.flame { position: absolute; left: 50%; bottom: 34px; width: var(--w); height: var(--fh); translate: -50% 0;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(ellipse at 50% 85%, #fff2c2 0%, var(--flame) 30%, var(--ember) 60%, rgb(184 56 15 / 0) 75%);
  filter: blur(1px); transform-origin: 50% 100%; mix-blend-mode: screen;
  animation: lick var(--t, 1.1s) ease-in-out infinite alternate; }
.flame.f1 { --w: 90px; --fh: 120px; --t: 1.3s; }
.flame.f2 { --w: 60px; --fh: 95px;  --t: .9s; }
.flame.f3 { --w: 34px; --fh: 70px;  --t: .7s; }
.log { position: absolute; bottom: 22px; left: 50%; width: 130px; height: 22px; translate: -50% 0; border-radius: 11px;
  background: linear-gradient(#5a3a22, #2d1c10); box-shadow: inset 0 3px 0 rgb(255 160 90 / 0.25); }
.log.a { rotate: 14deg; } .log.b { rotate: -14deg; }
.stones { position: absolute; left: 50%; bottom: 10px; width: 170px; height: 26px; translate: -50% 0;
  background:
    radial-gradient(ellipse 11px 8px at 8% 60%, #2a2420 90%, transparent),
    radial-gradient(ellipse 13px 9px at 24% 75%, #332b25 90%, transparent),
    radial-gradient(ellipse 12px 8px at 42% 85%, #2a2420 90%, transparent),
    radial-gradient(ellipse 13px 9px at 60% 85%, #3a3029 90%, transparent),
    radial-gradient(ellipse 12px 8px at 77% 75%, #2a2420 90%, transparent),
    radial-gradient(ellipse 11px 8px at 92% 60%, #332b25 90%, transparent); }
.camp-note { position: relative; z-index: 2; margin: 1.4rem 0 0; font: italic .95rem var(--font-verse); color: var(--ink-soft); }
.camp-note .camp-title { display: block; margin-bottom: .5rem; font: 800 clamp(1.5rem, 4.5vw, 2.2rem)/1.1 var(--font-verse); font-style: normal;
  color: #f3ead8; text-decoration: none; text-shadow: 0 0 18px rgb(var(--glow) / 0.45), 0 2px 6px rgb(0 0 0 / 0.6); }
.camp-note .camp-title:hover { color: var(--flame); }
.camp-note small { display: block; margin-top: .4rem; font: .72rem var(--font-ui); letter-spacing: .1em; color: var(--ink-faint); font-style: normal; }

/* ================= Tweak panel, behind the moon (forest.js) ================= */
.moon-spot { position: absolute; left: 84%; top: 11vh; z-index: 30; width: 96px; height: 96px; translate: -50% -50%;
  border: 0; border-radius: 50%; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.moon-spot:focus-visible { outline: 2px dashed var(--flame); }
.tweaks { position: fixed; right: 12px; top: 12px; z-index: 60; width: min(340px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  overflow-y: auto; padding: 14px 16px 16px; border-radius: 12px; color: var(--ink); font: .85rem/1.4 var(--font-ui);
  background: rgb(14 16 22 / .93); box-shadow: 0 12px 40px rgb(0 0 0 / .6), inset 0 0 0 1px rgb(255 255 255 / .08); }
.tweaks[hidden] { display: none; }
@media (max-width: 640px) {   /* a short sheet at the bottom, so the forest stays visible while you drag */
  .tweaks { top: auto; bottom: 8px; right: 8px; width: calc(100vw - 16px); max-height: 42dvh; padding: 10px 14px 12px; }
  .tweak { margin-bottom: .45rem; }
}
.tweaks-head { display: flex; justify-content: space-between; align-items: center; }
.tweaks-close { all: unset; cursor: pointer; padding: 0 4px; font-size: 1.4rem; line-height: 1; color: var(--ink-soft); }
.tweaks-note { margin: .2rem 0 .8rem; font-size: .75rem; color: var(--ink-faint); }
.tweak { display: block; margin-bottom: .7rem; }
.tweak-label { display: flex; justify-content: space-between; gap: 1rem; color: var(--ink-soft); }
.tweak output { color: var(--flame); font-variant-numeric: tabular-nums; }
.tweak input[type="range"] { width: 100%; accent-color: var(--ember); }
.tweak select { width: 100%; margin-top: .3rem; padding: .3rem; font: inherit; color: var(--ink);
  background: #1c1f27; border: 1px solid #3a3f4b; border-radius: 6px; }
.tweaks-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .4rem; }
.tweaks-actions button { padding: .35rem .8rem; font: inherit; color: var(--ink); cursor: pointer;
  background: #22252e; border: 1px solid #4a4f5c; border-radius: 6px; }
.tweaks-actions button:hover { border-color: var(--ember); }
.tweaks-status { font-size: .75rem; color: var(--ink-faint); }
.tweaks-code { display: block; margin-top: .6rem; padding: .4rem .5rem; font: .72rem/1.4 var(--font-mono); color: var(--ink-soft);
  background: rgb(0 0 0 / .35); border-radius: 4px; word-break: break-all; user-select: all; }

/* ================= Scroll-driven motion =================
   Where the browser supports scroll timelines (Chrome, Edge, Safari 26+),
   the scroll itself drives every layer on the GPU, in the same frame as the
   page moves: no JavaScript per frame, no lag, no tearing.
   Elsewhere, html lacks .sda and the script does the same job. */
.sda .ridge-band, .sda .ridge-fill, .sda .moon, .sda .storm {
  animation: sink linear both; animation-timeline: scroll(root); animation-range: 0 200vh; }
@keyframes sink { to { transform: translate3d(0, calc(var(--k) * -200vh), 0); } }
/* the far ridges fade, farthest first, as you drop in among the near trees (ranges set by forest.js) */
.sda .ridge-band.fades, .sda .ridge-fill.fades {
  animation: sink linear both, fade-out linear both;
  animation-timeline: scroll(root), scroll(root);
  animation-range: 0 200vh, var(--f0) var(--f1); }
.sda .vista { animation: fade-out linear both; animation-timeline: scroll(root); animation-range: 105vh 140vh; }
.sda .trunks {
  animation: drift linear both, fade-in linear both;
  animation-timeline: scroll(root), scroll(root);
  animation-range: 85vh 100%, 85vh 130vh; }
@keyframes drift { to { transform: translate3d(0, calc(var(--dist) * -1), 0); } }
.sda .under { animation: fade-in linear both; animation-timeline: scroll(root); animation-range: 80vh 170vh; }
.sda .haze { animation: fade-in linear both; animation-timeline: scroll(root); animation-range: 85vh 130vh; }
.sda .trunks .warm { animation: warm-in ease-in both; animation-timeline: scroll(root); animation-range: calc(25% + 60vh) 100%; }
.sda .glow { animation: fade-in ease-in both; animation-timeline: scroll(root); animation-range: calc(25% + 60vh) 100%; }
.sda .sparks { animation: fade-in linear both; animation-timeline: scroll(root); animation-range: calc(62% + 30vh) 100%; }
@keyframes fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes warm-in  { from { opacity: 0; } to { opacity: var(--wk); } }

/* ================= Motion ================= */
@keyframes flicker { 0%{opacity:1} 13%{opacity:.86} 29%{opacity:1} 47%{opacity:.8} 61%{opacity:.95} 83%{opacity:.88} }
@keyframes lick { from { scale: 1 1; rotate: -3deg; } to { scale: .88 1.12; rotate: 4deg; } }
@keyframes rise { 0% { translate: 0 0; opacity: 1; } 100% { translate: var(--drift, 20px) -55vh; opacity: 0; } }
@keyframes twinkle { from { opacity: .7; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
@media (max-width: 640px) {
  .trunks.near { opacity: .5 !important; }
  .flannel { padding: 1.4rem 1.1rem 2rem; }
  .shell { padding: 14px 28px 30px 14px; }
}
