/* The Moon Gate Crater (/crater, src/routes/crater.js) and the rich-player Home card (src/services/rich-nudge.js), economy round
   2026-11-14; the fund page is layout A3, "plaques under the painting" (Crater round 2026-11-15). Prefixes: lf- land fund,
   bk1- Bogsworth's leather-bound Book of Passage, rn- rich nudge. Home links this sheet only while the card shows. */

:root { --lf-plaque-bg: #2a1c4c; /* the scene's near rim, so the plaques hang off the picture */ --lf-key-bg: rgb(10 4 24 / .6); }

/* ---------- hero: the lantern picture, its signposts, the plaques, then the title ---------- */
.lf-hero { padding: 0; overflow: hidden; gap: 0; grid-template-columns: minmax(0, 1fr); text-align: center; }
.lf-stage { position: relative; }
.lf-stage > svg { display: block; width: 100%; height: auto; aspect-ratio: 960 / 440; }
.lf-pins { position: absolute; inset: 0; pointer-events: none; }
.lf-pin { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -100%); pointer-events: auto; display: flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--card); border: var(--line) solid var(--ink); box-shadow: var(--shadow-sm); color: var(--ink); text-decoration: none; white-space: nowrap; }
.lf-pin:hover { box-shadow: var(--shadow-lift); }
.lf-pin:nth-child(1) { transform: translate(-30%, -100%); }
.lf-pin:nth-child(2) { transform: translate(-15%, -100%); } /* leans right, clear of a long "150,000 to go" on the first */
.lf-pin:nth-child(3) { transform: translate(-80%, -100%); }
.lf-pin .lf-num { width: 32px; height: 32px; font-size: 1rem; }
.lf-pin-t { display: grid; line-height: 1.15; text-align: left; }
.lf-pin-t b { font: 700 var(--fs-sm) var(--display); }
.lf-pin-t small { font-size: var(--fs-xs); color: var(--muted); font-weight: 700; }
.lf-key { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: var(--lf-key-bg); color: white; font: 700 var(--fs-xs) var(--body); }
.lf-key-lamp { width: 10px; height: 12px; border-radius: 4px; background: var(--sun); box-shadow: 0 0 8px var(--sun); }
/* The newest lit lantern breathes a few times, then rests (opacity only, its own layer; both reduced-motion rules stop it). */
.lf-glow { position: absolute; left: var(--x); top: var(--y); width: 8%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, var(--sun), transparent); opacity: 0; will-change: opacity; animation: lf-breathe 2.4s ease-in-out 6 alternate; }
@keyframes lf-breathe { to { opacity: .7; } }
.reduce-motion .lf-glow { animation: none; }

.lf-plaques { padding: 0 16px 16px; background: var(--lf-plaque-bg); border-top: var(--line) solid var(--ink); }
.lf-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: -4px; text-align: left; }
.lf-posts > div { display: grid; }
.lf-post { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--parchment); border: var(--line) solid var(--ink);
  border-top: 6px solid var(--bk-gilt-hi); border-radius: 0 0 var(--r-sm) var(--r-sm); box-shadow: 0 4px 0 var(--ink); scroll-margin-top: 16px; }
.lf-post-h { display: flex; align-items: center; gap: 8px; }
.lf-post-h h3 { margin: 0; flex: 1; font: 700 1.15rem var(--display); }
.lf-post .lf-num { width: 36px; height: 36px; font-size: 1rem; flex: none; }
.lf-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: var(--line) solid var(--ink); background: var(--card); font: 700 1.15rem var(--display); }
.is-open .lf-num { background: var(--lime); }
.is-building .lf-num { background: var(--sun); }
.lf-post.is-later .lf-num { background: var(--tint-2); }
.is-open .lf-state { background: var(--ok-bg); }
.is-building .lf-state { background: var(--sun-soft); }
.is-later .lf-state { background: var(--tint); }
.lf-post-what { margin: 0; font-size: var(--fs-sm); }
.lf-post-foot { display: grid; gap: 8px; margin-top: auto; }
.lf-post-foot p { margin: 0; }
.lf-post-line { font-size: var(--fs-sm); }
.lf-post-foot .stat-bar { display: block; height: 12px; }
/* Once the Humming Spot opens, its plaque holds the hollow and the sit form (humming.js humCard, bare), too much for a third of the
   row: it takes a row of its own under the other two, art beside the words, so the first two don't stretch round a hole. */
