/* garden/static/garden/css/garden_scene.css */

/* === Container === */
.garden-scene {
  position: relative;
  width: 100%;
  height: 270px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  /* Keeps the moonlight wash's screen blend inside the scene. */
  isolation: isolate;
  /* The scene backdrop is painted art, not a theme surface, so its particles
     need a fixed light colour. --color-content-inverse flips to near-black in
     dark mode and makes stars and snow invisible. */
  --scene-particle: #eef3ff;
}
.garden-scene::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-lg);
  pointer-events: none;
  z-index: 20;
}
.garden-scene[data-scene-phase="night"]::after {
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.2);
}
@media (min-width: 1024px) {
  .garden-scene { height: 350px; }
}
/* Scene height setting (standard = the rules above). The expanded overlay sets its own inline height. */
.garden-scene[data-scene-height="compact"] { height: 210px; }
.garden-scene[data-scene-height="tall"] { height: 360px; }
@media (min-width: 1024px) {
  .garden-scene[data-scene-height="compact"] { height: 270px; }
  .garden-scene[data-scene-height="tall"] { height: 460px; }
}

/* === Sky gradients ===
   Kept in --gs-sky so the balcony's hazed skyline can mix toward the same sky. */
.garden-scene { --gs-sky: linear-gradient(180deg, #3B82C4 0%, #6BB3E0 40%, #A8D8F0 70%, #D4EDFC 100%); }
.garden-scene[data-scene-phase="day"]:is([data-scene-weather="clear"], [data-scene-weather="partly"], [data-scene-weather="overcast"], [data-scene-weather="rain"], [data-scene-weather="snow"], [data-scene-weather="fog"]),
.garden-scene:is([data-scene-phase="dawn"], [data-scene-phase="dusk"], [data-scene-phase="night"]) { background: var(--gs-sky); }
.garden-scene[data-scene-phase="day"][data-scene-weather="clear"]      { --gs-sky: linear-gradient(180deg, #3B82C4 0%, #6BB3E0 40%, #A8D8F0 70%, #D4EDFC 100%); }
.garden-scene[data-scene-phase="day"][data-scene-weather="partly"]     { --gs-sky: linear-gradient(180deg, #5A96CC 0%, #82B8DE 40%, #B0D4EC 70%, #D4E8F5 100%); }
.garden-scene[data-scene-phase="day"][data-scene-weather="overcast"]   { --gs-sky: linear-gradient(180deg, #7A8E9E 0%, #95A8B5 40%, #ADB9C4 70%, #C4CDD5 100%); }
.garden-scene[data-scene-phase="day"][data-scene-weather="rain"]       { --gs-sky: linear-gradient(180deg, #4A5660 0%, #667580 50%, #8A9AA5 100%); }
.garden-scene[data-scene-phase="day"][data-scene-weather="snow"]       { --gs-sky: linear-gradient(180deg, #A8B8C4 0%, #C4D0D8 50%, #E0E8EC 100%); }
.garden-scene[data-scene-phase="day"][data-scene-weather="fog"]        { --gs-sky: linear-gradient(180deg, #909090 0%, #ABABAB 50%, #C8C8C8 100%); }
.garden-scene[data-scene-phase="dawn"]                                 { --gs-sky: linear-gradient(180deg, #2D3A5C 0%, #C06848 25%, #E8A060 45%, #F0C878 60%, #88C8E0 100%); }
.garden-scene[data-scene-phase="dusk"]                                 { --gs-sky: linear-gradient(180deg, #1A1A3E 0%, #6B3A6B 20%, #C85A50 40%, #E89060 55%, #3A5A8C 100%); }
.garden-scene[data-scene-phase="night"]                                { --gs-sky: linear-gradient(180deg, #0A1628 0%, #122240 35%, #1A3055 65%, #1E3A5F 100%); }

/* === Ground === */
.garden-scene__ground {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 11%;
  overflow: visible;
  z-index: 1;
  border-top: 1px solid #3A6B22;
}
.garden-scene__ground-base {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Crect width='28' height='28' fill='%23518f33'/%3E%3Cline x1='3' y1='6' x2='4.5' y2='2' stroke='%23437a2b' stroke-width='1.3' stroke-linecap='round' opacity='0.6'/%3E%3Cline x1='10' y1='12' x2='11' y2='8' stroke='%2363a845' stroke-width='1' stroke-linecap='round' opacity='0.5'/%3E%3Cline x1='20' y1='5' x2='22' y2='2' stroke='%23437a2b' stroke-width='1.1' stroke-linecap='round' opacity='0.5'/%3E%3Cline x1='15' y1='20' x2='16.5' y2='16' stroke='%2363a845' stroke-width='1.2' stroke-linecap='round' opacity='0.45'/%3E%3Cline x1='25' y1='18' x2='26' y2='14' stroke='%23437a2b' stroke-width='0.9' stroke-linecap='round' opacity='0.5'/%3E%3Cline x1='7' y1='24' x2='8.5' y2='20' stroke='%2363a845' stroke-width='1.1' stroke-linecap='round' opacity='0.4'/%3E%3Cline x1='22' y1='26' x2='23' y2='23' stroke='%23437a2b' stroke-width='1' stroke-linecap='round' opacity='0.45'/%3E%3Cline x1='13' y1='3' x2='14' y2='0' stroke='%2363a845' stroke-width='0.8' stroke-linecap='round' opacity='0.4'/%3E%3C/svg%3E") repeat;
}
.garden-scene__ground-highlight {
  display: none;
}
.garden-scene__horizon-haze {
  display: none;
}
.garden-scene[data-scene-phase="night"] .garden-scene__ground-base {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Crect width='28' height='28' fill='%23264a18'/%3E%3Cline x1='3' y1='6' x2='4.5' y2='2' stroke='%231e3c12' stroke-width='1.3' stroke-linecap='round' opacity='0.6'/%3E%3Cline x1='10' y1='12' x2='11' y2='8' stroke='%23305820' stroke-width='1' stroke-linecap='round' opacity='0.5'/%3E%3Cline x1='20' y1='5' x2='22' y2='2' stroke='%231e3c12' stroke-width='1.1' stroke-linecap='round' opacity='0.5'/%3E%3Cline x1='15' y1='20' x2='16.5' y2='16' stroke='%23305820' stroke-width='1.2' stroke-linecap='round' opacity='0.45'/%3E%3Cline x1='25' y1='18' x2='26' y2='14' stroke='%231e3c12' stroke-width='0.9' stroke-linecap='round' opacity='0.5'/%3E%3Cline x1='7' y1='24' x2='8.5' y2='20' stroke='%23305820' stroke-width='1.1' stroke-linecap='round' opacity='0.4'/%3E%3Cline x1='22' y1='26' x2='23' y2='23' stroke='%231e3c12' stroke-width='1' stroke-linecap='round' opacity='0.45'/%3E%3Cline x1='13' y1='3' x2='14' y2='0' stroke='%23305820' stroke-width='0.8' stroke-linecap='round' opacity='0.4'/%3E%3C/svg%3E") repeat;
}
.garden-scene[data-scene-phase="dawn"] .garden-scene__ground-base {
  filter: brightness(0.85) sepia(0.15) saturate(0.9);
}
.garden-scene[data-scene-phase="dusk"] .garden-scene__ground-base {
  filter: brightness(0.7) sepia(0.2) saturate(0.75);
}
.garden-scene[data-scene-phase="night"] .garden-scene__ground-highlight {
  background: linear-gradient(90deg, transparent 5%, rgba(60, 100, 40, 0.3) 50%, transparent 95%);
}
.garden-scene[data-scene-phase="night"] .garden-scene__horizon-haze {
  background: linear-gradient(180deg, transparent 0%, rgba(20, 50, 15, 0.2) 60%, rgba(30, 60, 20, 0.3) 100%);
}

/* === Golden hour glow (dawn/dusk) === */
.garden-scene__golden-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
}

/* === Plant sprites ===
   Each sprite's filter is composed from three per-scene parts, so the
   hover/focus glow (production v1 values) stacks on top of the phase and
   weather tone instead of replacing it:
     --gs-tone   brightness/saturation of the light (phase, then weather wins)
     --gs-shade  the soft drop shadow at rest
     --gs-glow   the glow drop shadows while hovered, focused or tapped
   Order matters: weather rules come after phase rules, as in v1. */
.garden-scene {
  --gs-tone: brightness(1);
  --gs-shade: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.15));
  --gs-glow: drop-shadow(0 0 5px rgba(255, 200, 80, 0.7)) drop-shadow(0 0 14px rgba(255, 160, 40, 0.35));
}
.garden-scene[data-scene-phase="night"] {
  --gs-tone: brightness(0.55) saturate(0.6);
  --gs-shade: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  --gs-glow: drop-shadow(0 0 5px rgba(180, 210, 255, 0.6)) drop-shadow(0 0 14px rgba(140, 180, 255, 0.3));
}
.garden-scene[data-scene-phase="dawn"] {
  --gs-tone: brightness(0.85) saturate(0.9) sepia(0.1);
  --gs-shade: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
  --gs-glow: drop-shadow(0 0 5px rgba(255, 160, 60, 0.75)) drop-shadow(0 0 14px rgba(255, 120, 40, 0.4));
}
.garden-scene[data-scene-phase="dusk"] {
  --gs-tone: brightness(0.7) saturate(0.7) sepia(0.15);
  --gs-shade: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
  --gs-glow: drop-shadow(0 0 5px rgba(255, 160, 60, 0.75)) drop-shadow(0 0 14px rgba(255, 120, 40, 0.4));
}
/* Overcast conditions get the cool muted glow */
.garden-scene[data-scene-weather="overcast"] {
  --gs-glow: drop-shadow(0 0 5px rgba(200, 220, 240, 0.6)) drop-shadow(0 0 12px rgba(160, 190, 220, 0.3));
}
.garden-scene[data-scene-weather="rain"] {
  --gs-tone: brightness(0.85) saturate(1.1);
  --gs-shade: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
  --gs-glow: drop-shadow(0 0 5px rgba(200, 220, 240, 0.6)) drop-shadow(0 0 12px rgba(160, 190, 220, 0.3));
}
.garden-scene[data-scene-weather="snow"] {
  --gs-tone: brightness(0.95) saturate(0.8);
  --gs-shade: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.15));
}
.garden-scene[data-scene-weather="fog"] {
  --gs-tone: brightness(0.9) saturate(0.6) contrast(0.9);
  --gs-shade: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  --gs-glow: drop-shadow(0 0 5px rgba(200, 220, 240, 0.6)) drop-shadow(0 0 12px rgba(160, 190, 220, 0.3));
}
/* Night wins over the weather: the weather tones above are daylight ones,
   and a rainy night was drawn as by day. Rain and fog dim the night a touch
   more; snow keeps the night's own light. */
.garden-scene[data-scene-phase="night"]:is([data-scene-weather="rain"], [data-scene-weather="snow"], [data-scene-weather="fog"]) {
  --gs-tone: brightness(0.55) saturate(0.6);
  --gs-shade: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}
.garden-scene[data-scene-phase="night"]:is([data-scene-weather="rain"], [data-scene-weather="fog"]) {
  --gs-tone: brightness(0.5) saturate(0.55);
}

.garden-scene__plant {
  position: absolute;
  max-width: none;
  image-rendering: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  filter: var(--gs-tone) var(--gs-shade);
  transition: filter 0.4s cubic-bezier(0.4, 0, 0.2, 1), scale 0.2s, translate 0.2s;
  transform-origin: bottom center;
  animation: plant-sway var(--sway-duration, 7s) ease-in-out infinite;
  animation-delay: calc(var(--sway-offset, 0) * -1s);
}
/* The part of a marked plant's trail past its bed's edge (render.js
   remappedSprite): over an in-ground bed's soil edge or hanging over a raised
   face, onto the ground. In front of the face, still. */
/* Soft shadow on the soil under a marked plant's crown and trail ('shade'). */
.garden-scene__trail-shadow {
  position: absolute;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(28, 40, 18, 0.38), rgba(28, 40, 18, 0.2) 55%, rgba(28, 40, 18, 0));
}
.garden-scene__trail-front {
  position: absolute;
  filter: var(--gs-tone) var(--gs-shade);
  transition: filter 0.4s cubic-bezier(0.4, 0, 0.2, 1), scale 0.2s, translate 0.2s;
}
/* A breeze, not a gale: half the first sway (owner 2026-10-21), then a third
   more so short plants visibly move (owner 2026-11-11). */
@keyframes plant-sway {
  0%   { rotate: calc(-0.65deg * var(--sway-scale, 1)); }
  50%  { rotate: calc(1deg * var(--sway-scale, 1)); }
  100% { rotate: calc(-0.65deg * var(--sway-scale, 1)); }
}
@media (prefers-reduced-motion: reduce) {
  .garden-scene__plant { animation: none; }
}
/* Firefox (only engine matching -moz-appearance): no sway, plants rest as with
   reduced motion (owner 2026-11-23). Each sway step makes WebRender redraw every
   plant with its tone and shadow (40-50 ms in the Everything tab), so birds,
   butterflies and bees crossing the card hitched ten times a second. */
@supports (-moz-appearance: none) {
  .garden-scene__plant { animation: none; }
}
/* Sprites are the hit targets (the unit button only spans their box). */
.garden-scene__sprite {
  pointer-events: auto;
  cursor: pointer;
}
/* Hover/focus glow (.is-glow) and the open tap card (.is-active) light every
   sprite of the clump. The inline transform holds the centring and the flip,
   so the lift uses the individual scale/translate properties. `scale` also
   stretches the inline translateX(-50%), shifting the sprite sideways by
   (scale - 1) / 2 of its width; the x translate cancels that so the plant
   stays centred over its pot. */
.garden-scene__sprite.is-glow,
.garden-scene__sprite.is-active {
  filter: var(--gs-tone) var(--gs-glow);
  transition: filter 0.15s cubic-bezier(0.16, 1, 0.3, 1), scale 0.2s, translate 0.2s;
  scale: 1.04;
  translate: 2% -2px;
}
.garden-scene__unit:active .garden-scene__sprite {
  scale: 0.97;
  translate: -1.5% 0;
}
@media (prefers-reduced-motion: reduce) {
  .garden-scene__sprite.is-glow,
  .garden-scene__sprite.is-active { scale: none; translate: none; }
}

/* === Sky elements (sun, moon, clouds) === */
.garden-scene__sky-element {
  position: absolute;
  pointer-events: none;
  user-select: none;
}
.garden-scene__cloud {
  animation: cloud-drift ease-in-out infinite;
  will-change: transform;
}
/* Night clouds are lit by the moon, not the sun. Straight brightness() turns
   them to grey sludge, so push them cool first and darken after.
   ponytail: filter-tinted day clouds; add real night cloud art if this shows. */
.garden-scene[data-scene-phase="night"] .garden-scene__cloud {
  filter: brightness(0.38) sepia(0.8) hue-rotate(180deg) saturate(1.6);
}

/* === Sun wash (day only) ===
   Same job as the moonlight wash: one light direction for every layer, so
   midday foliage is lit from where the sun actually sits instead of evenly.
   Dawn and dusk keep their own golden-glow treatment.
   v2 keeps the sun in clear sky, off the canopies, so the light has to reach
   further down than v1's to warm the plants nearest it (2026-10-14). */
.garden-scene__sunwash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 17;
  mix-blend-mode: screen;
  background: radial-gradient(
    ellipse 70% 130% at calc(var(--sun-x, 78%) + var(--gs-par-sun, 0px)) var(--sun-y, 6%),
    rgba(255, 248, 219, 0.50) 0%,
    rgba(255, 236, 178, 0.30) 14%,
    rgba(255, 226, 160, 0.16) 34%,
    rgba(255, 220, 150, 0.05) 56%,
    transparent 74%
  );
}

/* === Moonlight wash (night only) ===
   A single light direction for every layer. Sits above the plants so sky,
   foliage, ground and creatures all read as lit from the moon at once.
   Like the sun wash, it reaches further down than v1's, since v2 keeps the
   moon in clear sky away from the canopies (2026-10-14). */
.garden-scene__moonlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 17;
  mix-blend-mode: screen;
  background: radial-gradient(
    ellipse 75% 135% at calc(var(--moonlight-x, 78%) + var(--gs-par-sun, 0px)) 10%,
    rgba(120, 160, 225, 0.26) 0%,
    rgba(95, 135, 205, 0.17) 22%,
    rgba(70, 105, 170, 0.10) 44%,
    rgba(45, 70, 125, 0.04) 66%,
    transparent 86%
  );
}
@keyframes cloud-drift {
  0%   { transform: translateX(0); }
  50%  { transform: translateX(30px); }
  100% { transform: translateX(0); }
}

/* === Ground details (grass tufts, wildflowers) === */
.garden-scene__ground-detail {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 2;
  /* Same light as the plants, so dawn, dusk and weather tint them too. */
  filter: var(--gs-tone);
}

/* === Parallax (pan.js sets the offsets on the sky and weather layers while panning) ===
   The individual `translate` property composes with the cloud-drift and
   mirror transforms instead of replacing them. The light washes follow the
   sun through --gs-par-sun in their gradient centres. */
.garden-scene__horizon { translate: var(--gs-par-horizon, 0px) 0; }
.garden-scene__cloud { translate: var(--gs-par-cloud, 0px) 0; }
.garden-scene__sun,
.garden-scene__moon { translate: var(--gs-par-sun, 0px) 0; }

/* === Horizon layer (theme silhouettes) === */
.garden-scene__horizon {
  position: absolute;
  bottom: 11%;
  left: 0;
  right: 0;
  height: 28%;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  opacity: 0.5;
}
.garden-scene__horizon-element {
  position: absolute;
  bottom: 0;
  pointer-events: none;
}
.garden-scene[data-scene-phase="night"] .garden-scene__horizon {
  opacity: 0.25;
  filter: brightness(0.4) saturate(0.5);
}
.garden-scene[data-scene-phase="dawn"] .garden-scene__horizon {
  opacity: 0.35;
  filter: brightness(0.85) sepia(0.15);
}
.garden-scene[data-scene-phase="dusk"] .garden-scene__horizon {
  opacity: 0.3;
  filter: brightness(0.7) sepia(0.2);
}

/* === Desert theme === */
.garden-scene[data-scene-theme="desert"] .garden-scene__ground {
  border-top: 1px solid #C4A050;
}
.garden-scene[data-scene-theme="desert"] .garden-scene__ground-base {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Crect width='28' height='28' fill='%23D4B870'/%3E%3Ccircle cx='5' cy='8' r='0.8' fill='%23C4A050' opacity='0.4'/%3E%3Ccircle cx='14' cy='4' r='0.6' fill='%23BFA048' opacity='0.35'/%3E%3Ccircle cx='22' cy='14' r='0.7' fill='%23C4A050' opacity='0.3'/%3E%3Ccircle cx='8' cy='20' r='0.5' fill='%23BFA048' opacity='0.4'/%3E%3Ccircle cx='18' cy='24' r='0.8' fill='%23C4A050' opacity='0.35'/%3E%3Ccircle cx='25' cy='6' r='0.6' fill='%23BFA048' opacity='0.3'/%3E%3Ccircle cx='3' cy='26' r='0.7' fill='%23C4A050' opacity='0.25'/%3E%3Ccircle cx='12' cy='16' r='0.5' fill='%23BFA048' opacity='0.3'/%3E%3C/svg%3E") repeat;
}
.garden-scene[data-scene-theme="desert"][data-scene-phase="night"] .garden-scene__ground-base {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Crect width='28' height='28' fill='%23705830'/%3E%3Ccircle cx='5' cy='8' r='0.8' fill='%23604820' opacity='0.4'/%3E%3Ccircle cx='14' cy='4' r='0.6' fill='%235A4218' opacity='0.35'/%3E%3Ccircle cx='22' cy='14' r='0.7' fill='%23604820' opacity='0.3'/%3E%3Ccircle cx='8' cy='20' r='0.5' fill='%235A4218' opacity='0.4'/%3E%3Ccircle cx='18' cy='24' r='0.8' fill='%23604820' opacity='0.35'/%3E%3Ccircle cx='25' cy='6' r='0.6' fill='%235A4218' opacity='0.3'/%3E%3C/svg%3E") repeat;
}

/* === Wildflower Meadow theme === */
.garden-scene[data-scene-theme="wildflower"] .garden-scene__ground {
  border-top: 1px solid #4A7A2A;
}
.garden-scene[data-scene-theme="wildflower"] .garden-scene__ground-base {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Crect width='48' height='48' fill='%234A7A2A'/%3E%3Ccircle cx='6' cy='8' r='2' fill='%23E8609A' opacity='0.75'/%3E%3Ccircle cx='20' cy='4' r='1.5' fill='%23F0D040' opacity='0.7'/%3E%3Ccircle cx='38' cy='12' r='2.2' fill='%23B050E0' opacity='0.65'/%3E%3Ccircle cx='12' cy='22' r='1.8' fill='%23F0D040' opacity='0.7'/%3E%3Ccircle cx='30' cy='18' r='2' fill='%23E8609A' opacity='0.7'/%3E%3Ccircle cx='44' cy='6' r='1.4' fill='%23F09040' opacity='0.6'/%3E%3Ccircle cx='8' cy='36' r='1.6' fill='%23B050E0' opacity='0.65'/%3E%3Ccircle cx='24' cy='32' r='2.2' fill='%23E8609A' opacity='0.7'/%3E%3Ccircle cx='40' cy='28' r='1.5' fill='%23F0D040' opacity='0.65'/%3E%3Ccircle cx='16' cy='44' r='2' fill='%23F09040' opacity='0.65'/%3E%3Ccircle cx='34' cy='40' r='1.8' fill='%23B050E0' opacity='0.7'/%3E%3Ccircle cx='46' cy='42' r='1.4' fill='%23E8609A' opacity='0.6'/%3E%3Ccircle cx='2' cy='28' r='1.2' fill='%23F0D040' opacity='0.55'/%3E%3C/svg%3E") repeat;
}
.garden-scene[data-scene-theme="wildflower"][data-scene-phase="night"] .garden-scene__ground-base {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Crect width='32' height='32' fill='%232A4A1A'/%3E%3Ccircle cx='4' cy='6' r='1' fill='%23804060' opacity='0.4'/%3E%3Ccircle cx='16' cy='3' r='0.8' fill='%23807030' opacity='0.35'/%3E%3Ccircle cx='28' cy='10' r='0.9' fill='%23604080' opacity='0.35'/%3E%3Ccircle cx='8' cy='20' r='0.7' fill='%23807030' opacity='0.35'/%3E%3Ccircle cx='22' cy='16' r='1' fill='%23804060' opacity='0.35'/%3E%3Ccircle cx='12' cy='28' r='0.8' fill='%23604080' opacity='0.3'/%3E%3C/svg%3E") repeat;
}

/* === Farm theme === */
.garden-scene[data-scene-theme="farm"] .garden-scene__ground {
  border-top: 1px solid #8B6B3A;
}
.garden-scene[data-scene-theme="farm"] .garden-scene__ground-base {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Crect width='30' height='30' fill='%235A3A1A'/%3E%3Cline x1='0' y1='7' x2='30' y2='7' stroke='%236A4A2A' stroke-width='0.5' opacity='0.4'/%3E%3Cline x1='0' y1='15' x2='30' y2='15' stroke='%236A4A2A' stroke-width='0.5' opacity='0.35'/%3E%3Cline x1='0' y1='23' x2='30' y2='23' stroke='%236A4A2A' stroke-width='0.5' opacity='0.4'/%3E%3Ccircle cx='5' cy='4' r='0.4' fill='%234A2A0A' opacity='0.3'/%3E%3Ccircle cx='20' cy='12' r='0.5' fill='%234A2A0A' opacity='0.25'/%3E%3Ccircle cx='12' cy='26' r='0.4' fill='%234A2A0A' opacity='0.3'/%3E%3C/svg%3E") repeat;
}
.garden-scene[data-scene-theme="farm"][data-scene-phase="night"] .garden-scene__ground-base {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Crect width='30' height='30' fill='%232A1A0A'/%3E%3Cline x1='0' y1='7' x2='30' y2='7' stroke='%233A2A1A' stroke-width='0.5' opacity='0.3'/%3E%3Cline x1='0' y1='15' x2='30' y2='15' stroke='%233A2A1A' stroke-width='0.5' opacity='0.25'/%3E%3Cline x1='0' y1='23' x2='30' y2='23' stroke='%233A2A1A' stroke-width='0.5' opacity='0.3'/%3E%3C/svg%3E") repeat;
}

/* === Zen Garden theme === */
.garden-scene[data-scene-theme="zen"] .garden-scene__ground {
  border-top: 1px solid #9A9A8A;
}
.garden-scene[data-scene-theme="zen"] .garden-scene__ground-base {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Crect width='40' height='40' fill='%23D4CFC4'/%3E%3Cpath d='M0 8 Q10 6 20 8 Q30 10 40 8' stroke='%23B8B4A8' stroke-width='0.6' fill='none' opacity='0.5'/%3E%3Cpath d='M0 16 Q10 14 20 16 Q30 18 40 16' stroke='%23B8B4A8' stroke-width='0.6' fill='none' opacity='0.45'/%3E%3Cpath d='M0 24 Q10 22 20 24 Q30 26 40 24' stroke='%23B8B4A8' stroke-width='0.6' fill='none' opacity='0.5'/%3E%3Cpath d='M0 32 Q10 30 20 32 Q30 34 40 32' stroke='%23B8B4A8' stroke-width='0.6' fill='none' opacity='0.4'/%3E%3C/svg%3E") repeat;
}
.garden-scene[data-scene-theme="zen"][data-scene-phase="night"] .garden-scene__ground-base {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Crect width='40' height='40' fill='%23706A60'/%3E%3Cpath d='M0 8 Q10 6 20 8 Q30 10 40 8' stroke='%23605A50' stroke-width='0.6' fill='none' opacity='0.4'/%3E%3Cpath d='M0 16 Q10 14 20 16 Q30 18 40 16' stroke='%23605A50' stroke-width='0.6' fill='none' opacity='0.35'/%3E%3Cpath d='M0 24 Q10 22 20 24 Q30 26 40 24' stroke='%23605A50' stroke-width='0.6' fill='none' opacity='0.4'/%3E%3Cpath d='M0 32 Q10 30 20 32 Q30 34 40 32' stroke='%23605A50' stroke-width='0.6' fill='none' opacity='0.35'/%3E%3C/svg%3E") repeat;
}

/* === Tropical theme === */
.garden-scene[data-scene-theme="tropical"] .garden-scene__ground {
  border-top: 1px solid #C4A860;
}
.garden-scene[data-scene-theme="tropical"] .garden-scene__ground-base {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Crect width='40' height='40' fill='%23D4C090'/%3E%3Ccircle cx='5' cy='8' r='0.5' fill='%23C0A870' opacity='0.4'/%3E%3Ccircle cx='18' cy='3' r='0.4' fill='%23B8A060' opacity='0.35'/%3E%3Ccircle cx='32' cy='12' r='0.5' fill='%23C0A870' opacity='0.4'/%3E%3Ccircle cx='10' cy='22' r='0.4' fill='%23B8A060' opacity='0.3'/%3E%3Ccircle cx='25' cy='28' r='0.5' fill='%23C0A870' opacity='0.35'/%3E%3Ccircle cx='37' cy='35' r='0.4' fill='%23B8A060' opacity='0.4'/%3E%3Ccircle cx='15' cy='36' r='0.3' fill='%23C0A870' opacity='0.3'/%3E%3Ccircle cx='3' cy='32' r='0.4' fill='%23B8A060' opacity='0.35'/%3E%3C/svg%3E") repeat;
}
.garden-scene[data-scene-theme="tropical"][data-scene-phase="night"] .garden-scene__ground-base {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Crect width='40' height='40' fill='%23706040'/%3E%3Ccircle cx='5' cy='8' r='0.5' fill='%23605030' opacity='0.3'/%3E%3Ccircle cx='18' cy='3' r='0.4' fill='%23605030' opacity='0.25'/%3E%3Ccircle cx='32' cy='12' r='0.5' fill='%23605030' opacity='0.3'/%3E%3Ccircle cx='10' cy='22' r='0.4' fill='%23605030' opacity='0.25'/%3E%3C/svg%3E") repeat;
}

/* === Balcony theme === */
.garden-scene[data-scene-theme="balcony"] .garden-scene__ground {
  border-top: 1px solid #5A5A60;
}
.garden-scene[data-scene-theme="balcony"] .garden-scene__ground-base {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Crect width='30' height='30' fill='%23484848'/%3E%3Crect x='0' y='0' width='14' height='14' fill='%23525252' opacity='0.5'/%3E%3Crect x='15' y='15' width='14' height='14' fill='%23525252' opacity='0.5'/%3E%3Cline x1='0' y1='15' x2='30' y2='15' stroke='%23606060' stroke-width='0.8' opacity='0.4'/%3E%3Cline x1='15' y1='0' x2='15' y2='30' stroke='%23606060' stroke-width='0.8' opacity='0.4'/%3E%3C/svg%3E") repeat;
}
.garden-scene[data-scene-theme="balcony"][data-scene-phase="night"] .garden-scene__ground-base {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Crect width='30' height='30' fill='%23282828'/%3E%3Crect x='0' y='0' width='14' height='14' fill='%23303030' opacity='0.5'/%3E%3Crect x='15' y='15' width='14' height='14' fill='%23303030' opacity='0.5'/%3E%3Cline x1='0' y1='15' x2='30' y2='15' stroke='%23383838' stroke-width='0.8' opacity='0.3'/%3E%3Cline x1='15' y1='0' x2='15' y2='30' stroke='%23383838' stroke-width='0.8' opacity='0.3'/%3E%3C/svg%3E") repeat;
}

/* === Forest theme === */
.garden-scene[data-scene-theme="forest"] .garden-scene__ground {
  border-top: 1px solid #1A3A1A;
}
.garden-scene[data-scene-theme="forest"] .garden-scene__ground-base {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Crect width='36' height='36' fill='%231A3018'/%3E%3Ccircle cx='8' cy='6' r='0.7' fill='%23254020' opacity='0.5'/%3E%3Ccircle cx='24' cy='14' r='0.6' fill='%23203A1A' opacity='0.4'/%3E%3Ccircle cx='14' cy='28' r='0.8' fill='%23254020' opacity='0.45'/%3E%3Ccircle cx='30' cy='32' r='0.5' fill='%23203A1A' opacity='0.4'/%3E%3Cpath d='M4 20 Q6 18 8 20' stroke='%23305028' stroke-width='0.7' fill='none' opacity='0.35'/%3E%3Cpath d='M20 8 Q22 6 24 8' stroke='%23305028' stroke-width='0.6' fill='none' opacity='0.3'/%3E%3Cpath d='M28 24 Q30 22 32 24' stroke='%23305028' stroke-width='0.6' fill='none' opacity='0.3'/%3E%3C/svg%3E") repeat;
}
.garden-scene[data-scene-theme="forest"][data-scene-phase="night"] .garden-scene__ground-base {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Crect width='36' height='36' fill='%230A1A08'/%3E%3Ccircle cx='8' cy='6' r='0.7' fill='%23152A12' opacity='0.4'/%3E%3Ccircle cx='24' cy='14' r='0.6' fill='%23102010' opacity='0.3'/%3E%3Ccircle cx='14' cy='28' r='0.8' fill='%23152A12' opacity='0.35'/%3E%3C/svg%3E") repeat;
}

/* === Cottage theme === */
.garden-scene[data-scene-theme="cottage"] .garden-scene__ground {
  border-top: 1px solid #5A7A2A;
}
.garden-scene[data-scene-theme="cottage"] .garden-scene__ground-base {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Crect width='48' height='48' fill='%234A7A30'/%3E%3Ccircle cx='6' cy='8' r='2.2' fill='%23E8609A' opacity='0.5'/%3E%3Ccircle cx='24' cy='4' r='1.8' fill='%23F0D040' opacity='0.45'/%3E%3Ccircle cx='40' cy='12' r='2.0' fill='%23B050E0' opacity='0.45'/%3E%3Ccircle cx='14' cy='22' r='2.4' fill='%23F09040' opacity='0.5'/%3E%3Ccircle cx='34' cy='28' r='1.6' fill='%23FFFFFF' opacity='0.4'/%3E%3Ccircle cx='8' cy='38' r='2.0' fill='%23E8609A' opacity='0.45'/%3E%3Ccircle cx='28' cy='40' r='2.2' fill='%23F0D040' opacity='0.5'/%3E%3Ccircle cx='44' cy='36' r='1.8' fill='%23B050E0' opacity='0.45'/%3E%3Ccircle cx='18' cy='14' r='1.5' fill='%23FFFFFF' opacity='0.35'/%3E%3Ccircle cx='38' cy='20' r='2.0' fill='%23E8609A' opacity='0.45'/%3E%3Ccircle cx='4' cy='26' r='1.6' fill='%23F09040' opacity='0.4'/%3E%3Ccircle cx='46' cy='4' r='1.4' fill='%2360A840' opacity='0.3'/%3E%3Ccircle cx='20' cy='34' r='1.5' fill='%2360A840' opacity='0.3'/%3E%3Ccircle cx='42' cy='44' r='1.6' fill='%2360A840' opacity='0.25'/%3E%3C/svg%3E") repeat;
}
.garden-scene[data-scene-theme="cottage"][data-scene-phase="night"] .garden-scene__ground-base {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Crect width='48' height='48' fill='%23263A18'/%3E%3Ccircle cx='6' cy='8' r='2.2' fill='%23804060' opacity='0.3'/%3E%3Ccircle cx='24' cy='4' r='1.8' fill='%23806020' opacity='0.25'/%3E%3Ccircle cx='40' cy='12' r='2.0' fill='%23603080' opacity='0.25'/%3E%3Ccircle cx='14' cy='22' r='2.4' fill='%23804020' opacity='0.3'/%3E%3Ccircle cx='34' cy='28' r='1.6' fill='%23808080' opacity='0.2'/%3E%3Ccircle cx='8' cy='38' r='2.0' fill='%23804060' opacity='0.25'/%3E%3Ccircle cx='28' cy='40' r='2.2' fill='%23806020' opacity='0.25'/%3E%3C/svg%3E") repeat;
}

/* === Wildlife creatures (spawned by JS) === */
.garden-scene__creature {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 16;
  will-change: transform, opacity;
}
.garden-scene__creature--ground {
  z-index: 14;
}

@keyframes creature-hop {
  0%   { transform: translate(0, 0); opacity: 0; }
  3%   { opacity: 1; }
  10%  { transform: translate(12%, 0); }
  15%  { transform: translate(18%, -12px); }
  20%  { transform: translate(24%, 0); }
  25%  { transform: translate(24%, 0) rotate(15deg); }
  30%  { transform: translate(24%, 0) rotate(0deg); }
  35%  { transform: translate(30%, 0); }
  40%  { transform: translate(36%, -10px); }
  45%  { transform: translate(42%, 0); }
  50%  { transform: translate(42%, 0) rotate(12deg); }
  55%  { transform: translate(42%, 0) rotate(0deg); }
  60%  { transform: translate(48%, 0); }
  65%  { transform: translate(54%, -14px); }
  70%  { transform: translate(60%, 0); }
  75%  { transform: translate(60%, 0) rotate(10deg); }
  80%  { transform: translate(60%, 0); }
  85%  { transform: translate(60%, -20px); }
  90%  { transform: translate(65%, -40px); opacity: 0.6; }
  95%  { transform: translate(70%, -60px); opacity: 0.3; }
  100% { transform: translate(75%, -80px); opacity: 0; }
}

@keyframes creature-poke {
  0%   { transform: translateY(100%); opacity: 0; }
  10%  { transform: translateY(20%); opacity: 1; }
  20%  { transform: translateY(25%) rotate(3deg); }
  30%  { transform: translateY(20%) rotate(-3deg); }
  40%  { transform: translateY(22%) rotate(2deg); }
  50%  { transform: translateY(20%) rotate(-2deg); }
  60%  { transform: translateY(22%) rotate(1deg); }
  70%  { transform: translateY(20%); opacity: 1; }
  85%  { transform: translateY(60%); opacity: 0.5; }
  100% { transform: translateY(100%); opacity: 0; }
}


/* === Rain drops === */
.garden-scene__rain {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 4;
}
.garden-scene__raindrop {
  position: absolute;
  top: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(174, 194, 224, 0.6));
  animation: raindrop-fall linear infinite backwards;
}
.garden-scene[data-scene-phase="dawn"] .garden-scene__raindrop,
.garden-scene[data-scene-phase="dusk"] .garden-scene__raindrop {
  background: linear-gradient(180deg, transparent, rgba(200, 210, 230, 0.75));
}
.garden-scene[data-scene-phase="night"] .garden-scene__raindrop {
  background: linear-gradient(180deg, transparent, rgba(140, 170, 210, 0.7));
}
@keyframes raindrop-fall {
  0%   { transform: translateY(-20px) translateX(0); opacity: 0; }
  3%   { opacity: var(--drop-opacity, 0.7); }
  100% { transform: translateY(250px) translateX(8px); opacity: 0; }
}

/* === Rain ripples === */
.garden-scene__ripples {
  position: absolute;
  bottom: 8%;
  left: 0;
  right: 0;
  height: 10%;
  pointer-events: none;
  z-index: 5;
}
.garden-scene__ripple {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  transform: translate(-50%, 50%);
  animation: ripple-expand 1.2s ease-out infinite;
}
@keyframes ripple-expand {
  0%   { width: 0; height: 0; opacity: 0.7; }
  100% { width: 32px; height: 14px; opacity: 0; }
}

/* === Lightning flash === */
.garden-scene__lightning {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 18;
  opacity: 0;
  background: linear-gradient(180deg, rgba(200, 220, 255, 0.4) 0%, transparent 70%);
}
@keyframes lightning-flash {
  0%   { opacity: 0; }
  6%   { opacity: 0.6; }
  14%  { opacity: 0.05; }
  22%  { opacity: 0.4; }
  32%  { opacity: 0; }
  100% { opacity: 0; }
}
.garden-scene__lightning--active {
  animation: lightning-flash 0.6s ease-out forwards;
}

/* === Stars === */
.garden-scene__stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.garden-scene__star {
  position: absolute;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 244, 255, 0.95), transparent);
  box-shadow: 0 0 5px 1px rgba(200, 215, 255, 0.35);
  opacity: var(--star-opacity, 0.7);
  animation: star-twinkle 6s ease-in-out infinite;
}
@keyframes star-twinkle {
  0%, 100% { opacity: var(--star-opacity, 0.7); }
  50%      { opacity: calc(var(--star-opacity, 0.7) * 0.4); }
}
@media (prefers-reduced-motion: reduce) {
  .garden-scene__star { animation: none; }
}

/* === Snowflakes === */
.garden-scene__snow {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
}
.garden-scene__snowflake {
  position: absolute;
  top: 0;
  width: 4px;
  height: 4px;
  background: var(--scene-particle);
  border-radius: 50%;
  animation: snowflake-fall linear infinite backwards;
}
@keyframes snowflake-fall {
  0%   { transform: translateY(-10px) translateX(0); opacity: 0; }
  10%  { opacity: 0.8; }
  100% { transform: translateY(280px) translateX(20px); opacity: 0; }
}

/* === Falling leaves === */
.garden-scene__leaf {
  position: absolute;
  width: 12px;
  height: 16px;
  background: #8B6914;
  border-radius: 2px 50% 50% 50%;
  pointer-events: none;
  opacity: 0;
  z-index: 14;
  animation: leaf-fall linear forwards;
}
@keyframes leaf-fall {
  0%   { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
  5%   { opacity: 0.7; }
  25%  { transform: translateY(25px) translateX(10px) rotate(90deg); opacity: 0.65; }
  50%  { transform: translateY(50px) translateX(-6px) rotate(200deg); opacity: 0.55; }
  75%  { transform: translateY(70px) translateX(10px) rotate(310deg); opacity: 0.35; }
  100% { transform: translateY(85px) translateX(4px) rotate(380deg); opacity: 0; }
}

/* Pan mode: creatures ride in the viewport. No z-index on either, so the
   creatures still stack with the weather effects (z 14-16). */
.garden-scene__creatures {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}
.garden-scene__creature-anchor {
  position: absolute;
  top: 0;
  height: 100%;
}

/* === Fireflies (night only) === */
.garden-scene__fireflies {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  z-index: 40;
  pointer-events: none;
}
.garden-scene__firefly {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 220, 80, 0.9), transparent);
  box-shadow: 0 0 6px 2px rgba(255, 220, 80, 0.4);
  pointer-events: none;
  animation: firefly-drift ease-in-out infinite alternate, firefly-glow ease-in-out infinite;
}
/* A wall turn's new fireflies in Firefox, still until the ambient clock takes them on (walls.js). */
.garden-scene__fireflies--held .garden-scene__firefly {
  animation-play-state: paused;
}
@keyframes firefly-drift {
  0%   { translate: 0 0; }
  25%  { translate: 20px -15px; }
  50%  { translate: -10px -25px; }
  75%  { translate: 15px -10px; }
  100% { translate: -15px -20px; }
}
@keyframes firefly-glow {
  0%   { opacity: 0; }
  15%  { opacity: 0.9; }
  50%  { opacity: 0.3; }
  85%  { opacity: 0.8; }
  100% { opacity: 0; }
}

/* === Accessibility: reduced motion === */
@media (prefers-reduced-motion: reduce) {
  .garden-scene__creature,
  .garden-scene__raindrop,
  .garden-scene__ripple,
  .garden-scene__snowflake,
  .garden-scene__cloud,
  .garden-scene__firefly,
  .garden-scene__lightning--active,
  .garden-scene__leaf { animation: none; }
}

/* === Shuffle button === */
#garden-scene-shuffle svg {
  transition: transform 0.4s ease;
}
#garden-scene-shuffle.is-spinning svg {
  transform: rotate(180deg);
}

@keyframes gardenFilterFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.garden-scene-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
  line-height: 1.4;
}

.garden-scene-filter-pill--active {
  background: rgba(16, 185, 129, 0.8);
  color: #fff;
}

.garden-scene-filter-pill--inactive {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.35);
  text-decoration: line-through;
}

.garden-scene-filter-pill:hover {
  transform: scale(1.04);
}

.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-filter-pill--inactive {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.35);
}

.garden-scene__empty-filter {
  position: absolute;
  top: 40%;
  left: 50%;
  z-index: 30;
  transform: translate(-50%, -50%);
  font-size: 14px;
  color: rgba(0, 0, 0, 0.4);
  font-style: italic;
  pointer-events: none;
}
[data-scene-phase="night"] .garden-scene__empty-filter {
  color: rgba(255, 255, 255, 0.4);
}

/* === Loading Shimmer === */
/* Fills #garden-scene (already at its final height) until the engine mounts. */
.garden-scene-shimmer {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(180deg, #e2ecf5 0%, #d4e8f5 60%, #c8dce8 100%);
}
.garden-scene-shimmer__sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 25%, rgba(255,255,255,0.4) 50%, transparent 75%);
  background-size: 200% 100%;
  animation: garden-scene-shimmer-sweep 1.5s ease-in-out infinite;
}
.garden-scene-shimmer__ground {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: #c4d4b8;
  border-radius: 60% 60% 0 0 / 30% 30% 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 0 10%;
}
.garden-scene-shimmer__plant {
  width: 12%;
  background: #a8c49a;
  border-radius: 40% 40% 4px 4px;
  opacity: 0.6;
  animation: garden-scene-shimmer-sweep 1.5s ease-in-out infinite;
  background-image: linear-gradient(90deg, transparent 25%, rgba(255,255,255,0.3) 50%, transparent 75%);
  background-size: 200% 100%;
}
.garden-scene-shimmer__plant--1 { height: 45%; animation-delay: 0s; }
.garden-scene-shimmer__plant--2 { height: 65%; animation-delay: 0.1s; }
.garden-scene-shimmer__plant--3 { height: 80%; animation-delay: 0.2s; }
.garden-scene-shimmer__plant--4 { height: 55%; animation-delay: 0.3s; }
.garden-scene-shimmer__plant--5 { height: 40%; animation-delay: 0.4s; }

@keyframes garden-scene-shimmer-sweep {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@media (prefers-color-scheme: dark) {
  .garden-scene-shimmer {
    background: linear-gradient(180deg, #1a2a3a 0%, #1e3050 60%, #1a2840 100%);
  }
  .garden-scene-shimmer__ground {
    background: #2a3a28;
  }
  .garden-scene-shimmer__plant {
    background-color: #3a5035;
    background-image: linear-gradient(90deg, transparent 25%, rgba(255,255,255,0.1) 50%, transparent 75%);
  }
  .garden-scene-shimmer__sky {
    background: linear-gradient(90deg, transparent 25%, rgba(255,255,255,0.08) 50%, transparent 75%);
    background-size: 200% 100%;
  }
}

/* === Settings panel ===
   Appended to the wrapper (outside #garden-scene), so the night variants
   look at the scene through :has(). Sits above the bottom-right toolbar. */
.garden-scene-settings-panel {
  position: absolute;
  bottom: 54px;
  right: 8px;
  z-index: 46;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  width: min(320px, calc(100% - 16px));
  min-width: 220px;
  /* Rises above the scene over the page; settings.js placeSettingsPanel sets the
     room (about 70vh) after scrolling the card's foot into view. */
  display: flex;
  flex-direction: column;
  max-height: var(--gs-panel-max, max(calc(100% - 64px), min(400px, calc(100vh - 140px))));
  overflow: hidden;
  animation: gardenFilterFadeIn 0.15s ease-out;
}
/* Rows scroll inside the panel's inset; the edge with more rows past it fades. */
.garden-scene-settings-panel__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 14px;
  --gs-fade-top: 0px;
  --gs-fade-bottom: 0px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--gs-fade-top), #000 calc(100% - var(--gs-fade-bottom)), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 var(--gs-fade-top), #000 calc(100% - var(--gs-fade-bottom)), transparent 100%);
}
.garden-scene-settings-panel--fade-top .garden-scene-settings-panel__body {
  --gs-fade-top: 22px;
}
.garden-scene-settings-panel--fade-bottom .garden-scene-settings-panel__body {
  --gs-fade-bottom: 28px;
}
/* Balcony composition: rows it ignores, and the one hint that says so */
.garden-scene-settings-panel__section--inert .garden-scene-theme-pill:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}
.garden-scene-settings-panel__hint {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.55);
}
/* Phones: a bottom sheet under the scene (settings.js scrolls the scene up under
   the header first), so the scene stays in view while options change it. */
