/* ============================================================================
   quietly raising · HOME, ONE SCREEN (2026-11-19)
   Fei: "combine the two just to make 1 screen, show the garden of completion on the hills."
   One painted screen, no page scroll. Back to front:
     .map__bg (panel 1 of the painting, fitted by home.js) · .zone (the hills):
     .toys (play flowers, this visit only) · .spot (cottage = Read, tent = Play) ·
     .bed (my garden: earned flowers) · .hill-line (hand-lettered words) · .garden (seed + tray)
   Below the hills: the "keep going" card, then .base (grown-ups line + the shared footer).
   The old scroll journey is backed up in .tmp/home-one-screen-backup/.
   ========================================================================== */

html, body { background: #7FB2E5; }
body.home { margin: 0; color: var(--cream); overscroll-behavior: none; }
@media (min-height: 500px) { html, body.home { height: 100%; overflow: hidden; } }

.map { position: relative; height: 100vh; height: 100dvh; min-height: 500px; overflow: hidden; background: #7FB2E5; isolation: isolate; }
.map__bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 18%; z-index: 0;
  user-select: none; -webkit-user-drag: none; pointer-events: none; }
.map__col { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column;
  padding-top: calc(max(12px, env(safe-area-inset-top)) + 62px); box-sizing: border-box; }

.map__title { flex: none; position: relative; z-index: 2; margin: 0; padding: 0 12px; text-align: center;
  font: 400 clamp(36px, 11vw, 50px)/1 var(--display); letter-spacing: .01em; color: #13220F; text-shadow: 0 2px 0 rgba(255, 253, 246, .5); }

/* the hills: everything a child taps lives here. Sizes follow the space left (container units). */
.zone { position: relative; flex: 1 1 auto; min-height: 0; container-type: size; container-name: zone; }
.zone.can-plant { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 32 32'%3E%3Cg fill='%23FFFDF6' stroke='%232F4A2A' stroke-width='1.2'%3E%3Cellipse cx='16' cy='9' rx='4.6' ry='6.4'/%3E%3Cellipse cx='23' cy='16' rx='6.4' ry='4.6'/%3E%3Cellipse cx='16' cy='23' rx='4.6' ry='6.4'/%3E%3Cellipse cx='9' cy='16' rx='6.4' ry='4.6'/%3E%3C/g%3E%3Ccircle cx='16' cy='16' r='3.6' fill='%23F2E2A6'/%3E%3C/svg%3E") 14 14, pointer; }

.tag { display: inline-block; padding: 5px 16px 7px; font: 400 24px/1 var(--display); letter-spacing: .02em; white-space: nowrap; color: #1F3320; background: #F6F0E1;
  border-radius: 14px 18px 13px 17px / 16px 13px 18px 14px; box-shadow: 0 8px 16px -8px rgba(10, 20, 10, .75), inset 0 0 0 1.5px rgba(31, 51, 32, .2); }

/* the two buildings: the tappable box is the building itself; the soft painted edge spills outside it and lets taps through */
.spot { position: absolute; z-index: 3; left: var(--x); top: var(--y); width: var(--w); height: var(--w); transform: translate(-50%, -50%); display: block; border-radius: 28%;
  text-decoration: none; -webkit-tap-highlight-color: transparent; }
.spot__pic { position: absolute; left: 50%; top: 50%; width: var(--pic, 215%); height: auto; max-width: none; transform: translate(-50%, -50%); pointer-events: none; transition: transform .5s var(--ease-out); }
.spot .tag { position: absolute; left: 50%; top: var(--tagy, 112%); transform: translate(-50%, 0) rotate(-2deg); transition: transform .35s var(--ease-out), background .3s; }
.spot--play .tag { transform: translate(-50%, 0) rotate(2deg); }
.spot:hover .spot__pic, .spot:focus-visible .spot__pic { transform: translate(-50%, -52%) scale(1.05); }
.spot:hover .tag, .spot:focus-visible .tag { background: #FFFDF6; }
.spot:focus-visible { outline: 3px solid var(--butter); outline-offset: 4px; }
.spot--read { --x: 29%; --y: 38%; --w: min(37cqw, 26cqh, 170px); --pic: 215%; --tagy: 110%; }
.spot--play { --x: 71%; --y: 67%; --w: min(31cqw, 22cqh, 146px); --pic: 172%; --tagy: 98%; }
.spot--apps { --x: 76%; --y: 22%; --w: min(25cqw, 17cqh, 108px); --pic: 190%; --tagy: 96%; }   /* the glass house: far up the hills, so smaller (2026-11-20) */
html:not(.reduced) .spot--apps .spot__pic { animation-duration: 6.9s; animation-delay: -1s; }
html:not(.reduced) .spot__pic { animation: spotbob 5.5s ease-in-out infinite alternate; }
html:not(.reduced) .spot--play .spot__pic { animation-duration: 6.4s; animation-delay: -2s; }
@keyframes spotbob { from { margin-top: -2px; } to { margin-top: 3px; } }

/* ── my garden: earned flowers, on the hills ──────────────────────────────── */
.bed { position: absolute; inset: 0; z-index: 4; margin: 0; padding: 0; list-style: none; pointer-events: none; }
.bed li { position: absolute; width: 0; height: 0; }
.bloom { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); width: max(44px, var(--fw)); height: max(44px, var(--fh)); padding: 0; border: 0; background: none;
  cursor: pointer; display: grid; place-items: end center; pointer-events: auto; -webkit-tap-highlight-color: transparent; }
.bloom img { display: block; height: var(--fh); width: auto; max-width: none; margin-bottom: calc(var(--fh) * -.07); transform-origin: 50% 93%;
  filter: drop-shadow(0 0 5px rgba(255, 244, 200, .85)) drop-shadow(0 3px 3px rgba(15, 28, 14, .3));
  animation: bloomsway var(--sw, 4.6s) ease-in-out infinite alternate; }
/* earned flowers stand on a small pool of light, so they read as "mine" and not as part of the painting or the play flowers */
.bloom::before { content: ""; position: absolute; left: 50%; bottom: calc(var(--fh) * -.06); width: calc(var(--fw) * 1.3); height: calc(var(--fh) * .26); transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 246, 210, .95), rgba(255, 236, 190, .35) 60%, rgba(255, 236, 190, 0)); pointer-events: none; }
.bloom:focus-visible { outline: 3px solid var(--butter); outline-offset: 2px; border-radius: 12px; }
.bloom:hover img { animation-duration: 1.2s; }
.bloom.is-said img { animation-duration: 1.2s; filter: drop-shadow(0 0 9px rgba(255, 246, 200, 1)) drop-shadow(0 0 3px rgba(255, 246, 200, .9)) drop-shadow(0 3px 3px rgba(15, 28, 14, .3)); }   /* the flower that is speaking glows brighter */
.bloom.is-new img { animation: bloompop .9s cubic-bezier(.25, 1.65, .5, 1) both, bloomsway var(--sw, 4.6s) ease-in-out .9s infinite alternate; }
@keyframes bloomsway { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
@keyframes bloompop { 0% { transform: scale(0); opacity: 0; } 40% { opacity: 1; } 100% { transform: scale(1); opacity: 1; } }

/* ── play flowers: tap a hill and something grows there for this visit ────── */
.toys { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.plant { position: absolute; width: 0; height: 0; }
.plant__pop { position: absolute; left: 0; top: 0; transform-origin: 0 0; animation: pop .75s cubic-bezier(.25, 1.65, .5, 1) both; }
.plant__pop img { position: absolute; left: 0; bottom: calc(var(--h) * -.085); height: var(--h); width: auto; max-width: none;
  transform: translateX(-50%) rotate(var(--tilt)); transform-origin: 50% 100%; animation: plantsway var(--sw) ease-in-out .8s infinite alternate;
  filter: drop-shadow(0 3px 3px rgba(15, 28, 14, .25)); }
@keyframes pop { 0% { transform: scale(0); opacity: 0; } 35% { opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes plantsway { from { transform: translateX(-50%) rotate(calc(var(--tilt) - 2.5deg)); } to { transform: translateX(-50%) rotate(calc(var(--tilt) + 2.5deg)); } }
.plant.is-leaving .plant__pop { animation: unpop .65s ease-in both; }
@keyframes unpop { to { transform: scale(0); opacity: 0; } }
.ring { position: absolute; width: 0; height: 0; pointer-events: none; z-index: 9; }
.ring::before { content: ""; position: absolute; left: -26px; top: -12px; width: 52px; height: 24px; border-radius: 50%;
  border: 1.5px solid rgba(255, 250, 230, .85); animation: ring2 1s ease-out both; }
.ring--soft::before { border-color: rgba(255, 250, 230, .45); }
@keyframes ring2 { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }

/* ── hand-lettered lines on the hills ─────────────────────────────────────── */
.hill-line { position: absolute; z-index: 6; left: 50%; bottom: 4%; margin: 0; width: max-content; max-width: min(300px, 86cqw); box-sizing: border-box;
  padding: 6px 13px 8px; text-align: center; text-wrap: balance; transform: translateX(-50%);
  font: 400 clamp(15px, 4.6cqw, 21px)/1.15 var(--display); letter-spacing: .015em; color: #FFFDF6; background: rgba(24, 40, 24, .74);
  border-radius: 15px 18px 14px 17px / 17px 14px 18px 15px; box-shadow: 0 8px 18px -10px rgba(10, 20, 10, .7); pointer-events: none; }
.hill-line[hidden] { display: none; }
.hill-line--say { z-index: 10; background: rgba(24, 40, 24, .84); }
html:not(.reduced) .hill-line--say.is-on { animation: sayin .35s var(--ease-out) both; }
@keyframes sayin { from { opacity: 0; margin-top: 6px; } to { opacity: 1; margin-top: 0; } }

/* ── the seed button and its tray (bottom right of the hills) ─────────────── */
.garden { position: absolute; z-index: 7; right: 10px; bottom: 8px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; font-family: var(--body); }
.seed { position: relative; width: 52px; height: 52px; padding: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  background: rgba(31, 51, 32, .55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(246, 240, 225, .35); box-shadow: 0 10px 26px -12px rgba(10, 20, 10, .7); transition: transform .3s var(--ease-out), background .3s; }
.seed:hover { transform: translateY(-2px); background: rgba(31, 51, 32, .68); }
.seed img { height: 38px; width: auto; }
html:not(.has-planted):not(.reduced) .seed { animation: seedcall 2.6s ease-in-out 3s infinite; }
@keyframes seedcall { 0%, 70%, 100% { box-shadow: 0 10px 26px -12px rgba(10, 20, 10, .7), 0 0 0 0 rgba(242, 226, 166, 0); } 35% { box-shadow: 0 10px 26px -12px rgba(10, 20, 10, .7), 0 0 0 8px rgba(242, 226, 166, .3); } }
.garden__hint { position: absolute; right: 62px; bottom: 9px; margin: 0; white-space: nowrap; padding: 5px 11px 7px; pointer-events: none;
  font: 400 17px/1.1 var(--display); letter-spacing: .015em; color: #FFFDF6; background: rgba(24, 40, 24, .66);
  border-radius: 13px 16px 12px 15px / 15px 12px 16px 13px; transition: opacity .5s ease; }
.way__tap { color: var(--butter); }
.has-planted .garden__hint, .tray-open .garden__hint, .saying .garden__hint { opacity: 0; }   /* hidden, but keeps its place so flowers never move */
.tray { width: min(300px, calc(100vw - 32px)); box-sizing: border-box; padding: 12px; border-radius: 20px; color: var(--cream);
  background: rgba(31, 51, 32, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(246, 240, 225, .22);
  box-shadow: 0 18px 40px -18px rgba(10, 20, 10, .8); opacity: 0; transform: translateY(8px) scale(.98); transform-origin: 100% 100%; transition: opacity .25s ease, transform .25s var(--ease-out); }
.tray.is-open { opacity: 1; transform: none; }
.tray[hidden] { display: none; }
.tray__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tray__b { height: 56px; min-width: 44px; padding: 4px; border-radius: 14px; cursor: pointer; display: grid; place-items: center; background: rgba(246, 240, 225, .08); border: 1.5px solid transparent; }
.tray__b img { max-height: 46px; width: auto; }
.tray__b.is-on { border-color: var(--butter); background: rgba(242, 226, 166, .14); }
.tray__mix { font-size: 30px; color: var(--blush); line-height: 1; }
.tray__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 2px 0; font-size: 13px; }
.tray__n { opacity: .9; }
.tray__auto { min-height: 44px; font: 700 13px var(--body); color: var(--moss-ink); background: var(--cream); border: 0; border-radius: 999px; padding: 0 14px; cursor: pointer; white-space: nowrap; }

/* ── keep going: a picture, a short title, one button. The whole card is the button. ── */
.go { flex: none; position: relative; z-index: 8; box-sizing: border-box; width: min(420px, calc(100% - 24px)); height: 80px; margin: 4px auto 8px; /* a fixed height: the hills, and so every flower spot, never change with the title */
  display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 8px; color: #26301F; background: #F6F0E1; text-decoration: none;
  border-radius: 22px; box-shadow: 0 18px 34px -16px rgba(10, 20, 10, .85), inset 0 0 0 2px rgba(31, 51, 32, .16); transition: transform .3s var(--ease-out), background .3s; -webkit-tap-highlight-color: transparent; }
.go:hover { transform: translateY(-2px); background: #FFFDF6; }
.go__pic { flex: none; width: 64px; height: 64px; object-fit: cover; object-position: 50% 30%; border-radius: 15px; background: #DDE7CC; }
.go__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.go__kick { font: 800 12.5px/1.2 var(--body); letter-spacing: .07em; text-transform: uppercase; color: #35542B; }
.go__title { font: 400 21px/1.08 var(--display); letter-spacing: .01em; color: #1F3320; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.go__btn { flex: none; display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px 1px; font: 400 21px/1 var(--display); letter-spacing: .02em; color: var(--cream); background: var(--moss); border-radius: 999px; }
.go:focus-visible { outline: 3px solid var(--butter); outline-offset: 3px; }

/* ── the base: one quiet line for grown-ups, then the shared footer ──────── */
.base { flex: none; position: relative; z-index: 8; padding: 10px 12px max(4px, env(safe-area-inset-bottom)); text-align: center; color: rgba(246, 240, 225, .9);
  background: linear-gradient(to bottom, rgba(22, 36, 21, 0), rgba(22, 36, 21, .8) 10px, rgba(22, 36, 21, .88)); }
.grown { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 8px; font: 700 13px/1.2 var(--body); }
.grown__for { padding: 2px 8px 3px; font: 800 10px/1.3 var(--body); letter-spacing: .08em; text-transform: uppercase; color: rgba(246, 240, 225, .85);
  border: 1px solid rgba(246, 240, 225, .45); border-radius: 999px; }
.grown__a, .base .wfoot__links a { position: relative; display: inline-flex; align-items: center; min-height: 32px; color: var(--butter); text-underline-offset: 3px; text-decoration-color: rgba(242, 226, 166, .55); }
.grown__a::after, .base .wfoot__links a::after { content: ""; position: absolute; inset: -6px -4px; }   /* 44 px tall hit area around a 32 px line */
.base .wfoot { padding: 0; font-size: 11.5px; line-height: 1.3; color: rgba(246, 240, 225, .82); }
.base .wfoot__fun { margin: 2px auto 0; font-size: 11.5px; line-height: 1.3; }
.base .wfoot__links { margin: 0; gap: 0 16px; font-size: 12.5px; }
.base .wfoot__links a { padding: 0 2px; font-size: 12.5px; color: #F6F0E1; text-decoration-color: rgba(246, 240, 225, .45); }

/* ── computers and wide tablets ───────────────────────────────────────────── */
@media (min-width: 900px) {
  .map__col { padding-top: calc(max(12px, env(safe-area-inset-top)) + 64px); }
  .map__title { font-size: clamp(54px, 5.6vw, 84px); }
  .tag { font-size: 28px; padding: 6px 20px 8px; }
  .spot--read { --x: 25%; --y: 47%; --w: min(16cqw, 32cqh, 275px); }
  .spot--play { --x: 59%; --y: 37%; --w: min(13.5cqw, 27cqh, 235px); }
  .spot--apps { --x: 84%; --y: 33%; --w: min(11cqw, 22cqh, 190px); }
  .go { width: 410px; height: 92px; margin: -106px 28px 14px auto; }
  .go__pic { width: 76px; height: 76px; }
  .go__title { font-size: 23px; }
  .garden { right: 28px; bottom: 112px; }
  .garden__hint { font-size: 19px; }
  .base { display: flex; align-items: center; justify-content: center; gap: 6px 28px; padding: 8px 24px max(6px, env(safe-area-inset-bottom)); }
  .grown { flex-wrap: nowrap; white-space: nowrap; }
  .base .wfoot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 22px; font-size: 12.5px; }
  .base .wfoot__fun { margin: 0; max-width: none; font-size: 12.5px; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  .base .wfoot__links { order: -1; }   /* not enough width for one line: links first, the disclaimer under them */
  .base .wfoot__fun { flex-basis: 100%; }
}
/* a short phone: smaller words, no hint label (the seed button still calls) */
@media (max-width: 899px) and (max-height: 700px) {
  .map__col { padding-top: calc(max(10px, env(safe-area-inset-top)) + 60px); }
  .map__title { font-size: clamp(32px, 10vw, 42px); }
  .tag { font-size: 20px; padding: 4px 13px 6px; }
  .go { height: 72px; margin: 2px auto 6px; padding: 6px 8px 6px 6px; }
  .go__pic { width: 50px; height: 50px; border-radius: 12px; }
  .go__title { font-size: 19px; }
  .go__btn { min-height: 44px; padding: 0 16px 1px; font-size: 19px; }
  .base { padding-top: 8px; }
  .tray { padding: 10px; }
  .tray__b { height: 46px; }
  .tray__b img { max-height: 38px; }
  .tray__foot { margin-top: 8px; }
}
@container zone (max-height: 300px) { .garden__hint { display: none; } }
@container zone (max-width: 600px) and (max-height: 380px) { .spot--play { --x: 66%; --y: 55%; } }

/* home.js measures the screen with everything at rest, so flower spots never depend on a bob or a hover */
.measuring .spot__pic { animation: none !important; transition: none !important; transform: translate(-50%, -50%) !important; margin-top: 0 !important; }
.measuring .go, .measuring .seed { transition: none !important; transform: none !important; }

/* reduced motion: everything stands still and simply appears */
.reduced .spot__pic, .reduced .bloom img, .reduced .plant__pop, .reduced .plant__pop img, .reduced .seed { animation: none !important; }
.reduced .tray, .reduced .spot__pic, .reduced .go, .reduced .seed { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .spot__pic, .bloom img, .plant__pop, .plant__pop img, .seed, .hill-line--say { animation: none !important; }
}
.plant--tree .plant__pop img { bottom: 0; }