@media (min-width: 768px) {
  .lf-posts.is-all-open { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lf-posts.is-all-open > :nth-child(3) { grid-column: 1 / -1; }
}

.lf-hero .lf-hero-text { padding: 20px 24px; }
.lf-hero-text h1 { margin-top: 0; }
.lf-hero-text .lede { margin-inline: auto; }
.lf-tally { margin: 8px 0 0; font-size: var(--fs-sm); }

/* ---------- Give and the book, side by side at equal height ---------- */
.lf-pair { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); }
.lf-give-card { display: flex; flex-direction: column; gap: 12px; }
.lf-give-card h2 { margin: 0; }
.lf-give-card .speech { max-width: none; }
.lf-give { display: grid; gap: 12px; }
.lf-give p, .lf-give-card > p { margin: 0; }
.lf-fs { border: 0; margin: 0; padding: 0; min-width: 0; }
.lf-amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lf-amounts .pick { min-width: 0; min-height: 44px; justify-content: center; align-items: center; }
.lf-other { display: grid; gap: 4px; font-size: var(--fs-sm); }
.lf-other input { width: 100%; }
.lf-give .btn-row .btn, .lf-login-row .btn { width: 100%; justify-content: center; }
.lf-confirm { box-shadow: inset 0 0 0 3px var(--sun), var(--shadow); }
.lf-confirm form, .lf-confirm .btn-row { margin: 0; }
.sk-split { margin: 0; }
/* Your line in the book sits at the card's foot, so a tall book leaves no hole under the form. */
.lf-stand { display: grid; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 2px dashed var(--rule); }
.lf-stand p { margin: 0; }
.lf-stand-h { display: flex; gap: 8px; align-items: center; font: 700 1rem var(--display); }
.lf-stand .stat-bar { display: block; height: 12px; }
/* Visitors: what each pen opens, in the stand's place at the foot. */
.lf-perks { margin-top: auto; padding-top: 12px; border-top: 2px dashed var(--rule); }
.lf-perks h3 { margin: 0 0 8px; font: 700 1.15rem var(--display); }
.lf-perks ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lf-perks li { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 10px; align-items: start; font-size: var(--fs-sm); }
.lf-perks .pill { justify-self: start; }
.lf-book { display: flex; flex-direction: column; }
.lf-book .bk1-cover { flex: 1; display: flex; flex-direction: column; }
.lf-book .bk1-page { flex: 1; align-content: start; }

@media (min-width: 1000px) { .lf-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; } }
/* Under 1280px the blurbs step aside: three plaques in a row are about 230px wide there, and on phones they would push Give
   two screens down. The plaque keeps its name, its state and the way in. */
@media (max-width: 1279px) { .lf-post-what { display: none; } }
@media (min-width: 768px) and (max-width: 1279px) {
  .lf-posts:not(.is-all-open) .lf-post-h { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; row-gap: 4px; }
  .lf-posts:not(.is-all-open) .lf-post-h .lf-state { grid-column: 2; justify-self: start; }
}

/* ---------- Bogsworth's book 1: leather-bound (pick 2026-11-14) ---------- */
:root { --bk-leather: #6a3550; --bk-leather-2: #4e2440; --bk-gilt: #d9a93a; --bk-gilt-hi: #f3d27a; --bk-ink: #1f3a8a; --bk-good: #5a2bb8; --bk-wax: #b3246a; }
.bk1-cover { position: relative; padding: 14px; border-radius: 14px; background: radial-gradient(circle at 30% 20%, var(--bk-leather), var(--bk-leather-2));
  border: var(--line) solid var(--ink); box-shadow: inset 0 0 0 6px var(--bk-leather-2), inset 0 0 0 8px var(--bk-gilt); }
.bk1-cover::before { content: ''; position: absolute; inset: 5px; border: 2px dashed var(--bk-gilt-hi); border-radius: 10px; opacity: .55; pointer-events: none; }
.bk1 .bk1-title { margin: 4px 0 14px; text-align: center; font: 700 1.45rem var(--display); color: var(--bk-gilt-hi); letter-spacing: .04em; }
.bk1-title small { display: block; font: 600 var(--fs-xs) var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--bk-gilt); }
.bk1-page { position: relative; display: grid; gap: 14px; padding: 24px 20px 20px; background: var(--parchment); border-radius: 4px 8px 8px 4px;
  box-shadow: 3px 0 0 var(--bk-gilt), 5px 1px 0 var(--bk-gilt-hi), 7px 2px 0 var(--bk-gilt), 0 3px 0 var(--bk-gilt), 1px 5px 0 var(--bk-gilt-hi); }