.garden-scene-settings-panel--sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  max-width: none;
  z-index: 60;
  border-radius: 16px 16px 0 0;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.16);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  max-height: var(--gs-panel-max, 55vh);
  animation: gardenSheetIn 0.2s ease-out;
}
@keyframes gardenSheetIn {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.garden-scene-settings-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 0 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.garden-scene-settings-panel__title {
  font-size: 15px;
  font-weight: 600;
  color: #164825;
}
.garden-scene-settings-panel__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: rgba(0, 0, 0, 0.55);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.garden-scene-settings-panel__close::before {
  content: "\00D7";
}
.garden-scene-settings-panel--sheet .garden-scene-settings-panel__body {
  padding: 12px 16px 16px;
}

/* Reset at the foot (also the Hidden / Pinned rows) */
.garden-scene-settings-panel__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.garden-scene-settings-panel__reset {
  padding: 3px 4px;
  border: 0;
  background: none;
  font-size: 12px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.55);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.garden-scene-settings-panel__reset:hover {
  color: rgba(0, 0, 0, 0.8);
}
/* "Hidden from the scene: N" + "Show all": the way back after "Hide from scene" */
.garden-scene-settings-panel__hidden-label {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.7);
  font-variant-numeric: tabular-nums;
}
.garden-scene-settings-panel__show-all {
  flex: none;
  min-height: 36px;
  padding: 6px 12px;
  border: 0;
  border-radius: 18px;
  background: rgba(22, 72, 37, 0.08);
  color: #164825;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.garden-scene-settings-panel__show-all:hover {
  background: rgba(22, 72, 37, 0.14);
}
/* Panel actions (phones: Share and Shuffle move here from the toolbar) */
.garden-scene-settings-panel__actions {
  display: flex;
  flex-direction: column;
  padding-top: 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.garden-scene-settings-panel__action {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 6px 2px;
  border: 0;
  background: none;
  color: rgba(0, 0, 0, 0.7);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.garden-scene-settings-panel__action:hover {
  color: rgba(0, 0, 0, 0.9);
}
.garden-scene-settings-panel__action svg {
  flex: none;
  width: 16px;
  height: 16px;
}
.garden-scene-settings-panel button:focus-visible {
  outline: 2px solid #164825;
  outline-offset: 2px;
}

.garden-scene-settings-panel__section {
  margin-bottom: 8px;
}
.garden-scene-settings-panel__section:last-child {
  margin-bottom: 0;
}

.garden-scene-settings-panel__label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(0, 0, 0, 0.45);
  margin-bottom: 5px;
}

/* Theme pills row */
/* Pills wrap (no hidden horizontal scroll), so every theme and the active one stay visible. */
.garden-scene-settings-panel__themes {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-bottom: 2px;
}
.garden-scene-settings-panel__themes::-webkit-scrollbar {
  display: none;
}

.garden-scene-theme-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.6);
}
.garden-scene-theme-pill--active {
  background: rgba(16, 185, 129, 0.8);
  /* Fixed white: the panel is scene art, not a theme surface. */
  color: #fff;
}
.garden-scene-theme-pill:hover {
  transform: scale(1.04);
}

