/* The garden made to stand out (js/garden-highlight.js; the owner's choices, 26 Nov 2026).

   Garden green: a colour of its own, used only for garden things: the Home card's button, the sidebar's
   "Your garden", the phone's garden pill, and the garden page's own buttons. Crimson stays the one action
   colour everywhere else. It is taken from the moss of Home's five squares.

   Every garden-green thing behaves the same way: a pale moss tile at rest, turning into solid deep green under
   the pointer, while it is pressed (a finger has no hover), and when the keyboard is on it. The change takes
   0.18 s. (The solid green is laid over the tile as an inset shadow whose colour fades in, so that the night
   tile, which is a gradient, changes as smoothly as the day one.)

     day    tile #dfe9d2, words #1d2a1f (11.9:1), icons #2f5530 (6.8:1); solid #3f6b3b, white (6.2:1)
     night  tile #27382e to #1e2b24, white words and icons (12.4:1 at its lightest); solid #3f7d3a, white (5.0:1) */
:root {
  --g-tile: linear-gradient(160deg, #27382e, #1e2b24);
  --g-ink: #fff; --g-ico: #fff; --g-line: rgba(170, 220, 150, .16); --g-base: #121a15; --g-mark: #86c777;
  --g-solid: #3f7d3a; --g-solid-0: rgba(63, 125, 58, 0); --g-solid-base: #25501f; --g-solid-ink: #fff;
  --g-fade: .18s;
}
:root[data-theme="light"] {
  --g-tile: #dfe9d2;
  --g-ink: #1d2a1f; --g-ico: #2f5530; --g-line: rgba(47, 85, 48, .16); --g-base: #b7c8a6; --g-mark: #3f6b3b;
  --g-solid: #3f6b3b; --g-solid-0: rgba(63, 107, 59, 0); --g-solid-base: #2a4a28;
}

/* ---------- the garden-green things, at rest ---------- */
:root :is(.btn.gh-btn, .side-foot .nav-link[href="#/garden"], .gh-top, .gd-next .btn.primary, .btn[href="#/garden"]:not(.primary), .gd-turn-b, .gd-hour) {
  background: var(--g-tile); color: var(--g-ink); --g-drop: 0 0 0 0 transparent; --g-edge: 1px var(--g-line);
  box-shadow: inset 0 0 0 100px var(--g-solid-0), inset 0 0 0 var(--g-edge), var(--g-drop);
  transition: box-shadow var(--g-fade) ease, color var(--g-fade) ease, transform .1s ease;
}
:root :is(.btn.gh-btn, .side-foot .nav-link[href="#/garden"], .gh-top, .gd-next .btn.primary, .btn[href="#/garden"]:not(.primary), .gd-turn-b, .gd-hour) :is(.ico, svg) { color: var(--g-ico); opacity: 1; transition: color var(--g-fade) ease; }
/* the two that are raised buttons keep the site's button base, in green */
:root :is(.btn.gh-btn, .gd-next .btn.primary) { font-weight: var(--w-action); text-decoration: none; --g-drop: 0 3px 0 var(--g-base); }
:root .gd-next .btn.primary { --g-drop: 0 4px 0 var(--g-base); }

/* ---------- solid: under the pointer, pressed, or with the keyboard on it ---------- */
@media (hover: hover) {
  :root :is(.btn.gh-btn, .side-foot .nav-link[href="#/garden"], .gh-top, .gd-next .btn.primary, .btn[href="#/garden"]:not(.primary), .gd-turn-b, .gd-hour):hover {
    background: var(--g-tile); color: var(--g-solid-ink); --g-edge: 1px transparent;
    box-shadow: inset 0 0 0 100px var(--g-solid), inset 0 0 0 var(--g-edge), var(--g-drop);
  }
  :root :is(.btn.gh-btn, .side-foot .nav-link[href="#/garden"], .gh-top, .gd-next .btn.primary, .btn[href="#/garden"]:not(.primary), .gd-turn-b, .gd-hour):hover :is(.ico, svg) { color: var(--g-solid-ink); }
  :root :is(.btn.gh-btn, .gd-next .btn.primary):hover { --g-drop: 0 3px 0 var(--g-solid-base); }
  :root .gd-next .btn.primary:hover { --g-drop: 0 4px 0 var(--g-solid-base); }
}
:root :is(.btn.gh-btn, .side-foot .nav-link[href="#/garden"], .gh-top, .gd-next .btn.primary, .btn[href="#/garden"]:not(.primary), .gd-turn-b, .gd-hour):is(:active, :focus-visible) {
  background: var(--g-tile); color: var(--g-solid-ink); --g-edge: 1px transparent;
  box-shadow: inset 0 0 0 100px var(--g-solid), inset 0 0 0 var(--g-edge), var(--g-drop);
}
:root :is(.btn.gh-btn, .side-foot .nav-link[href="#/garden"], .gh-top, .gd-next .btn.primary, .btn[href="#/garden"]:not(.primary), .gd-turn-b, .gd-hour):is(:active, :focus-visible) :is(.ico, svg) { color: var(--g-solid-ink); }
:root :is(.btn.gh-btn, .gd-next .btn.primary):is(:active, :focus-visible) { --g-drop: 0 3px 0 var(--g-solid-base); }
:root :is(.btn.gh-btn, .gd-next .btn.primary):active { --g-drop: 0 1px 0 var(--g-solid-base); transform: translateY(2px); }
:root :is(.btn.gh-btn, .side-foot .nav-link[href="#/garden"], .gh-top, .gd-next .btn.primary, .btn[href="#/garden"]:not(.primary), .gd-turn-b, .gd-hour):focus-visible { outline: 2px solid var(--g-mark); outline-offset: 2px; }

/* ---------- the sidebar's "Your garden" ---------- */
:root .side-foot .nav-link[href="#/garden"] { position: relative; margin: 4px 0; font-weight: var(--w-label); }
/* where you are: the same crimson mark as every other item (app.css), and a firm green edge */
:root .side-foot .nav-link[href="#/garden"][aria-current="page"] { --g-edge: 1.5px var(--g-mark); }
/* away from the garden it is not a tile: a tile is how the sidebar marks the page you are on, and with the green tile
   at rest two items looked chosen at once (the first-visit walkthrough, 28 Nov 2026). Its icon keeps the garden's green;
   under the pointer it still turns solid green. */
:root .side-foot .nav-link[href="#/garden"]:not([aria-current="page"]) { background: transparent; --g-edge: 1px transparent; }
:root .side-foot .nav-link[href="#/garden"]:not([aria-current="page"]):not(:hover):not(:active):not(:focus-visible) :is(.ico, svg) { color: var(--g-mark); }
/* the bump when a rose lands */
.gh-bump { animation: gh-bump .6s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes gh-bump { 0% { transform: scale(1); } 35% { transform: scale(1.08); } 65% { transform: scale(.985); } 100% { transform: scale(1); } }

/* the phone has no sidebar foot: a small pill in the top bar */
.gh-top { display: none; }
@media (max-width: 720px) {
  .gh-top { position: fixed; top: calc(8px + env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); z-index: 31; display: inline-flex; align-items: center; gap: 6px; height: 33px; padding: 0 12px 0 9px; border-radius: 999px;
    font-size: 13.5px; font-weight: var(--w-label); text-decoration: none; }
  .gh-top .ico { width: 19px; height: 19px; }
  :root .gh-top[aria-current="page"] { --g-edge: 1.5px var(--g-mark); }
  .gh-top[aria-current="page"]::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: -8px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
  /* once the page is scrolled the eight arches are pinned in the same corner: the pill keeps the corner as a round
     button (its word goes), and the arches move over and draw a little smaller */
  .arc-pin:not([hidden]) ~ .gh-top { width: 33px; padding: 0; justify-content: center; }
  .arc-pin:not([hidden]) ~ .gh-top span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .arc-pin { right: calc(max(12px, env(safe-area-inset-right, 0px)) + 39px); }
  .arc-pin .arc-pin-art { transform: scale(.85); margin-left: -22px; }
}

/* ---------- the Garden panel on a returning visitor's Home (docs/REDESIGN.md) ---------- */
/* How it is laid out (the picture over its words beside the Continue cards, or beside its words under them on a phone)
   is Home's: css/home.css .hm-split. Here, how it looks: the moss panel, the garden's sheet, the words. */
.gh-card { display: grid; min-width: 0; overflow: hidden; border-radius: 18px; background: var(--g-tile); box-shadow: inset 0 0 0 1px var(--g-line); }
/* the picture's room is kept before the garden is drawn: the sheet lies over the view, so a drawn garden can never make
   the panel taller and push anything down (it grew by 25 px when the picture came: Home's layout shift, 30 Nov) */
.gh-view { position: relative; display: block; min-width: 0; text-decoration: none; }
/* The garden's own sheet, as the garden page lays it behind its garden (css/pages-garden.css, .gd-map-in): a rounded
   sheet of cream set into the panel, which each hour tints as it tints the garden (garden-plan.js TINT), in the night's
   blue in the dark theme (the owner, 30 Nov 2026: the card was plain, "a flat dark panel" at night). */
.gh-sheet { display: block; height: 100%; border-radius: 14px; background: #f6ecd4; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(42, 20, 22, .08); }
.gh-view .gh-sheet { position: absolute; inset: 12px; height: auto; }
.gh-sheet[data-phase="morning"] { background: rgb(246, 227, 187); }
.gh-sheet[data-phase="evening"] { background: rgb(246, 212, 165); }
.gh-sheet[data-phase="night"] { background: rgb(113, 132, 191); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.gh-map { display: block; width: 100%; height: 100%; pointer-events: none; }
.gh-map svg { display: block; width: 100%; height: 100%; max-height: none; border-radius: 0; }
.gh-map .gd-sheet-bg { display: none; }
.gh-text { display: grid; align-content: center; justify-items: start; gap: 6px; min-width: 0; padding: 16px 22px 20px; color: var(--g-ink); }
.gh-text .eyebrow { font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: var(--w-label); color: var(--g-ink); opacity: .78; }
.gh-text .gh-visit { font-weight: var(--w-meta); }   /* a guest: their garden lasts for this visit (docs/GUESTS.md, 30 Nov 2026) */
.gh-text h2 { margin: 0; font: var(--w-title) 24px/1.15 var(--font-display); letter-spacing: -.01em; color: var(--g-ink); }
.gh-state { margin: 0; font-size: 14.5px; line-height: 1.4; color: var(--g-ink); opacity: .85; }
.gh-step { margin: 2px 0 4px; font-size: 14.5px; line-height: 1.45; color: var(--g-ink); }
.gh-step b { font-weight: var(--w-title); margin-right: 2px; }
.gh-step a { color: var(--g-ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--g-mark) 70%, transparent); text-underline-offset: 3px; font-weight: var(--w-label); }
.gh-step a:hover { text-decoration-color: currentColor; }
.gh-step span { opacity: .78; }
/* a bird of the streak close by, with its small picture (js/garden-highlight.js gardenCardHTML) */
.gh-step.gh-bird { display: flex; align-items: center; gap: 8px; }
.gh-step.gh-bird i { flex: none; display: grid; place-items: center; width: 28px; height: 28px; }
.gh-step.gh-bird i svg { width: 28px; height: 28px; }
.gh-step.gh-bird span { opacity: 1; }
.gh-card .gh-btn { min-height: var(--btn-h); padding: 0 20px; margin-top: 4px; }
/* on the panel's own moss the button at rest is the page's panel colour, so it stands out; solid moss under the pointer as everywhere */
:root .gh-card .btn.gh-btn { background: var(--panel); }
/* the next step as the button, and a quiet "See your garden" beside it (C23, 30 Nov 2026) */
.gh-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 4px; }
.gh-acts .gh-btn { margin-top: 0; }
.gh-see { display: inline-flex; align-items: center; gap: 6px; color: var(--g-ink); font-size: 14.5px; font-weight: var(--w-label); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--g-mark) 70%, transparent); text-underline-offset: 3px; }
.gh-see:hover { text-decoration-color: currentColor; }
.gh-see .ico { width: 17px; height: 17px; color: var(--g-ico, currentColor); }
/* the next medals, as the garden page lists them (css/pages-garden.css .gd-todo), on the panel's moss: Home's card only */
.gh-next { display: grid; gap: 6px; margin: 0 22px; padding: 12px 0 16px; border-top: 1px solid var(--g-line); color: var(--g-ink); }
.gh-next-h { margin: 0; font: var(--w-label) 13px/1.2 var(--font); color: var(--g-ink); opacity: .78; }
.gh-todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.gh-todo li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.gh-todo-medal { display: block; width: 40px; }
.gh-todo-medal svg, .gh-todo-medal img { display: block; width: 100%; height: auto; }
.gh-todo-t { display: grid; gap: 1px; min-width: 0; }
.gh-todo-t b { font-size: 14px; line-height: 1.25; font-weight: var(--w-title); }
.gh-todo-t small { overflow: hidden; font-size: 12.5px; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; opacity: .8; }
.gh-todo-n { font-size: 12.5px; font-weight: var(--w-label); opacity: .75; }