.bk1-ribbon { position: absolute; top: -14px; right: 28px; width: 18px; height: 86px; background: var(--bk-wax); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%); }
.bk1-tier h3 { margin: 0; font: 700 1.1rem var(--display); padding-right: 40px; }
.bk1-pen { margin: 0 0 4px; font-size: var(--fs-xs); }
.bk1-tier + .bk1-tier, .lf-none + .bk1-tier { border-top: 1px solid var(--rule); padding-top: 12px; }
.lf-names, .lf-none { margin: 0; }
.bk1-page > .lf-none { padding-right: 40px; } /* clear of the ribbon, like the tier names */
.lf-names a { color: inherit; text-decoration: none; }
.lf-names a:hover { text-decoration: underline; }
.bk1 .lf-fallen-star .lf-names { font: 700 1.35rem var(--display); }
.bk1 .lf-fallen-star .lf-names a { text-decoration: underline double var(--bk-gilt); text-underline-offset: 4px; }
.bk1 .lf-moonstone .lf-names { font: 600 1.15rem var(--display); color: var(--bk-good); }
.bk1 .lf-lantern .lf-names { color: var(--bk-ink); }
.bk1 .lf-pebble .lf-names { color: var(--muted); font-style: italic; }
.lf-names .is-you { background: var(--hi); border-radius: var(--r-sm); padding: 0 4px; }


/* Phones: the picture, the title, then the plaques in one column (all in the hero card), then Give, then the book. */
@media (max-width: 767px) {
  .lf-stage { order: 0; } .lf-hero .lf-hero-text { order: 1; padding: 12px 16px 16px; } .lf-plaques { order: 2; padding: 12px; border-top: 0; }
  .lf-posts { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 0; }
  .lf-post { border-radius: var(--r-sm); }
  /* The signposts shrink to number dots, still 44px to tap; the names are on the plaques below. They stand a little higher than
     on desktop, so dot 2 (low on the rim) keeps clear of the land pill under the picture. Lifted with top, not a transform, so
     the tap box is where the dot is drawn. */
  .lf-pin, .lf-pin:nth-child(n) { top: calc(var(--y) - 70px); padding: 0; gap: 0; border-radius: 50%; transform: translateX(-50%); }
  .lf-pin .lf-pin-t { display: none; }
  .lf-pin .lf-num { width: 44px; height: 44px; border: 0; }
  .lf-key { left: 8px; top: 8px; }
  .lf-post-foot .btn-row .btn, .lf-confirm .btn-row .btn { width: 100%; justify-content: center; }
  .lf-confirm .btn-row, .lf-post-foot .btn-row { display: grid; gap: 12px; } /* stage 2: Play Choir Echo on top, the Look Book under it */
  .lf-give-card h2, .lf-login { text-align: center; }
}

/* ---------- rich nudge (Home) ---------- */
.rn-card h2 { margin-top: 0; }
.rn-sum { margin: 0 0 12px; font-size: var(--fs-sm); }
.rn-card .btn-row { margin: 0; }
.rn-fold > .rn-list { margin-top: 8px; }
@media (min-width: 768px) { .home-wide .home-left .rn-card { order: -1; } } /* DOM puts it after the day card for phones */
.rn-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.rn-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--tint); color: inherit; text-decoration: none; }
.rn-list a:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.rn-list b { display: block; }
.rn-list small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.rn-list .price { font: 700 1rem var(--display); color: var(--price); white-space: nowrap; }
.rn-list .pill { white-space: nowrap; }
.rn-foot { margin: 0; font-size: var(--fs-sm); }
.rn-card form { margin: 0; }
@media (max-width: 767px) {
  .rn-card h2, .rn-sum, .rn-foot { text-align: center; }
  .rn-card .btn-row { display: grid; gap: 12px; }
  .rn-card .btn-row .btn { width: 100%; justify-content: center; }
}
/* From 1100px Home's to-do rail is narrow (home.css): each row stacks its price under the words, and the buttons go full width. */
@media (min-width: 1100px) {
  .home-left .rn-list a { flex-direction: column; align-items: flex-start; gap: 4px; }
  .home-left .rn-card .btn-row { display: grid; gap: 12px; }
  .home-left .rn-card .btn-row .btn { width: 100%; justify-content: center; flex-wrap: wrap; column-gap: .3em; row-gap: 0; } /* the price wraps whole under "Open spot 6 for" */
}