/* Filter pills row (reuses existing pill styles) */
.garden-scene-settings-panel__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* Option groups (settings.js PANEL_GROUPS): a title, then its rows */
.garden-scene-settings-panel__group {
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.garden-scene-settings-panel__group:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}
.garden-scene-settings-panel__group-title {
  font-size: 12px;
  font-weight: 600;
  color: #164825;
  margin-bottom: 6px;
}
/* "Style · Custom": the options match no preset */
.garden-scene-settings-panel__custom::before {
  content: "\00B7";
  margin: 0 5px;
}
.garden-scene-settings-panel__custom {
  color: #0F8A61;
}
/* "More options": everything past the common tweaks, folded */
.garden-scene-settings-panel__more {
  margin-bottom: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.garden-scene-settings-panel__more-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 4px 2px;
  font-size: 13px;
  font-weight: 600;
  color: #164825;
  cursor: pointer;
  list-style: none;
}
.garden-scene-settings-panel__more-summary::-webkit-details-marker {
  display: none;
}
.garden-scene-settings-panel__more-summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.15s ease;
}
.garden-scene-settings-panel__more[open] > .garden-scene-settings-panel__more-summary::after {
  transform: rotate(-135deg) translateY(-2px);
}
.garden-scene-settings-panel__more-summary:focus-visible {
  outline: 2px solid #164825;
  outline-offset: 2px;
}
.garden-scene-settings-panel__more > .garden-scene-settings-panel__group:first-of-type {
  padding-top: 4px;
  margin-top: 0;
  border-top: 0;
}