/* ---------- "+1 rose" ---------- */
.gh-fly { position: fixed; inset: 0; z-index: 150; pointer-events: none; overflow: hidden; contain: strict; }
.gh-fl { position: absolute; left: 0; top: 0; will-change: transform; filter: drop-shadow(0 0 2px rgba(255, 255, 255, .9)) drop-shadow(0 3px 4px rgba(0, 0, 0, .3)); }
.gh-fl svg { display: block; }
.gh-plus { position: absolute; transform: translateY(-50%); padding: 3px 10px; border-radius: 999px; background: var(--g-solid); color: var(--g-solid-ink); font-size: 13px; font-weight: var(--w-label); white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
  animation: gh-plus 1.6s ease-out both; }
.gh-plus.below { transform: none; }
@keyframes gh-plus { 0% { opacity: 0; margin-left: -8px; } 14% { opacity: 1; margin-left: 0; } 75% { opacity: 1; } 100% { opacity: 0; margin-top: -8px; } }
/* for pictures of the site (?rose=1): a button that plays the flight */
.gh-try { position: fixed; right: 12px; bottom: 16px; z-index: 141; background: var(--panel-3); }
@media (max-width: 720px) { .gh-try { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }

/* ---------- "Your garden has begun": one card, once ---------- */
.gh-begun { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: grid; grid-template-columns: 62px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; width: min(520px, calc(100vw - 40px)); padding: 12px 10px 12px 12px; border-radius: 16px;
  background: var(--panel); color: var(--text); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--g-line); animation: gh-begun .5s cubic-bezier(.2, .9, .3, 1) both; }