/* ---------- what each stage gives (crater unlocks explained, 2026-11-15) ---------- */
/* Under each plaque's story line: a pen heading over that pen's finds, each with its stall icon or backdrop thumbnail. */
.lf-gets { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: var(--fs-sm); }
.lf-gets p { margin: 0; }
.lf-who { font: 700 var(--fs-xs) var(--display); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.lf-things { display: grid; gap: 6px; margin-top: 4px; }
.lf-thing { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 8px; align-items: center; line-height: 1.2; }
.lf-thing > svg { width: 32px; height: 32px; }
.lf-thing small { display: block; color: var(--muted); font-size: var(--fs-xs); }
/* the 32px icons in these lists stay still: the plank finds' twinkles (art/crater23.js) cost main thread for a glint you can't see */
.lf-gets .wear-twinkle { animation: none; }
/* stages 2-3 round (2026-11-16): a whole plank for everyone is a strip of its finds' icons beside one line */
.lf-plank { grid-template-columns: auto minmax(0, 1fr); }
.lf-strip { display: flex; gap: 2px; }
.lf-strip > svg { width: 32px; height: 32px; flex: none; }
/* stages 2 and 3 fold their pen rows under "And N more by pen" (Plaque length pick 2) */
.lf-more { margin: 4px 0; font-size: var(--fs-sm); } /* the bottom 4px plus the plaque's 8px gap keeps the fold 12px over Play Choir Echo */
.lf-more > summary { display: flex; align-items: center; min-height: 44px; font: 700 var(--fs-sm) var(--display); cursor: pointer; }
.lf-more > summary { list-style: none; }
.lf-more > summary::-webkit-details-marker { display: none; }
/* a chevron after the words, pointing down closed and up open (games.css .ah-how) */
.lf-more > summary::after { content: ''; width: 6px; height: 6px; margin-left: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); }
.lf-more[open] > summary::after { transform: rotate(-135deg) translate(-2px, 0); }
.lf-more[open] > summary { margin-bottom: 4px; }
/* the Humming Spot plaque once open: the rows sit under its state lines, then the Warm Stones button */
.hm-bare .lf-gets { margin-top: 4px; text-align: left; }
.hm-bare .lf-stones { margin: 12px 0 0; }
.lf-post .hm-bare { align-items: start; } /* the hollow stays at the top when the fold opens */
/* the per-pen list when logged in: your pen and the next one marked */
.lf-perks.is-in { margin-top: 0; }
.lf-perks li.is-you, .lf-perks li.is-next { margin-inline: -8px; padding: 6px 8px; border-radius: var(--r-sm); }
.lf-perks li.is-you { background: var(--hi); }
.lf-perks li.is-next { background: var(--hi-soft); }
.lf-mark { display: block; font-weight: 700; color: var(--muted); font-size: var(--fs-xs); }
.lf-perks-foot { margin: 8px 0 0; font-size: var(--fs-xs); }
@media (max-width: 767px) {
  /* the per-pen list's pill sits over its line (the 9.5em pill column squeezed the text) */
  .lf-perks li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  /* the plaques stack here, so the rows sit a little tighter: Give starts about 30px higher */
  .lf-gets { gap: 8px; }
  .lf-things { gap: 4px; margin-top: 2px; }
  /* humming.css centers the hum card's lines on phones; on the plaque they read left, like the rows under them */
  .hm-bare .hm-a-text { text-align: left; }
}