/* On/off options (settings.js switchRow): label left, a small track right */
.garden-scene-settings-panel__switches {
  display: flex;
  flex-direction: column;
  padding-top: 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.garden-scene-settings-panel__switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 32px;
  padding: 4px 2px;
  border: 0;
  background: none;
  color: rgba(0, 0, 0, 0.7);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.garden-scene-settings-panel__switch:disabled {
  opacity: 0.45;
  cursor: default;
}
.garden-scene-settings-panel__switch-track {
  position: relative;
  flex: none;
  width: 30px;
  height: 18px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.18);
  transition: background-color 0.15s ease;
}
.garden-scene-settings-panel__switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease;
}
.garden-scene-settings-panel__switch[aria-checked="true"] .garden-scene-settings-panel__switch-track {
  background: rgba(16, 185, 129, 0.8);
}
.garden-scene-settings-panel__switch[aria-checked="true"] .garden-scene-settings-panel__switch-track::after {
  transform: translateX(12px);
}

/* Night mode */
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-settings-panel__switches {
  border-top-color: rgba(255, 255, 255, 0.1);
}
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-settings-panel__switch {
  color: rgba(255, 255, 255, 0.75);
}
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-settings-panel__switch-track {
  background: rgba(255, 255, 255, 0.2);
}
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-settings-panel {
  background: rgba(30, 30, 50, 0.85);
}
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-settings-panel--sheet {
  background: rgba(30, 30, 50, 0.95);
}
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-settings-panel__label {
  color: rgba(255, 255, 255, 0.45);
}
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-settings-panel__head {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-settings-panel__title {
  color: #6EE7B7;
}
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-settings-panel__close,
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-settings-panel__hint {
  color: rgba(255, 255, 255, 0.6);
}
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-theme-pill {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
}
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-theme-pill--active {
  background: rgba(16, 185, 129, 0.8);
  color: #fff;
}
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-settings-panel__row {
  border-top-color: rgba(255, 255, 255, 0.1);
}
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-settings-panel__reset {
  color: rgba(255, 255, 255, 0.6);
}
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-settings-panel__hidden-label {
  color: rgba(255, 255, 255, 0.75);
}
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-settings-panel__show-all {
  background: rgba(16, 185, 129, 0.2);
  color: #fff;
}
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-settings-panel__actions {
  border-top-color: rgba(255, 255, 255, 0.1);
}
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-settings-panel__action {
  color: rgba(255, 255, 255, 0.75);
}
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-settings-panel__action:hover {
  color: #fff;
}
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-settings-panel__group,
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-settings-panel__more {
  border-top-color: rgba(255, 255, 255, 0.1);
}
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-settings-panel__group-title,
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-settings-panel__more-summary {
  color: #6EE7B7;
}
.garden-scene-wrapper:has(> .garden-scene[data-scene-phase="night"]) .garden-scene-settings-panel__custom {
  color: #6EE7B7;
}

/* ==========================================================================
   v2 engine layers (garden/js/garden_scene/render.js)

   Stacking inside #garden-scene (isolated):
     __sky        z 0   sun, moon, stars, clouds, painted horizon
     __viewport   -     scroll container in pan mode; no z-index, so its
                        children stack with the weather effects
       __stage    z 1   ground, tufts, soil patch, shadows, units, leaves
       __marks    z 40  "!" stakes, "×N" badges, name tags: above the weather
     __weather    -     NO z-index: rain z 4, creatures z 14-16, golden glow
                        z 15, moon/sun wash z 17 (mix-blend-mode must reach
                        the stage), lightning z 18
     ::after      z 20  inner vignette
     __chips z 45, __chev z 46
   ========================================================================== */
.garden-scene {
  user-select: none;
  -webkit-user-select: none;
}
.garden-scene__sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.garden-scene__viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  scrollbar-width: none;
}
.garden-scene__viewport::-webkit-scrollbar {
  display: none;
}
.garden-scene__viewport.is-pan {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  cursor: grab;
}
.garden-scene__viewport.is-pan.is-dragging {
  cursor: grabbing;
}
.garden-scene__viewport.is-dragging .garden-scene__sprite {
  cursor: grabbing;
}
.garden-scene__stage,
.garden-scene__marks {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 100%;
}
.garden-scene__stage {
  z-index: 1;
}
.garden-scene__marks {
  z-index: 40;
  pointer-events: none;
}
.garden-scene__weather {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
/* Falling leaves start in the canopy: draw them in front of the sprites. */
.garden-scene__stage .garden-scene__leaf {
  z-index: 3000;
}

/* --- Ground decor ------------------------------------------------------- */
.garden-scene__shadow,
.garden-scene__patch {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, 50%);
  pointer-events: none;
}
/* Soft contact shadow under each plant and clump */
.garden-scene__shadow {
  background: radial-gradient(closest-side, rgba(30, 45, 20, 0.30), rgba(30, 45, 20, 0.12) 55%, rgba(30, 45, 20, 0));
}
.garden-scene[data-scene-phase="night"] .garden-scene__shadow,
.garden-scene[data-scene-weather="fog"] .garden-scene__shadow,
.garden-scene[data-scene-weather="overcast"] .garden-scene__shadow {
  opacity: 0.6;
}
/* Soil patch under the veg zone */
.garden-scene__patch {
  background:
    radial-gradient(ellipse at 50% 35%, rgba(255, 235, 210, 0.10), rgba(0, 0, 0, 0) 60%),
    radial-gradient(ellipse at 50% 40%, #6f5038, #5c4029 68%, #4e3522);
  box-shadow: 0 calc(0.35 * var(--u, 3px)) 0 rgba(70, 50, 30, 0.35),
              inset 0 calc(0.5 * var(--u, 3px)) calc(1 * var(--u, 3px)) rgba(255, 240, 220, 0.12);
}
.garden-scene[data-scene-phase="night"] .garden-scene__patch {
  filter: brightness(0.5) saturate(0.6);
}
.garden-scene[data-scene-phase="dawn"] .garden-scene__patch,
.garden-scene[data-scene-phase="dusk"] .garden-scene__patch {
  filter: brightness(0.8) sepia(0.15);
}
/* --- Designer beds, pots and the patio (Phase 2) ----------------------
   Beds and pots sit in the same light as the plants (--gs-tone). A bed box
   carries no z-index, so its back (rim, soil), plants and face interleave
   with the neighbouring units by their own z. */
.garden-scene__bed {
  position: absolute;
  pointer-events: none;
}
.garden-scene__bed-back,
.garden-scene__bed-face {
  position: absolute;
  left: 0;
  line-height: 0;
  pointer-events: none;
  filter: var(--gs-tone);
}
.garden-scene__bed-face {
  bottom: 0;
}
.garden-scene__bed-back svg,
.garden-scene__bed-face svg {
  display: block;
  overflow: visible;
}
/* Name plate on the bed face: always on, small and quiet (Decision 33). */
.garden-scene__bed-plate {
  position: absolute;
  max-width: calc(100% - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateY(50%);
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
  opacity: 0.92;
  pointer-events: none;
  font: 600 clamp(9px, 2.5 * var(--u, 3px), 12px)/1.2 Georgia, "Times New Roman", serif;
  letter-spacing: 0.02em;
  filter: var(--gs-tone);
}
.garden-scene__bed-plate small {
  margin-left: 4px;
  font: 500 0.9em/1.2 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  opacity: 0.75;
}
.garden-scene__bed-plate--wood,
.garden-scene__bed-plate--flat {
  background: #f4ead5;
  color: #4a3420;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(90, 60, 30, 0.18);
}
.garden-scene__bed-plate--stone {
  background: linear-gradient(180deg, #d7b56a, #b38c3e);
  color: #3d2c0c;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}
.garden-scene__bed-plate--metal {
  background: #2f3a36;
  color: #eef2ec;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(8.5px, 2.3 * var(--u, 3px), 11px);
  letter-spacing: 0.04em;
}
.garden-scene__bed-plate--brick {
  background: #efe2cf;
  color: #5a2e1f;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(120, 60, 40, 0.2);
}

/* Tappable beds and pots on the dashboard (place card). A bed's box is the
   button but only its drawn parts take the pointer, so the plants standing
   in it keep their own taps; a pot gets a clear hit box over its body. No
   z-index on the bed button: its parts keep interleaving by their own z. */
.garden-scene__place {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.garden-scene__bed.garden-scene__place .garden-scene__bed-back,
.garden-scene__bed.garden-scene__place .garden-scene__bed-face,
.garden-scene__bed.garden-scene__place .garden-scene__bed-plate {
  pointer-events: auto;
}
.garden-scene__pot-place {
  position: absolute;
  pointer-events: auto;
  border-radius: 6px;
}
.garden-scene__place:focus {
  outline: none;
}
.garden-scene__place:focus-visible {
  outline: 2px dashed rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
}
.garden-scene__bed.garden-scene__place.is-active .garden-scene__bed-face,
.garden-scene__bed.garden-scene__place.is-glow .garden-scene__bed-face {
  filter: var(--gs-tone) brightness(1.08);
}

/* Pots: back layer (rim top, soil) behind the plants, front layer (body) over their stems. */
.garden-scene__pot-back,
.garden-scene__pot-front {
  position: absolute;
  line-height: 0;
  pointer-events: auto;
  cursor: pointer;
  filter: var(--gs-tone);
  transition: filter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.garden-scene__pot-front {
  filter: var(--gs-tone) var(--gs-shade);
}
.garden-scene__pot-back svg,
.garden-scene__pot-front svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.garden-scene__pot-front.is-glow,
.garden-scene__pot-front.is-active {
  filter: var(--gs-tone) var(--gs-glow);
  transition: filter 0.15s cubic-bezier(0.16, 1, 0.3, 1), scale 0.2s, translate 0.2s;
}
/* The pot lifts with its plants. Both layers share one box and origin, so
   the rim and body stay aligned while scaled. */
.garden-scene__pot-back,
.garden-scene__pot-front {
  transform-origin: bottom center;
}
.garden-scene__pot-back {
  transition: filter 0.4s cubic-bezier(0.4, 0, 0.2, 1), scale 0.2s, translate 0.2s;
}
.garden-scene__pot-back.is-glow,
.garden-scene__pot-back.is-active,
.garden-scene__pot-front.is-glow,
.garden-scene__pot-front.is-active {
  scale: 1.04;
  translate: 0 -2px;
}
.garden-scene__unit:active .garden-scene__pot-back,
.garden-scene__unit:active .garden-scene__pot-front {
  scale: 0.97;
}
@media (prefers-reduced-motion: reduce) {
  .garden-scene__pot-back.is-glow,
  .garden-scene__pot-back.is-active,
  .garden-scene__pot-front.is-glow,
  .garden-scene__pot-front.is-active { scale: none; translate: none; }
}

/* Patio / deck strip in front of the ground: wooden boards with a lit front edge. */
.garden-scene__patio {
  position: absolute;
  bottom: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(80, 50, 25, 0.3) 0, rgba(255, 255, 255, 0.14) 5%, transparent 20%, transparent 72%, rgba(60, 35, 20, 0.16)),
    repeating-linear-gradient(90deg, rgba(92, 62, 36, 0.32) 0 1px, transparent 1px calc(17 * var(--u, 3px))),
    repeating-linear-gradient(180deg, transparent 0 calc(3 * var(--u, 3px) - 1px), rgba(92, 62, 36, 0.28) calc(3 * var(--u, 3px) - 1px) calc(3 * var(--u, 3px))),
    #b99c7c;
  filter: var(--gs-tone);
}
.garden-scene__patio::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: calc(1.2 * var(--u, 3px));
  background: linear-gradient(180deg, #b88d62, #94683f);
  box-shadow: 0 2px 3px rgba(60, 35, 15, 0.25);
}
/* A pot run's patio (depth rows) is paving laid in the ground: seen in the
   scene's perspective, narrower at the back like a bed's top, with no raised
   edge (a short deck with one read as a plinth under the pot, owner). */
.garden-scene__patio--patch {
  clip-path: polygon(calc(2 * var(--u, 3px)) 0, calc(100% - 2 * var(--u, 3px)) 0, 100% 100%, 0 100%);
}
.garden-scene__patio--patch::before {
  height: calc(0.5 * var(--u, 3px));
  background: rgba(92, 62, 36, 0.35);
  box-shadow: none;
}

/* Balcony (Phase 3): deck floor instead of the lawn, painted skyline, crane
   and a light railing behind the pots; all in the plants' light. */
.garden-scene[data-scene-theme] .garden-scene__ground--deck {
  border-top: 0;
}
.garden-scene[data-scene-theme] .garden-scene__ground--deck .garden-scene__ground-base {
  animation: none;
  background:
    linear-gradient(180deg, rgba(80, 50, 25, 0.28) 0, rgba(255, 255, 255, 0.14) 4%, transparent 18%, transparent 75%, rgba(60, 35, 20, 0.18)),
    repeating-linear-gradient(90deg, rgba(92, 62, 36, 0.3) 0 1px, transparent 1px calc(19 * var(--u, 3px))),
    repeating-linear-gradient(180deg, transparent 0 calc(3.2 * var(--u, 3px) - 1px), rgba(92, 62, 36, 0.26) calc(3.2 * var(--u, 3px) - 1px) calc(3.2 * var(--u, 3px))),
    #bf9a72;
  filter: var(--gs-tone);
}
.garden-scene[data-scene-theme] .garden-scene__ground--deck .garden-scene__ground-highlight {
  display: none;
}
.garden-scene__balcony-skyline,
.garden-scene__balcony-railing {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}
/* Lighter than the first mockup: a pale rail that reads as distance, not a wall. */
.garden-scene__balcony-railing {
  background-repeat: repeat-x;
  background-position: left bottom;
  background-size: auto 100%;
  opacity: 0.72;
  filter: var(--gs-tone) brightness(1.35) saturate(0.7);
}
.garden-scene__balcony-crane {
  position: absolute;
  transform: translateX(-50%);
  pointer-events: none;
}
/* Balcony skyline and crane (the pots-only stage and the balcony theme's
   horizon): solid, so the sun, moon and clouds go behind them as behind real
   buildings, and hazed toward the sky instead of see-through (owner,
   2026-10-25). The frame's own background is the card's sky gradient
   (--gs-sky, lined up with the card by --gs-sky-h / --gs-sky-y, render.js
   alignSkyHaze); the art sits on it and a veil of the same sky over that at
   --gs-haze. A mask of the art cuts all three to its shape; it is stacked
   four times because the far towers are painted at ~80% alpha, which would
   let the sun through. So the towers take the colour the sky has behind
   them, in every phase and weather, without the sun or clouds showing. */
.garden-scene__hazed {
  background: var(--gs-sky) left var(--gs-sky-y, 0px) / 100% var(--gs-sky-h, 100%) no-repeat;
  -webkit-mask-image: var(--gs-art), var(--gs-art), var(--gs-art), var(--gs-art);
  mask-image: var(--gs-art), var(--gs-art), var(--gs-art), var(--gs-art);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: left bottom;
  mask-position: left bottom;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}
.garden-scene__hazed-art {
  display: block;
  height: 100%;
  width: auto;
  filter: var(--gs-tone);
}
.garden-scene__hazed-veil {
  position: absolute;
  inset: 0;
  background: var(--gs-sky) left var(--gs-sky-y, 0px) / 100% var(--gs-sky-h, 100%) no-repeat;
  opacity: var(--gs-haze);
}
/* The city's lower half also hazes over the narrow gaps between its towers
   (the fifth mask layer), so the sun and clouds don't peek through them in
   slivers; up there the gaps fade back to open sky. */
.garden-scene__horizon-skyline.garden-scene__hazed {
  -webkit-mask-image: var(--gs-art), var(--gs-art), var(--gs-art), var(--gs-art), linear-gradient(to top, #000 45%, transparent 75%);
  mask-image: var(--gs-art), var(--gs-art), var(--gs-art), var(--gs-art), linear-gradient(to top, #000 45%, transparent 75%);
}
/* The stage's skyline is one band, the art tiled along it. */
.garden-scene__balcony-skyline.garden-scene__hazed {
  -webkit-mask-image: var(--gs-art), var(--gs-art), var(--gs-art), var(--gs-art), linear-gradient(to top, #000 45%, transparent 75%);
  mask-image: var(--gs-art), var(--gs-art), var(--gs-art), var(--gs-art), linear-gradient(to top, #000 45%, transparent 75%);
  -webkit-mask-repeat: repeat-x, repeat-x, repeat-x, repeat-x, no-repeat;
  mask-repeat: repeat-x, repeat-x, repeat-x, repeat-x, no-repeat;
  -webkit-mask-size: auto 100%, auto 100%, auto 100%, auto 100%, 100% 100%;
  mask-size: auto 100%, auto 100%, auto 100%, auto 100%, 100% 100%;
}
.garden-scene__balcony-skyline .garden-scene__hazed-art {
  position: absolute;
  inset: 0;
  background: var(--gs-art) left bottom / auto 100% repeat-x;
}
/* The balcony theme's horizon: the hazed towers and crane are solid, the
   railing keeps the horizon's old fade per phase. */
.garden-scene[data-scene-theme="balcony"][data-scene-phase] .garden-scene__horizon {
  opacity: 1;
  filter: none;
}
.garden-scene[data-scene-theme="balcony"] .garden-scene__horizon img.garden-scene__horizon-element {
  opacity: 0.5;
}
.garden-scene[data-scene-theme="balcony"][data-scene-phase="night"] .garden-scene__horizon img.garden-scene__horizon-element {
  opacity: 0.25;
  filter: brightness(0.4) saturate(0.5);
}
.garden-scene[data-scene-theme="balcony"][data-scene-phase="dawn"] .garden-scene__horizon img.garden-scene__horizon-element {
  opacity: 0.35;
  filter: brightness(0.85) sepia(0.15);
}
.garden-scene[data-scene-theme="balcony"][data-scene-phase="dusk"] .garden-scene__horizon img.garden-scene__horizon-element {
  opacity: 0.3;
  filter: brightness(0.7) sepia(0.2);
}
/* How much sky lies between the viewer and the towers. */
.garden-scene { --gs-haze: 0.5; }
.garden-scene[data-scene-weather="fog"] { --gs-haze: 0.7; }

.garden-scene__robin {
  position: absolute;
  pointer-events: none;
  transform: translateX(-50%);
  filter: var(--gs-tone) var(--gs-shade);
}

/* --- Units -------------------------------------------------------------- */
/* A clump of sprites. The button only carries focus and the label; the
   sprites inside take the pointer. */
.garden-scene__unit {
  position: absolute;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  pointer-events: none;
  cursor: pointer;
  border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
}
.garden-scene__unit:focus {
  outline: none;
}
.garden-scene__unit:focus-visible {
  outline: 2px dashed rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
}

/* --- Marks: badge, stake, name tag --------------------------------------- */
/* "×N" on hover, focus or tap */
.garden-scene__badge {
  position: absolute;
  transform: translate(-50%, -4px) scale(0.9);
  opacity: 0;
  padding: 3px 9px 4px;
  border-radius: 9999px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 4px 14px -4px rgba(17, 24, 39, 0.28);
  color: #164825;
  font: 700 12px/1.2 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.16s, transform 0.16s;
}
.garden-scene__badge.is-glow,
.garden-scene__badge.is-active {
  opacity: 1;
  transform: translate(-50%, -4px) scale(1);
}

/* "+N" on a mixed pot (owner, 7 Nov 2026): the plants past the shape's limit,
   the first one's photo, over the pot's right shoulder (its top at the anchor).
   Always shown, never tapped. */
.garden-scene__more {
  position: absolute;
  transform: translateY(100%);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px 2px 2px;
  border-radius: 9999px;
  background: #fcfbf8;
  border: 1px solid #e5e3db;
  color: #4b5563;
  font: 600 11px/1 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}
.garden-scene__more img {
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  object-fit: cover;
}

/* "!" stake: a small garden label pushed into the soil at the plant's base
   (Decision 8), brick-red header band and "!" on a cream face. It sits in
   the scene's light: at dawn, dusk and night (and in rain, snow, fog) it
   takes the same filter as the plants, so it never stays bright after dark.
   Tapping it opens the plant's card. */
.garden-scene__stake {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: auto;
  cursor: pointer;
}
.garden-scene__stake::before {
  /* 28px hit area around the label and stick */
  content: '';
  position: absolute;
  left: -14px;
  bottom: -6px;
  width: 28px;
  height: calc(4.2 * var(--u, 3px) + 26px);
}
.garden-scene__stake-stick {
  position: absolute;
  left: -1px;
  bottom: 0;
  width: 2.5px;
  height: calc(5.5 * var(--u, 3px));
  border-radius: 1px;
  background: linear-gradient(90deg, #d9c3a0, #b99a6e);
}
.garden-scene__stake-label {
  position: absolute;
  left: -8px;
  bottom: calc(4.2 * var(--u, 3px));
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 16px;
  height: 19px;
  border-top: 4px solid #b23a2e;
  border-radius: 3px 3px 2px 2px;
  background: #fbf7ec;
  box-shadow: 0 1px 3px rgba(60, 40, 10, 0.35);
  color: #9b2c22;
  font: 800 13px/1 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
/* The plants' phase/weather tone (--gs-tone, set on .garden-scene above). */
.garden-scene__stake > * {
  filter: var(--gs-tone, none);
}

/* Name tag (settings "Show names", always on in the expanded view) */
.garden-scene__name {
  position: absolute;
  transform: translateX(-50%);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(252, 251, 248, 0.9);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
  color: #1f2a1c;
  font: 600 11px/1.2 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  white-space: nowrap;
  pointer-events: none;
}
.garden-scene__name.is-glow,
.garden-scene__name.is-active {
  background: #fff;
}

/* --- Pan chevrons (pan.js) --------------------------------------------- */
.garden-scene__chev {
  position: absolute;
  top: 50%;
  z-index: 46;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-top: -17px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(252, 251, 248, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(20, 40, 20, 0.18);
  color: #1f3a28;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, background 0.2s;
}
.garden-scene__chev svg {
  width: 16px;
  height: 16px;
}
.garden-scene__chev--l { left: 10px; }
.garden-scene__chev--r { right: 10px; }
/* Shown whenever there is more that way, at rest too: a mouse user had no
   cue that a wide garden pans (R9-ux M11); full strength on hover */
.garden-scene__chev.is-on {
  opacity: 0.75;
  pointer-events: auto;
}
.garden-scene:hover .garden-scene__chev.is-on,
.garden-scene__chev.is-on:focus-visible {
  opacity: 1;
  pointer-events: auto;
}
.garden-scene__chev:hover {
  background: #fff;
}
.garden-scene__chev:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
@media (hover: none) {
  .garden-scene__chev.is-on {
    opacity: 0.6;
  }
}

/* --- Chips, top left (alert_nav.js) ------------------------------------- */
.garden-scene__chips {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 45;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
  max-width: calc(100% - 96px);
  pointer-events: none;
}
.garden-scene__chips:empty {
  display: none;
}
.garden-scene__chip {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  min-height: 28px;
  padding: 5px 11px;
  border: 0;
  border-radius: 14px;
  background: rgba(252, 251, 248, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 4px rgba(20, 40, 20, 0.10);
  color: #1f3a28;
  font: 600 12px/1.25 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-align: left;
  pointer-events: auto;
}
.garden-scene__chip:focus-visible {
  outline: 2px solid #164825;
  outline-offset: 2px;
}
/* "! N" attention chip (alert_nav.js): first in the row, so it holds the
   corner. The mark repeats the stake's label (cream face, brick-red band and
   "!") so the chip reads as "the stakes", not a new notification badge. */
.garden-scene__chip--alert {
  gap: 7px;
  min-height: 32px;
  padding: 4px 12px 4px 6px;
  border-radius: 16px;
  background: rgba(252, 251, 248, 0.9);
  box-shadow: 0 2px 8px rgba(20, 40, 20, 0.16);
  color: #1f3a28;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 0.2s, scale 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}
.garden-scene__chip--alert:hover {
  background: #fff;
}
.garden-scene__chip--alert:active {
  scale: 0.96;
}
.garden-scene__chip-mark {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 16px;
  height: 20px;
  border-top: 4px solid #b23a2e;
  border-radius: 3px 3px 2px 2px;
  background: #fbf7ec;
  box-shadow: 0 1px 2px rgba(60, 40, 10, 0.35);
  color: #9b2c22;
  font: 800 12px/1 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
/* A room's wall with no "!" (2D): no number, an arrow on to the wall that has some. */
.garden-scene__chip-away {
  width: 14px;
  height: 14px;
  color: #6b7280;
}
.garden-scene__chip--away { padding-right: 9px; }
@media (max-width: 639px) {
  .garden-scene__chip {
    font-size: 11px;
    padding: 4px 9px;
  }
  .garden-scene__chip--alert {
    min-height: 30px;
    padding: 3px 11px 3px 5px;
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .garden-scene__chip--alert { transition: none; }
  .garden-scene__chip--alert:active { scale: none; }
}

/* --- Toolbar, bottom right on a faint backdrop (Decision 14) ------------ */
/* No shared backdrop: a rectangle (even a pill) in the rounded corner never
   follows the card's curve. Each control is its own round button (v1 style),
   inset 10px so it clears the 12px corner radius. */
.garden-scene__toolbar {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 25;
  display: flex;
  gap: 6px;
}
.garden-scene__tool {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 1px 4px rgba(20, 40, 20, 0.18);
  color: #374151;
  cursor: pointer;
  transition: background 0.2s;
}
.garden-scene__tool:hover,
.garden-scene__tool[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.75);
}
.garden-scene__tool:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.garden-scene__tool svg {
  width: 16px;
  height: 16px;
}
/* Phones: a compact toolbar so it doesn't cover the plants (button size and
   hit area in the touch block below). */
@media (max-width: 639px) {
  .garden-scene__toolbar {
    right: 8px;
    bottom: 8px;
  }
  .garden-scene__tool svg {
    width: 14px;
    height: 14px;
  }
  .garden-scene__tool-dot {
    width: 8px;
    height: 8px;
  }
  /* Phones keep Settings and Expand; Share and Shuffle live in the settings
     panel. The buttons stay in the DOM (garden_share.js and the panel
     actions bind to them). */
  #garden-scene-share,
  #garden-scene-shuffle {
    display: none;
  }
  .garden-scene-settings-panel__section {
    margin-bottom: 10px;
  }
}
/* Touch screens: every panel control is at least 44px tall (PRODUCT.md). */
@media (pointer: coarse), (max-width: 639px) {
  .garden-scene-theme-pill,
  .garden-scene-settings-panel .garden-scene-filter-pill {
    min-height: 44px;
    min-width: 44px;
    justify-content: center;
    padding: 6px 14px;
    font-size: 13px;
  }
  .garden-scene-settings-panel__themes,
  .garden-scene-settings-panel__filters {
    gap: 6px;
  }
  .garden-scene-settings-panel__switch,
  .garden-scene-settings-panel__action,
  .garden-scene-settings-panel__more-summary,
  .garden-scene-settings-panel__show-all,
  .garden-scene-settings-panel__reset {
    min-height: 44px;
  }
  .garden-scene-settings-panel__switch {
    font-size: 14px;
  }
  .garden-scene-settings-panel__switch-track {
    width: 36px;
    height: 22px;
    border-radius: 11px;
  }
  .garden-scene-settings-panel__switch-track::after {
    width: 18px;
    height: 18px;
  }
  .garden-scene-settings-panel__switch[aria-checked="true"] .garden-scene-settings-panel__switch-track::after {
    transform: translateX(14px);
  }
  .garden-scene-settings-panel__reset {
    padding: 0 8px;
  }
  /* The gear and Expand: 36px discs with a 44px hit area that meets, not overlaps. */
  .garden-scene__toolbar {
    gap: 8px;
  }
  .garden-scene__tool {
    width: 36px;
    height: 36px;
  }
  .garden-scene__tool::before {
    content: "";
    position: absolute;
    inset: -4px;
  }
}
/* Lit when any scene setting differs from the default (settings.js) */
.garden-scene__tool-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: #10b981;
}

/* --- Empty garden invite (Decision 24) ---------------------------------- */
.garden-scene__invite {
  position: absolute;
  top: 46%;
  left: 50%;
  z-index: 30;
  transform: translate(-50%, -50%);
  box-shadow: 0 6px 18px -6px rgba(17, 24, 39, 0.35);
  white-space: nowrap;
}

/* --- Tap card popover (card.js; body from _garden_scene_card.html) ------ */
.garden-scene__card {
  position: absolute;
  z-index: 50;
  width: 280px;
  max-width: calc(100% - 16px);
  max-height: calc(100% - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--color-surface-border, #e5e3db);
  border-radius: 12px;
  background: var(--color-surface-tint, #fcfbf8);
  box-shadow: 0 14px 34px -12px rgba(17, 24, 39, 0.4);
  color: var(--color-content-primary, #111827);
  animation: gardenSceneCardIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.garden-scene__card[hidden] {
  display: none;
}
@keyframes gardenSceneCardIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}
.garden-scene__card-body {
  min-height: 72px;
}
.garden-scene__card-body[aria-busy="true"] {
  display: grid;
  place-items: center;
  min-height: 96px;
}
.garden-scene__card-spinner {
  display: block;
  width: 22px;
  height: 22px;
  border: 2px solid var(--color-surface-border, #e5e3db);
  border-top-color: var(--color-brand, #164825);
  border-radius: 50%;
  animation: gardenSceneSpin 0.8s linear infinite;
}
@keyframes gardenSceneSpin {
  to { transform: rotate(360deg); }
}

/* Card content: compact in the popover, 44px targets in the bottom sheet */
.garden-scene-card__title {
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
}
.garden-scene__card .garden-scene-card {
  padding: 12px 12px 8px;
}
.garden-scene__card .garden-scene-card__title {
  font-size: 1rem;
}
.garden-scene__card .garden-scene-card__records {
  margin-top: 8px;
}
.garden-scene__card .garden-scene-card__actions {
  gap: 6px;
}
.garden-scene__card .garden-scene-card__actions .btn {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.15;
}
.garden-scene__card .garden-scene-card__links > * {
  min-height: 32px;
}
/* Pin / Unpin: one of the two is [hidden]; the buttons' inline-flex would otherwise show both */
.garden-scene-card__links [data-scene-pin][hidden],
.garden-scene-card__links [data-scene-unpin][hidden] {
  display: none;
}
.garden-scene__card .garden-scene-card__close {
  width: 32px;
  height: 32px;
  margin: -6px -6px 0 0;
}
.garden-scene-card__due-when {
  font-variant-numeric: tabular-nums;
}
/* Due items sit with their own answers (proximity); the record's own
   actions (Log, Harvest) follow after a hairline, lighter than the line
   between records. */
.garden-scene-card__general--after {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--color-surface-border, #e5e3db) 60%, transparent);
}
.garden-scene__card .garden-scene-card__due {
  margin-top: 6px;
}
.garden-scene__card .garden-scene-card__general--after {
  margin-top: 10px;
  padding-top: 10px;
}
.garden-scene-card-sheet .garden-scene-card {
  padding-top: 4px;
}

/* --- Expanded view (expand.js, Decision 13) ----------------------------- */
.garden-scene__backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(18, 32, 22, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: gardenFilterFadeIn 0.2s ease-out;
}
body.garden-scene-expanded {
  overflow: hidden;
}
.garden-scene-wrapper.is-expanded {
  position: fixed;
  top: 50%;
  left: 24px;
  right: 24px;
  z-index: 1000;
  margin: 0;
  transform: translateY(-50%);
  animation: gardenSceneGrow 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes gardenSceneGrow {
  from { opacity: 0.4; transform: translateY(-50%) scale(0.97); }
  to   { opacity: 1; transform: translateY(-50%); }
}
@media (max-width: 639px) {
  .garden-scene-wrapper.is-expanded {
    left: 8px;
    right: 8px;
  }
}
.garden-scene-wrapper.is-expanded .garden-scene {
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.5);
}
.garden-scene__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 48;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(252, 251, 248, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(20, 40, 20, 0.18);
  color: #1f3a28;
  cursor: pointer;
}
.garden-scene__close:hover {
  background: #fff;
}
.garden-scene__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.garden-scene__close svg {
  width: 18px;
  height: 18px;
}

@media (prefers-reduced-motion: reduce) {
  .garden-scene__viewport { scroll-behavior: auto; }
  .garden-scene__card,
  .garden-scene__backdrop,
  .garden-scene-wrapper.is-expanded,
  .garden-scene-settings-panel { animation: none; }
  .garden-scene__card-spinner { animation-duration: 2s; }
  .garden-scene__badge,
  .garden-scene__chev { transition: none; }
}

/* === Time & weather (preference clock; clock.js) ===
   One centred line over the top of the scene, above sky, sun and plants.
   Clouds, sun and moon keep out of its box; it keeps clear of the "! N" chip.
   It takes no taps. Drawn into the picture, not over it: text only, serif
   lettering like the bed name plates in the sky's own light. */
.garden-scene__clock {
  position: absolute;
  top: 12px;
  left: 50%;
  translate: -50% 0;
  z-index: 44;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 180px);
  color: #fff;
  font: 400 14px/1 Georgia, "Times New Roman", serif;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-shadow: 0 1px 1px rgb(25 60 105 / 0.35), 0 1px 7px rgb(25 60 105 / 0.35);
  pointer-events: none;
  user-select: none;
}
.garden-scene__clock-temp {
  flex: none;
  font: 600 20px/1 Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}
.garden-scene__clock-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-style: italic; opacity: 0.95; }
/* Letters take the sky's own light: moonlit cream at night, warm at dawn and
   dusk, dark on a pale snow or fog day. */
.garden-scene[data-scene-phase="night"] .garden-scene__clock {
  color: #f3ead0;
  text-shadow: 0 1px 1px rgb(5 12 30 / 0.6), 0 1px 8px rgb(5 12 30 / 0.6);
}
.garden-scene[data-scene-phase="dusk"] .garden-scene__clock,
.garden-scene[data-scene-phase="dawn"] .garden-scene__clock {
  color: #fff7ea;
  text-shadow: 0 1px 1px rgb(80 30 45 / 0.4), 0 1px 7px rgb(80 30 45 / 0.4);
}
.garden-scene[data-scene-phase="day"][data-scene-weather="snow"] .garden-scene__clock,
.garden-scene[data-scene-phase="day"][data-scene-weather="fog"] .garden-scene__clock {
  color: #2c3a44;
  text-shadow: 0 1px 6px rgb(255 255 255 / 0.7);
}
@media (min-width: 1024px) {
  .garden-scene__clock { top: 14px; font-size: 15px; }
  .garden-scene__clock-temp { font-size: 22px; }
}

/* --- Views panorama (panorama.js; docs/plans/views.md, Dashboard) ------- */
/* Each view is one cm-scaled SVG on the stage; only its items take taps. */
.garden-scene__view {
  position: absolute;
  bottom: 0;
  pointer-events: none;
}
.garden-scene__view svg {
  display: block;
  overflow: visible;
  /* The time of day and weather light, as the rest's beds and pots take it. */
  filter: var(--gs-tone);
  transition: filter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
/* A view's plants lift and glow as Everything's do (hover, focus, the "! N"
   chip, the open card; view_plants.js): a pot with its plants, a bed's
   sprites of one type. Only the glow here: the svg above already carries
   the phase tone, so it layers and never replaces it. Lengths are the
   view's cm user units (about 2-3 px each). */
.garden-scene__view .gv-lift {
  transform-box: fill-box;
  transform-origin: bottom center;
  transition: filter 0.15s cubic-bezier(0.16, 1, 0.3, 1), scale 0.2s, translate 0.2s;
}
.garden-scene__view .gv-lift.is-glow,
.garden-scene__view .gv-lift.is-active {
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.85)) drop-shadow(0 0 5px rgba(144, 238, 144, 0.6));
  scale: 1.04;
  translate: 0 -1px;
}
@media (prefers-reduced-motion: reduce) {
  .garden-scene__view .gv-lift.is-glow,
  .garden-scene__view .gv-lift.is-active { scale: none; translate: none; }
}
/* Keyboard stand-in for a view's plants: invisible, taps pass through to the view. */
.garden-scene__view-plant {
  position: absolute;
  padding: 0;
  border: 0;
  background: none;
  pointer-events: none;
}
.garden-scene__view-plant:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-radius: 8px;
}
/* Night, dawn and dusk win over the weather for a view: rain's or snow's
   --gs-tone would otherwise light a night balcony as by day, beside the
   rest's night lawn. */
.garden-scene[data-scene-phase="night"] .garden-scene__view svg { filter: brightness(0.55) saturate(0.6); }
.garden-scene[data-scene-phase="dawn"] .garden-scene__view svg { filter: brightness(0.85) saturate(0.9) sepia(0.1); }
.garden-scene[data-scene-phase="dusk"] .garden-scene__view svg { filter: brightness(0.7) saturate(0.7) sepia(0.15); }
/* A room's box takes the same light once, on the layer of its planes (panorama.js
   buildViewNode), never again on each plane's drawing (sky.test.js keeps the two equal). */
.garden-scene[data-scene-phase="night"] .garden-scene__room-box { filter: brightness(0.55) saturate(0.6); }
.garden-scene[data-scene-phase="dawn"] .garden-scene__room-box { filter: brightness(0.85) saturate(0.9) sepia(0.1); }
.garden-scene[data-scene-phase="dusk"] .garden-scene__room-box { filter: brightness(0.7) saturate(0.7) sepia(0.15); }
.garden-scene[data-scene-phase] .garden-scene__view .garden-scene__room-box svg,
.garden-scene .garden-scene__view .garden-scene__room-box svg {
  filter: none;
}
/* The city (or trees, hills...) behind: its own svg under the wall's art, so a
   wall turn folds the wall and only crossfades the city (walls.js turnTo).
   The art is positioned too, so it paints over the absolute behind in tree order. */
.garden-scene__view svg.garden-scene__view-behind {
  position: absolute;
  left: 0;
  top: 0;
}
.garden-scene__view svg.garden-scene__view-art {
  position: relative;
}
/* A room wall's face (its art and glow) and the zoom inside it: a turn swings the
   face as a side of the room's box and eases the zoom (walls.js turnTo). */
.garden-scene__view-face,
.garden-scene__view-zoom,
.garden-scene__view-city {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}
/* A room's box (panorama.js roomBoxMarkup): the floor, then what stands at the
   shown wall's corners, each a plane of the room seen by one camera (their
   matrix3d inline, origin 0 0; room_camera.js). A side that is a wall turns the
   card to it when tapped; a Building or Greenhouse glass side is only scenery. */
.garden-scene__room-floor,
.garden-scene__side-wall,
.garden-scene__room-roof,
.garden-scene__bench-top {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
}
.garden-scene__room-box {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: var(--gs-tone);
  transition: filter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.garden-scene__side-wall[data-side] {
  pointer-events: auto;
  cursor: pointer;
}
/* What stands up in a room's box (panorama.js billboardsMarkup): each item upright,
   facing the eye where it stands, over the box's planes (its 2D move and scale
   inline, origin 0 0). Pictures only: a tap reaches the side wall under it. */
.garden-scene__billboards,
.garden-scene__billboards-depth,
.garden-scene__billboard {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}
.garden-scene__billboards,
.garden-scene__billboards-depth {
  width: 100%;
  height: 100%;
}
.garden-scene__billboards {
  /* its billboards' paint order (z-index, far to near) stays among themselves */
  isolation: isolate;
}
/* In a turn each billboard carries its depth (room_camera.js billboardCss) and is painted far
   to near by it, off the page's thread; at rest they are flat and their z-index orders them.
   Its own layer: the outer one fades as a whole (walls.js boxTurn), which would flatten it. */
.garden-scene__billboards-depth {
  transform-style: preserve-3d;
}
.garden-scene__billboard {
  transform-origin: 0 0;
}
.garden-scene__billboard > svg {
  display: block;
}
/* The shown wall's drawing of an item its billboard draws: only its tap is left. */
.garden-scene__view-art .gv-board-twin {
  visibility: hidden;
}
.garden-scene__view-art .gv-board-twin .gv-hit {
  visibility: visible;
}
/* A room wall's city behind, in its own box: a turn pans it and keeps it on its
   wall's side of the corner (wall_turn.js farKeys). Never a tap target. */
.garden-scene__view-city {
  pointer-events: none;
}
/* A box turn's two pictures crossfading truly (walls.js mixPictures): each whole in its layer,
   their light added by their shares, one eased number (--gs-turn-mix, registered there) for both,
   so what both draw alike (glass, a lamp's glow) never doubles. */
.garden-scene__turn-mix {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  isolation: isolate;
  pointer-events: none;
}
.garden-scene__turn-pic {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  /* cut to the card (walls.js sets its left and width): uncut, Chromium drew nothing of it */
  overflow: hidden;
  mix-blend-mode: plus-lighter;
}
.garden-scene__turn-at {
  position: absolute;
}
.garden-scene__turn-pic--old {
  opacity: calc(1 - var(--gs-turn-mix, 0));
}
.garden-scene__turn-pic--new {
  opacity: var(--gs-turn-mix, 0);
}
/* The sun or moon in a turn, kept on the main wall's side of the corner (walls.js skyPan). */
.garden-scene__sky-mask {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
/* Lit lamps (panorama.js lightsGlow): over the view's picture, outside the
   phase tone, so a lantern or a strand of bulbs glows at night. */
.garden-scene .garden-scene__view svg.garden-scene__view-glow,
.garden-scene[data-scene-phase] .garden-scene__view svg.garden-scene__view-glow {
  position: absolute;
  left: 0;
  top: 0;
  filter: none;
  mix-blend-mode: screen;
  pointer-events: none;
}
.garden-scene__view .gv-hit {
  pointer-events: auto;
  cursor: pointer;
}
.garden-scene__view .gv-hit:focus-visible {
  outline: 2px solid #2f6b3f;
}
/* "Balcony", "Rest of the garden": below the top-left chips. */
.garden-scene__section-label {
  position: absolute;
  top: 46px;
  max-width: 40%;
  overflow: hidden;
  padding: 3px 9px;
  border-radius: 11px;
  background: rgba(252, 251, 248, 0.78);
  box-shadow: 0 1px 3px rgba(20, 40, 20, 0.10);
  color: #1f3a28;
  font: 600 11px/1.3 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}
/* Tabs (tabs.js): with views the card shows one thing at a time. Collapsed,
   one pill names it with a chevron; open, the tabs fan out beside it. Drawn
   as small as the section labels; each button keeps a 44px tap target through
   its padding box (the pill is its ::before), as the pan hint does. */
.garden-scene__tabs {
  position: absolute;
  bottom: 4px; /* the pill (inset 6px) on the toolbar buttons' 10px line */
  left: 6px; /* the pill (inset 10px 4px) 10px in, like the toolbar */
  right: 92px; /* clear of the toolbar (bottom right) */
  z-index: 46;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  pointer-events: none;
}
@media (min-width: 640px) {
  .garden-scene__tabs { right: 190px; } /* the toolbar has more buttons there */
}
/* Open: the tabs sit in one line beside the chevron, inside the card's top
   left, clear of the toolbar and the pan arrows; more than fit scroll
   sideways under a soft fade while the chevron stays put. */
.garden-scene__tabs-toggle,
.garden-scene__tab { flex: none; }
.garden-scene__tabs-toggle,
.garden-scene__tab {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 44px;
  padding: 10px 13px;
  border: 0;
  background: transparent;
  color: #374151;
  font: 600 11px/1.3 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
}
/* As tall and as see-through as the toolbar's round buttons beside it. */
.garden-scene__tabs-toggle::before,
.garden-scene__tab::before {
  content: "";
  position: absolute;
  inset: 6px 4px;
  z-index: -1;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 4px rgba(20, 40, 20, 0.18);
  transition: background-color 0.15s ease;
}
/* Collapsed, the switch is one round button like the toolbar's, with a
   layers mark (owner: no name, less room); open, the mark turns into a
   left chevron and the named tabs slide out beside it. The current tab's
   name stays in the button's label for screen readers. */
.garden-scene__tabs-toggle {
  z-index: 1; /* the row slides out from behind it */
  width: 44px;
  justify-content: center;
  padding: 0;
}
.garden-scene__tabs-toggle::before {
  inset: 6px;
  border-radius: 50%;
}
.garden-scene__tabs-name { display: none; }
.garden-scene__tabs-icon,
.garden-scene__tabs-chevron {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  transition: opacity 0.18s ease, transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
.garden-scene__tabs-chevron { opacity: 0; transform: scaleX(-1) translateX(4px); }
.garden-scene__tabs.is-open .garden-scene__tabs-icon { opacity: 0; transform: scale(0.6); }
.garden-scene__tabs.is-open .garden-scene__tabs-chevron { opacity: 1; transform: scaleX(-1); }
.garden-scene__tabs-toggle:hover::before,
.garden-scene__tab:hover::before { background: rgba(255, 255, 255, 0.75); }
.garden-scene__tab { padding-left: 11px; padding-right: 11px; }
.garden-scene__tab.is-active { color: #fcfbf8; }
.garden-scene__tab.is-active::before {
  background: rgba(47, 107, 63, 0.85);
  box-shadow: 0 0 0 1.5px rgba(252, 251, 248, 0.9), 0 1px 3px rgba(20, 40, 20, 0.2);
}
.garden-scene__tabs-toggle:focus-visible,
.garden-scene__tab:focus-visible {
  outline: 2px solid #2f6b3f;
  outline-offset: -8px;
}
/* Laid out where it ends up (beside the round chevron button) from the first
   frame, so the toggle folding never pushes the tabs sideways. */
.garden-scene__tabs-list {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 36px;
  max-width: calc(100% - 36px);
  display: flex;
  min-width: 0;
  align-items: center;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  pointer-events: auto;
}
.garden-scene__tabs-list::-webkit-scrollbar { display: none; }
/* A soft fade only on a side with more tabs beyond it (tabs.js data-fade). */
.garden-scene__tabs-list[data-fade="right"] {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
}
.garden-scene__tabs-list[data-fade="left"] {
  -webkit-mask-image: linear-gradient(90deg, transparent 2px, #000 24px);
  mask-image: linear-gradient(90deg, transparent 2px, #000 24px);
}
.garden-scene__tabs-list[data-fade="both"] {
  -webkit-mask-image: linear-gradient(90deg, transparent 2px, #000 24px, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, transparent 2px, #000 24px, #000 calc(100% - 28px), transparent);
}
.garden-scene__tabs-list[hidden] { display: none; }
/* The row slides out to the right from behind the chevron button, as one
   strip, and slides back in on close: it moves by its own width while its
   clip keeps its left edge pinned at the button, so it never shows to the
   button's left. */
.garden-scene__tabs.is-open .garden-scene__tabs-list {
  animation: gs-tabs-out 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.garden-scene__tabs.is-closing .garden-scene__tabs-list {
  animation: gs-tabs-in 0.2s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes gs-tabs-out {
  from { transform: translateX(-100%); clip-path: inset(-12px -12px -12px 100%); }
  to { transform: none; clip-path: inset(-12px -12px -12px 0); }
}
@keyframes gs-tabs-in {
  from { transform: none; clip-path: inset(-12px -12px -12px 0); }
  to { transform: translateX(-100%); clip-path: inset(-12px -12px -12px 100%); }
}
@media (prefers-reduced-motion: reduce) {
  .garden-scene__tabs.is-open .garden-scene__tabs-list,
  .garden-scene__tabs.is-closing .garden-scene__tabs-list { animation: none; }
  .garden-scene__tabs-chevron,
  .garden-scene__tabs-icon { transition: none; }
}
/* Pan hint: one small chip, bottom right above the toolbar (clear of the section labels and the
   clock); fades out after the first pan. Drawn as small as the labels; the button keeps a 44px
   tap target through its padding box. */
.garden-scene__pan-hint {
  position: absolute;
  bottom: 46px;
  right: 2px;
  z-index: 45;
  min-height: 44px;
  padding: 9px 17px;
  border: 0;
  background: transparent;
  color: #1f3a28;
  font: 600 11px/1.3 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.35s ease;
}
.garden-scene__pan-hint::before {
  content: "";
  position: absolute;
  inset: 9px 8px;
  z-index: -1;
  border-radius: 11px;
  background: rgba(252, 251, 248, 0.78);
  box-shadow: 0 1px 3px rgba(20, 40, 20, 0.10);
}
.garden-scene__pan-hint {
  isolation: isolate;
}
.garden-scene__pan-hint:focus-visible {
  outline: 2px solid #2f6b3f;
  outline-offset: -6px;
}
.garden-scene__pan-hint.is-gone {
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .garden-scene__pan-hint {
    transition: none;
  }
}
.garden-scene__pan-hint[hidden] {
  display: none;
}
/* Re-render cross-fade (index.js rerender): the old picture over the new one, fading out. */
.garden-scene__ghost {
  position: absolute;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
}

/* A bed's name plate under the tabs switch (tabs.js clearTabsCorner): slid clear, or faded out. */
.garden-scene__bed-plate {
  transition: translate 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s;
}
.garden-scene__bed-plate.is-under-tabs {
  opacity: 0;
}

/* A window view's tab (indoors, index.js data-scene-backdrop): the cream room wall fills
   the top, so the time and weather read dark there; at night the wall is dim and the
   light letters stay (F8). */
.garden-scene[data-scene-backdrop="indoor"]:not([data-scene-phase="night"]) .garden-scene__clock {
  color: #3d342a;
  text-shadow: 0 1px 1px rgb(255 255 255 / 0.5), 0 0 6px rgb(255 250 240 / 0.6);
}

/* --- A room on the card (walls.js) -------------------------------------- */
/* The bottom row between the tabs' round button and the toolbar: the turn
   pill (a turn button each side of the shown wall's name), as see-through as
   the toolbar's buttons. The card is 2D only (owner 2026-11-22): no 3D | 2D
   switch. The pill sits at the row's start, by the tabs' button (approved
   shot 12), and its wall name takes the room the switch left. Each turn
   button keeps a 44px target (its ::after); the pill's margins keep those
   targets inside the row, and the row ends where the toolbar's 44px targets
   begin (PRODUCT.md). */
.garden-scene__room-bar {
  position: absolute;
  bottom: 4px;
  left: 50px; /* after the tabs' round button */
  right: 92px; /* clear of the toolbar's targets (phones: Settings and Expand, 2 x 44 + 4) */
  z-index: 45;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  pointer-events: none;
}
@media (min-width: 640px) {
  .garden-scene__room-bar { right: 160px; } /* the toolbar has four buttons there */
}
@media (min-width: 640px) and (pointer: coarse) {
  .garden-scene__room-bar { right: 186px; } /* a tablet's four 44px targets (4 x 44 + 10) */
}
/* The open tab row runs over this spot: the room's controls step aside. */
/* A 2D turn's new wall, drawn but kept out of the page's styling for one frame (walls.js turnTo). */
.garden-scene__stage[data-turn-pending] > :not([data-turning]),
.garden-scene__marks[data-turn-pending] {
  display: none;
}
.garden-scene[data-tabs-open] .garden-scene__room-bar {
  visibility: hidden;
}
.garden-scene__turn {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  flex: none;
  min-height: 44px;
  pointer-events: auto;
}
/* The pill: the one shape both turn buttons and the name sit in (approved shot 12). */
.garden-scene__turn { flex: 0 1 auto; min-width: 0; margin: 0 5px; }
.garden-scene__turn::before {
  content: "";
  position: absolute;
  inset: 6px 0;
  z-index: -1;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 4px rgba(20, 40, 20, 0.18);
}
.garden-scene__turn-btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #374151;
  font: 600 12px/1.3 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  white-space: nowrap;
  cursor: pointer;
}
/* 34px wide in the pill; the ::after widens the target to 44px over the pill's edge and the name. */
.garden-scene__turn-btn { width: 34px; padding: 0; }
.garden-scene__turn-btn::after {
  content: "";
  position: absolute;
  inset: 0 -5px;
}
.garden-scene__turn-btn::before {
  content: "";
  position: absolute;
  inset: 8px 2px;
  z-index: -1;
  border-radius: 14px;
  background: transparent;
  transition: background-color 0.15s ease;
}
.garden-scene__turn-btn:hover::before { background: rgba(255, 255, 255, 0.6); }
.garden-scene__turn-btn svg { width: 18px; height: 18px; flex: none; }
/* The end of a room that doesn't go round: shown dimmed like the app's other
   disabled controls, so the pill stays balanced and the end reads as an end. */
.garden-scene__turn-btn[disabled] { opacity: 0.35; cursor: default; }
.garden-scene__turn-btn[disabled]:hover::before { background: transparent; }
/* The shown wall: two short lines on a phone rather than cut off, broken
   between words (a word too long for the line is hyphenated, never cut
   anywhere: "Linkes Mäuerchen"). */
.garden-scene__turn-name {
  min-width: 0;
  max-width: 116px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  color: #1f2937;
  font: 600 11px/1.15 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-align: center;
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}
@media (min-width: 640px) {
  .garden-scene__turn-name { max-width: 200px; font-size: 12px; -webkit-line-clamp: 1; line-clamp: 1; }
}
.garden-scene__turn-btn:focus-visible {
  outline: 2px solid #2f6b3f;
  outline-offset: -7px;
}
@media (prefers-reduced-motion: reduce) {
  .garden-scene__turn-btn::before { transition: none; }
}
/* The turn's announcement ("Facing Glass"): for screen readers only. */
.garden-scene__room-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* Phones: the bottom nav covers the page's last 72px or so. A control focused by
   keyboard scrolls into view above it, not under it. */
@media (max-width: 1023.98px) {
  .garden-scene button,
  .garden-scene-wrapper button {
    scroll-margin-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
}
/* The line after a room's wall, before the next view or the rest of the garden. */
.garden-scene__room-divider {
  position: absolute;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(to top, rgba(252, 251, 248, 0.85), rgba(252, 251, 248, 0));
  pointer-events: none;
}
/* A wall swap's dissolve (walls.js swapTo) sets --gs-sky-fade, so the sun goes or comes with the walls. */
.garden-scene__sun,
.garden-scene__moon,
.garden-scene__sunwash { transition: opacity var(--gs-sky-fade, 0s) ease-in-out; }
/* A room's side wall: the sun or moon is pinned above the main wall, so it is not in this sky. */
.garden-scene[data-room-wall]:not([data-room-wall="back"]) .garden-scene__sun,
.garden-scene[data-room-wall]:not([data-room-wall="back"]) .garden-scene__moon,
.garden-scene[data-room-wall]:not([data-room-wall="back"]) .garden-scene__sunwash {
  opacity: 0;
}