.gh-begun-pic { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 12px; background: #f6ecd4; }
.gh-begun-pic svg { width: 54px; height: 46px; }
.gh-begun-t { display: grid; gap: 2px; min-width: 0; }
.gh-begun-t b { font: var(--w-title) 17px/1.2 var(--font-display); }
.gh-begun-t small { font-size: 13.5px; line-height: 1.4; color: var(--text-2); }
.gh-begun .gh-btn { min-height: 40px; padding: 0 18px; }
@keyframes gh-begun { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (max-width: 720px) {
  .gh-begun { left: 12px; right: 12px; bottom: calc(76px + var(--dock-h, 0px) + env(safe-area-inset-bottom, 0px)); width: auto; grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "pic text x" "btn btn btn"; gap: 10px 12px; padding: 12px; }
  .gh-begun-pic { grid-area: pic; width: 52px; height: 52px; }
  .gh-begun-pic svg { width: 44px; height: 38px; }
  .gh-begun-t { grid-area: text; }
  .gh-begun .gh-btn { grid-area: btn; min-height: var(--btn-h); }
  .gh-begun-x { grid-area: x; align-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .gh-bump, .gh-begun, .gh-plus { animation: none; }
  :root :is(.btn.gh-btn, .side-foot .nav-link[href="#/garden"], .gh-top, .gd-next .btn.primary, .btn[href="#/garden"]:not(.primary), .gd-turn-b, .gd-hour), :root :is(.btn.gh-btn, .side-foot .nav-link[href="#/garden"], .gh-top, .gd-next .btn.primary, .btn[href="#/garden"]:not(.primary), .gd-turn-b, .gd-hour) :is(.ico, svg) { transition: none; }
}
