:root {
  --paper: #f6f5eb;
  --card: #fffef6;
  --ink: #273b2c;
  --green: #35583c;
  --muted: #687362;
  --line: #d8dbca;
  --pale: #e8eddf;
  --gold: #ae812b;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 92% 2%, #f3f2e4, transparent 58%), var(--paper);
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid #b88a22;
  outline-offset: 3px;
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
button {
  border: 0;
  background: transparent;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3,
.brand {
  font-family: var(--serif);
  font-weight: 500;
}
button,
.ico,
.pixel {
  flex-shrink: 0;
}
.ico,
.pixel {
  vertical-align: middle;
}
.row,
.pill,
.primary,
.secondary,
.textbtn,
.round,
.navbtn,
.chip,
.brand,
.resources,
.weather,
.hud,
.meter-label,
.stat,
.eyebrow,
.badge,
.daily-row,
.actions,
.mini-btn {
  display: flex;
  align-items: center;
}
.between {
  justify-content: space-between;
}
.row,
.pill,
.primary,
.secondary,
.textbtn,
.navbtn,
.chip,
.brand,
.stat,
.actions,
.mini-btn {
  gap: 8px;
}
.wrap {
  flex-wrap: wrap;
}
.muted,
small {
  color: var(--muted);
}
.eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  font-weight: 750;
  text-transform: uppercase;
  gap: 7px;
}
.round {
  width: 37px;
  height: 37px;
  border: 1px solid var(--line);
  background: #fcfcf3;
  justify-content: center;
  border-radius: 9px;
}
.round:hover,
.secondary:hover,
.mini-btn:hover {
  background: #e8edde;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}
.page-head h1 {
  font-size: clamp(2.15rem, 3.3vw, 3.45rem);
  letter-spacing: -0.057em;
  line-height: 1.12;
}
.primary,
.secondary,
.mini-btn {
  justify-content: center;
  border-radius: 7px;
  font-weight: 650;
  font-size: 0.85rem;
  padding: 10px 15px;
  min-height: 39px;
}
.primary {
  background: var(--green);
  color: #fffdf0;
  border: 1px solid #2c4932;
  box-shadow: 0 2px 0 #263e2c;
}
.primary:hover {
  background: #426a48;
}
.secondary,
.mini-btn {
  border: 1px solid #cbd3bf;
  background: #fbfcf3;
}
.mini-btn {
  font-size: 0.76rem;
  min-height: 32px;
  padding: 5px 10px;
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 0 #33492a06;
  overflow: hidden;
}
.scene {
  position: relative;
  width: 100%;
  aspect-ratio: 1.62;
  overflow: hidden;
  isolation: isolate;
  background: #859d4c;
}
.world {
  position: absolute;
  inset: 0;
  background: url("assets/meadow.webp") center/100% 100% no-repeat;
  transform: scale(var(--zoom, 1));
  transform-origin: 50% 53%;
  transition: transform 0.28s ease;
}
.world:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    116deg,
    transparent 33%,
    #fffaab13 37%,
    transparent 43%,
    #ffed9b15 53%,
    transparent 60%
  );
}
.plot {
  position: absolute;
  transform: translate(-50%, -100%);
  width: 20%;
  padding: 0;
  display: grid;
  place-items: end center;
  isolation: isolate;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.plot img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(3px 7px 2px #253a244b);
  transition:
    filter 0.16s,
    translate 0.16s;
}
.plot:hover img,
.plot:focus-visible img {
  filter: drop-shadow(1px 0 1px #fff7be) drop-shadow(2px 6px 3px #26362375);
  translate: 0 -2px;
}
.plot:focus-visible {
  outline: 2px dashed white;
  border-radius: 40%;
}
.bare {
  width: 16%;
  height: 13%;
  display: grid;
  place-items: center;
}
.bare:before {
  content: "";
  position: absolute;
  inset: 12% 10%;
  border: 2px dashed #ffffd1ba;
  transform: rotate(-33deg) skewX(25deg);
  border-radius: 5px;
  background: #f6ffcc16;
}
.bare span {
  background: #424f2cbf;
  border: 1px solid #f1f4bc;
  color: white;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  z-index: 1;
}
.floaters,
.effect-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 8;
}
/* Falling weather moves in cqh, so it can animate as a transform on the compositor. */
.floaters {
  container-type: size;
}
.mote {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 3px;
  height: 3px;
  border-radius: 100%;
  background: #fff9c7;
  box-shadow: 0 0 6px #fffba8;
  animation: drift var(--t) ease-in-out infinite alternate;
  animation-delay: calc(var(--d) - var(--now, 0s));
}
.butterfly {
  position: absolute;
  width: 11px;
  height: 10px;
  left: var(--x);
  top: var(--y);
  animation: fly 7s ease-in-out infinite alternate;
  animation-delay: calc(var(--d) - var(--now, 0s));
}
.butterfly:before,
.butterfly:after {
  content: "";
  position: absolute;
  width: 5px;
  height: 8px;
  clip-path: polygon(0 0, 90% 25%, 100% 100%, 0 68%);
  background: var(--wing);
  /* Each wing folds toward the body, as a 5px-to-2px width change would, but on the compositor. */
  transform-origin: 0 50%;
  animation: flap 0.32s infinite alternate;
}
.butterfly:after {
  left: 0;
  scale: -1 1;
  transform-origin: 100% 50%;
}
.rain {
  position: absolute;
  left: var(--x);
  top: -5%;
  height: 14px;
  width: 2px;
  background: #deefffb3;
  animation: rain 1s linear infinite;
  animation-delay: calc(var(--d) - var(--now, 0s));
}
.scene.rainy .world {
  filter: saturate(0.82) brightness(0.93);
}
.effect-note {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -100%);
  background: #fffce9f2;
  padding: 4px 8px;
  border-radius: 5px;
  color: #304831;
  font-size: 0.7rem;
  animation: effectNote 1.55s ease-out forwards;
  font-weight: 700;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.panel-heading h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.35rem;
  letter-spacing: -0.045em;
}
.panel-heading small {
  font-size: 0.72rem;
}
.specimen {
  height: 115px;
  position: relative;
  background-color: #edf1e2;
  background-image:
    linear-gradient(#9dad8520 1px, transparent 1px),
    linear-gradient(90deg, #9dad8520 1px, transparent 1px);
  background-size: 16px 16px;
  border-block: 1px solid #dce2cf;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.specimen img {
  max-height: 104px;
  max-width: 55%;
  filter: drop-shadow(2px 4px 2px #374a2524);
}
.specimen:before,
.specimen:after {
  content: "+";
  position: absolute;
  font: 17px monospace;
  color: #aab79a;
  top: 7px;
  left: 9px;
}
.specimen:after {
  left: auto;
  top: auto;
  right: 9px;
  bottom: 5px;
}
.badge {
  border-radius: 4px;
  display: inline-flex;
  gap: 4px;
  padding: 3px 7px;
  background: #e8eddb;
  color: #536744;
  font-size: 0.62rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 750;
  border: 1px solid #cbd5ba;
}
.badge.special {
  background: #eee7f1;
  color: #745681;
  border-color: #dbcee0;
}
.badge.rare {
  background: #f7ebcd;
  color: #866624;
  border-color: #e7d198;
}
.health {
  margin: 16px 0 9px;
}
.meter-label {
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 650;
  margin-bottom: 7px;
}
.meter-label span:first-child {
  display: flex;
  gap: 6px;
  align-items: center;
}
.meter-label strong {
  color: #517445;
}
.track {
  height: 6px;
  border-radius: 5px;
  background: #e4e7da;
  overflow: hidden;
}
.track i {
  display: block;
  height: 100%;
  background: #80a266;
  border-radius: 5px;
}
.care-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  font-size: 0.79rem;
}
.care-row > span:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #626f5c;
}
.care-row b {
  font-weight: 600;
}
.care-row .ico {
  width: 16px;
  height: 16px;
}
.good {
  color: #537147;
}
.warn {
  color: #956f26;
}
.tasks-head {
  padding-bottom: 5px;
}
.daily-row {
  padding: 10px 0;
  gap: 9px;
  min-height: 39px;
  border-bottom: 1px solid #e6e7da;
  font-size: 0.8rem;
}
.daily-row:last-child {
  border-bottom: 0;
}
.daily-list {
  padding: 0 18px 8px;
}
.tick {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1px solid #bdc8b1;
  display: grid;
  place-items: center;
  color: #fff;
  background: #fafbf2;
}
.tick.done {
  background: #6b875b;
}
.daily-row .reward {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #8f742d;
  font-size: 0.74rem;
}
.daily-row .mini-btn {
  margin-left: auto;
}
.task-count {
  font-size: 0.7rem;
  border: 1px solid var(--line);
  background: #f3f4e8;
  border-radius: 5px;
  padding: 3px 6px;
  color: var(--muted);
}
.subhead {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
}
.page-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.page-tools select,
.field {
  padding: 9px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  min-height: 40px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.collection {
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
}
.content-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.content-card .inside {
  padding: 17px;
  display: grid;
  gap: 10px;
  flex: 1;
  align-content: start;
}
.content-card h2 {
  font-size: 1.4rem;
  letter-spacing: -0.04em;
}
.content-card p,
.prose,
.modal-copy {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
}
.content-card .inside > .primary,
.content-card .inside > .secondary {
  align-self: end;
}
.card-image {
  background: #edf0df;
  display: grid;
  place-items: center;
  height: 134px;
  border-bottom: 1px solid var(--line);
  background-image: radial-gradient(#bac6a8 1px, transparent 1px);
  background-size: 12px 12px;
}
.card-image img {
  height: 90%;
  max-width: 90%;
  object-fit: contain;
}
.undiscovered {
  filter: grayscale(0.87);
  opacity: 0.7;
}
.label-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}
.collection .inside {
  gap: 6px;
}
.collection small {
  font-family: var(--serif);
  font-style: italic;
}
.collection button {
  text-align: left;
}
.tag {
  font-size: 0.76rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.info-panel {
  padding: 22px;
  max-width: 800px;
}
.info-panel p {
  margin: 6px 0 12px;
}
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
  font-size: 0.85rem;
}
.list-row > b,
.list-row > span {
  min-width: 0;
}
.list-row small {
  display: block;
  margin-top: 3px;
}
.wide {
  width: 100%;
}
.button-stack {
  display: grid;
  gap: 8px;
}
.choice {
  border: 1px solid var(--line);
  background: #f3f5e8;
  border-radius: 6px;
  padding: 10px 12px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.choice span {
  display: block;
}
.choice b {
  font-size: 0.9rem;
}
.choice small {
  display: block;
  font-size: 0.76rem;
  margin-top: 3px;
}
.choice:hover {
  background: #e9efdb;
}
.section-label {
  display: block;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #63725a;
  margin: 17px 0 9px;
}
.modal-body .actions {
  margin-top: 18px;
  flex-wrap: wrap;
}
.modal-body h3 {
  font-size: 1.3rem;
}
.modal-body p + p {
  margin-top: 9px;
}
dialog {
  color: var(--ink);
  border: 1px solid #a8b69c;
  background: var(--card);
  border-radius: 14px;
  width: min(450px, calc(100vw - 26px));
  max-height: 88dvh;
  padding: 0;
  box-shadow: 0 24px 90px #11271655;
}
dialog::backdrop {
  background: #1f302660;
  backdrop-filter: blur(3px);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 {
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}
.modal-body {
  padding: 17px 20px 21px;
}
.modal-body .specimen {
  margin: -17px -20px 16px;
  height: 150px;
}
.modal-body .specimen img {
  max-height: 134px;
}
.reveal {
  animation: reveal 0.52s cubic-bezier(0.19, 1, 0.22, 1) both;
}
.reveal:after {
  content: "✦";
  color: #ab9034;
  font: 24px var(--serif);
  right: 20%;
  bottom: 28%;
  animation: twinkle 1.6s infinite alternate;
}
.modal-body ul {
  padding-left: 18px;
  line-height: 1.6;
  color: var(--muted);
  font-size: 0.88rem;
}
.group {
  display: grid;
  gap: 9px;
}
.tool-icon {
  background: #e9efdf;
  width: 47px;
  height: 47px;
  border-radius: 9px;
  display: grid;
  place-items: center;
}
.tool-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.big-reward {
  margin: 15px 0;
  display: flex;
  gap: 12px;
}
.big-reward > span {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #f1f0df;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 0.86rem;
}
.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}
.table td,
.table th {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
.table th {
  background: #edf0df;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.table tr:last-child td {
  border-bottom: 0;
}
.yours {
  background: #eff5e5;
}
#toast-layer {
  position: fixed;
  inset: 0 auto auto 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: visible;
  background: transparent;
  pointer-events: none;
  z-index: 100;
}
#toasts {
  margin: 0;
  inset: auto;
  padding: 0;
  border: 0;
  background: transparent;
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 28px);
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 7px;
  z-index: 100;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fffeee;
  border: 1px solid #849574;
  background: #354d37f5;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 0.83rem;
  box-shadow: 0 3px 12px #243b2320;
  animation: reveal 0.2s ease-out;
}
.dead img {
  filter: saturate(0.1) sepia(0.85) brightness(0.64);
}
.return-note {
  border: 1px solid #d5bd8d;
  background: #fff2d7;
  padding: 12px 15px;
  border-radius: 8px;
  color: #715c31;
  margin-bottom: 15px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
@keyframes drift {
  0% {
    transform: translate(0, 0);
    opacity: 0.1;
  }
  60% {
    opacity: 0.85;
  }
  100% {
    transform: translate(24px, -34px);
    opacity: 0.05;
  }
}
@keyframes fly {
  0% {
    transform: translate(0, 0) rotate(-12deg);
  }
  40% {
    transform: translate(32px, -18px) rotate(10deg);
  }
  75% {
    transform: translate(56px, 6px) rotate(-8deg);
  }
  100% {
    transform: translate(83px, -20px) rotate(12deg);
  }
}
@keyframes flap {
  100% {
    transform: scaleX(0.4);
  }
}
@keyframes bob {
  50% {
    translate: 0 -4px;
  }
}
@keyframes rain {
  from {
    transform: translate(0, 0) rotate(12deg);
  }
  to {
    transform: translate(-38px, 110cqh) rotate(12deg);
  }
}
@keyframes effectNote {
  0% {
    opacity: 0;
    scale: 0.6;
  }
  12% {
    opacity: 1;
    scale: 1.12;
  }
  22% {
    scale: 1;
  }
  70% {
    opacity: 1;
    translate: 0 -10px;
  }
  100% {
    opacity: 0;
    translate: 0 -26px;
  }
}
@keyframes reveal {
  from {
    opacity: 0.1;
    transform: translateY(5px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes twinkle {
  to {
    opacity: 0.35;
    transform: scale(0.7);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
  .floaters,
  .fx-bit,
  .fx-ring {
    display: none;
  }
}
.seed-choice img {
  height: 42px;
  width: 50px;
  object-fit: contain;
}
.scene.autumn .world {
  filter: sepia(0.13) saturate(1.05);
}
.scene.winter .world {
  filter: saturate(0.77) brightness(1.04);
}
.scene.summer .world:before {
  background: linear-gradient(
    115deg,
    transparent 22%,
    #fff8b126 36%,
    transparent 51%,
    #fff4a51c 55%,
    transparent 74%
  );
}
.plot.wilt img {
  filter: saturate(0.55) sepia(0.2);
}
.scene.dawn:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(122deg, #fff5c6bd, #ffdb7d12, transparent);
  pointer-events: none;
  z-index: 9;
  animation: dawn 1.3s ease-out forwards;
}
@keyframes dawn {
  to {
    opacity: 0;
  }
}
.rank-pages {
  margin-top: 15px;
  justify-content: center;
  font-size: 0.8rem;
}
.modal-body .daily-list {
  padding-inline: 8px;
}
.modal-body .tasks-head {
  display: none;
}
@font-face {
  /* Jersey 10 has one weight; the 400-700 range stops browsers faking bold */
  font-family: "Jersey 10";
  src: url("/assets/jersey10.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  /* Drawn smaller per em than most fonts; scale it to sit at the sizes in this file */
  size-adjust: 112%;
}
:root {
  --pixel: "Jersey 10", monospace;
  --wood: #493522;
  --trim: #bd9661;
  --night: #24382c;
  --cream: #fff2cb;
  --margin: clamp(12px, 2.25vw, 32px);
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #2e492e;
}
#app {
  position: fixed;
  inset: 0;
  max-width: none;
  padding: 0;
  isolation: isolate;
}
/* Beta notice: a slim strip above the game. #app starts below it, and the
   strip absorbs the top safe-area inset so the HUD doesn't pad for it twice. */
:root {
  --beta-h: calc(28px + env(safe-area-inset-top));
}
.beta-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  box-sizing: border-box;
  height: var(--beta-h);
  padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0
    max(12px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--wood);
  border-bottom: 1px solid #2c1f14;
  color: var(--cream);
  font: 600 13px/1 var(--sans);
}
.beta-tag {
  flex: none;
  padding: 3px 6px 2px;
  border-radius: 4px;
  background: var(--trim);
  color: var(--wood);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.beta-text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#app {
  top: var(--beta-h);
}
#app .game-hud {
  --edge-top: var(--margin);
}
.play-scene.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  overflow: hidden;
}
.play-scene .world {
  inset: 0;
  touch-action: manipulation;
  transform: none;
  transition: none;
  background: var(--terrain) center / 100% 100% no-repeat;
  user-select: none;
  isolation: isolate;
}
.play-scene:after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 9vmin #1225153d;
  pointer-events: none;
  z-index: 2;
}
.play-scene .world:before {
  pointer-events: none;
}
.world {
  --bed-size: min(16vw, 30vh);
}
.world .plot {
  width: var(--bed-size);
  outline-offset: 3px;
}
.world .plot img {
  filter: drop-shadow(3px 7px 3px #21321d54);
}
.world .plot:not(.bare):hover img,
.world .plot.selected:not(.bare) img {
  filter: drop-shadow(1px 0 0 #fff1a9) drop-shadow(-1px 0 0 #fff1a9)
    drop-shadow(2px 5px 3px #243d264d);
}
.world .plot.selected:after {
  display: none;
}
.world .plot.dead img {
  filter: grayscale(0.9) sepia(0.6) brightness(0.6);
}
.world .bare {
  width: calc(var(--bed-size) * 0.83);
  height: 9%;
  background: transparent;
}
.bare:before {
  border: 2px dashed #fff3b9a0;
  background: #e1dc9e19;
  box-shadow: 0 0 1px #42502d66;
}
.bare span {
  width: 31px;
  height: 31px;
  background: #4a542eaf;
  color: #fff0bf;
}
.need {
  position: absolute;
  right: 18%;
  top: -3px;
  color: #35758d;
  border: 2px solid #705837;
  background: #fff6d9;
  box-shadow: 1px 2px 0 #2e382b66;
  border-radius: 7px;
  padding: 3px 4px;
  line-height: 1;
  animation: bob 2.3s ease-in-out infinite;
}
.need-bug {
  color: #ac563b;
}
.gardener {
  position: absolute;
  /* movement.js places the gardener with translate, measured from the corner. */
  left: 0;
  top: 0;
  height: clamp(64px, 15vh, 168px);
  aspect-ratio: 77/144;
  transform: translate(-50%, -100%);
  pointer-events: none;
  isolation: isolate;
}
.actor-shadow {
  position: absolute;
  bottom: -1%;
  left: 5%;
  width: 90%;
  height: 10%;
  background: #24352772;
  filter: blur(2px);
  border-radius: 50%;
}
.actor-sprite {
  position: absolute;
  inset: 0;
  background: url("assets/gardener-walk.webp") 0 100% / 300% 100% no-repeat;
  transform: scaleX(var(--facing, 1));
  image-rendering: pixelated;
  transform-origin: bottom;
  animation: breathe 2.8s ease-in-out infinite;
}
.walking .actor-sprite {
  animation: stride 0.36s steps(1, end) infinite;
}
.held-tool {
  position: absolute;
  left: 45%;
  bottom: 18%;
  width: 90%;
  height: 54%;
  object-fit: contain;
  animation: use-gear 0.55s ease-in-out 1;
}
.destination {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 23px;
  height: 11px;
  box-shadow: 0 0 0 2px #594e32a1;
  border: 2px solid #fff2ae;
  border-radius: 50%;
  pointer-events: none;
  animation: target-pulse 0.8s infinite alternate;
}
.waypost,
.forage-node,
.sprinkler-fixture {
  position: absolute;
  transform: translate(-50%, -100%);
  padding: 0;
  isolation: isolate;
}
.waypost {
  display: grid;
  justify-items: center;
  filter: drop-shadow(2px 3px 2px #36452266);
}
.waypost span {
  display: flex;
  align-items: center;
  gap: 5px;
  font: 600 clamp(13px, 1.3vw, 20px)/1.1 var(--pixel);
  color: #422e20;
  padding: 5px 10px;
  background: linear-gradient(
    #e9c28a,
    #d2a668 47%,
    #bb8d54 48%,
    #d4a366 52%,
    #ca965a
  );
  border: 2px solid #695033;
  box-shadow:
    inset 1px 2px #f2d5a2,
    inset -2px -2px #aa774a;
  transform: rotate(-3deg);
}
.waypost i {
  height: clamp(12px, 2.2vh, 23px);
  width: 9px;
  background: linear-gradient(90deg, #71522f, #b38a57 55%, #705433);
  border: 1px solid #725132;
}
.waypost:hover span {
  filter: brightness(1.15);
}
.world .floaters,
.world .effect-layer {
  z-index: 1100;
}
.world .effect-note {
  font: 600 15px var(--pixel);
  color: #fff3b5;
  background: #2f402de8;
  border: 1px solid #e6cb94;
}
.game-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  --edge-x: max(var(--margin), env(safe-area-inset-left));
  --edge-top: max(var(--margin), env(safe-area-inset-top));
  --edge-bottom: max(var(--margin), env(safe-area-inset-bottom));
}
.game-hud button {
  pointer-events: auto;
}
.hud-nw,
.hud-ne,
.hud-sw,
.hud-se,
.hud-s {
  position: absolute;
}
.hud-nw,
.hud-ne {
  top: var(--edge-top);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
}
.hud-nw,
.hud-sw {
  left: var(--edge-x);
}
.hud-ne,
.hud-se {
  right: max(var(--margin), env(safe-area-inset-right));
}
.hud-ne {
  align-items: flex-end;
}
.hud-sw,
.hud-se,
.hud-s {
  bottom: var(--edge-bottom);
}
.gameplate,
.location-tag,
.quest-tab,
.trail-objective {
  color: #fff2cf;
  background: linear-gradient(145deg, #3c503c, #273d30 80%);
  border: 2px solid #423a29;
  box-shadow:
    inset 0 0 0 1px #c6ac77,
    inset 0 0 0 3px #516547,
    0 3px 0 #2c301fc9,
    0 5px 13px #202f2533;
  border-radius: 7px;
}
.game-hud button:hover {
  filter: brightness(1.11);
}
.hero-status,
.day-plate {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 12px;
  padding: 8px 14px 9px 8px;
}
.hero-status > b,
.hero-status span > b,
.day-plate b {
  display: block;
  font: 600 29px/0.97 var(--pixel);
  color: #ffedbe;
  text-shadow: 1px 2px #1e3427;
  letter-spacing: -0.045em;
}
.hero-status small,
.day-plate small {
  display: block;
  color: #e6dec0;
  font: 500 12px/1.3 var(--sans);
  margin: 4px 0;
}
.face-frame {
  width: 50px;
  height: 51px;
  display: block;
  overflow: hidden;
  border: 2px solid #614b30;
  border-radius: 4px;
  background: linear-gradient(#b9bc82, #e1c685);
  box-shadow: 0 0 0 1px #c7ac78;
}
.face-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}
.xp-track {
  display: block;
  width: 100%;
  height: 5px;
  border: 1px solid #1d3126;
  background: #142d22;
}
.xp-track i {
  display: block;
  height: 100%;
  background: #bdcf80;
}
.day-plate {
  gap: 10px;
  padding: 9px 12px;
}
.day-plate b {
  font-size: 21px;
  letter-spacing: -0.035em;
}
.day-plate small {
  margin: 2px 0 0;
}
.day-plate .forecast-icon > .ico {
  color: #ffd675;
}
.day-plate > .ico:last-child {
  color: #eee2bc;
  border-left: 1px solid #809077;
  box-sizing: content-box;
  padding-left: 9px;
}
.quest-tab,
.location-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font: 500 15px var(--pixel);
}
.quest-tab {
  color: #ffedc7;
  font-size: 15px;
}
.quest-tab b {
  background: #dbaa57;
  color: #45391f;
  padding: 0 4px;
  border-radius: 3px;
}
.location-tag {
  padding: 10px 12px;
  font-size: 17px;
}
.location-controls {
  display: flex;
  align-items: stretch;
  gap: 5px;
}
.return-garden {
  color: #423521;
  background: #ead09a;
  box-shadow: inset 0 0 0 1px #ffedbf, 0 3px 0 #463924;
}
@media (max-width: 960px) {
  .return-garden + .garden-map {
    justify-content: center;
    min-width: 36px;
  }
  .return-garden + .garden-map span,
  .return-garden + .garden-map .ico:last-child {
    display: none;
  }
}
.hud-s {
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.move-hint {
  background: #25372bd6;
  border: 1px solid #c0bc8e94;
  color: #fff4dc;
  font: 500 12px/1.2 var(--sans);
  padding: 6px 10px;
  border-radius: 4px;
  white-space: nowrap;
}
.belt {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: linear-gradient(#b58b52, #9b6a3d 35%, #6f4a30 90%);
  border: 3px solid #4a3928;
  box-shadow:
    inset 0 0 0 1px #efd29b,
    inset 0 0 0 3px #ab8052,
    0 4px 0 #453824cc,
    0 6px 14px #25352155;
  border-radius: 8px;
}
.belt-slot {
  position: relative;
  width: clamp(53px, 5.8vw, 83px);
  height: clamp(55px, 7.9vh, 80px);
  padding: 5px 4px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  background: linear-gradient(140deg, #cdaa78, #e0c393);
  border: 2px solid #6c5136;
  box-shadow:
    inset 1px 2px 0 #a78357,
    inset -1px -2px 0 #efcfa1;
  border-radius: 3px;
  color: #4a382a;
}
.belt-slot img {
  width: 63%;
  height: 66%;
  object-fit: contain;
  filter: drop-shadow(1px 2px 1px #584a3444);
}
.belt-slot span {
  font: 600 clamp(12px, 1vw, 15px)/1 var(--pixel);
}
.belt-slot kbd {
  position: absolute;
  right: 3px;
  top: 2px;
  color: #6c563a;
  font: 11px var(--pixel);
}
.belt-slot.equipped {
  background: linear-gradient(140deg, #98ac70, #c4d091);
  border-color: #f6d489;
  outline: 1px solid #463c26;
  box-shadow:
    inset 0 0 0 2px #607644,
    0 0 3px #f8dc8e;
}
.belt-slot.equipped:before {
  content: "";
  position: absolute;
  top: -12px;
  left: calc(50% - 5px);
  border: 5px solid transparent;
  border-top-color: #ffdd88;
}
.hud-se {
  display: flex;
  gap: 6px;
}
.quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 49px;
  min-height: 49px;
  font: 13px var(--pixel);
}
.quick-item .ico {
  color: #ebd4a0;
}
.plant-bubble {
  position: absolute;
  top: clamp(105px, calc(var(--by) - var(--bed-size) * 0.83 - 83px), 75%);
  left: clamp(107px, var(--bx), calc(100% - 107px));
  transform: translateX(-50%);
  z-index: 1200;
  min-width: 185px;
  padding: 10px 13px;
  color: #fff1ca;
  background: #2b4031f7;
  border: 2px solid #ba996b;
  border-radius: 7px;
  box-shadow: 0 3px 0 #273426;
}
.plant-bubble:after {
  content: "";
  position: absolute;
  left: 45%;
  bottom: -9px;
  border: 7px solid transparent;
  border-top-color: #ba996b;
  border-bottom: 0;
}
.plant-bubble strong {
  font: 600 19px var(--pixel);
  padding-right: 16px;
}
.plant-bubble small {
  display: block;
  color: #e0d8b6;
  font-size: 11px;
  margin: 2px 0 7px;
}
.plant-bubble > div {
  display: flex;
  gap: 5px;
}
.bubble-action {
  display: flex;
  gap: 4px;
  align-items: center;
  border: 1px solid #879368;
  padding: 5px 8px;
  background: #50674a;
  color: #fff9dc;
  border-radius: 3px;
  font: 14px var(--pixel);
}
.bubble-close {
  position: absolute;
  right: 4px;
  top: 4px;
  color: #f5e2c0;
  padding: 3px;
}
.forage-node {
  width: min(12vw, 18vh);
  min-width: 60px;
}
.forage-node img,
.sprinkler-fixture img {
  width: 100%;
  display: block;
  filter: drop-shadow(2px 4px 2px #30482266);
}
.forage-node i {
  position: absolute;
  right: 6%;
  top: -6%;
  color: #fff2ab;
  font-size: 22px;
  text-shadow: 0 0 7px #d7a634;
  animation: twinkle 1.2s ease-in-out infinite alternate;
}
.forage-node span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -12px;
  white-space: nowrap;
  font: 14px var(--pixel);
  background: #333e2de8;
  color: #fff2cb;
  border: 1px solid #cbb687;
  padding: 2px 5px;
  border-radius: 3px;
}
.trail-objective {
  padding: 10px 18px;
  text-align: center;
}
.trail-objective b,
.trail-objective span {
  display: block;
}
.trail-objective b {
  font: 22px var(--pixel);
}
.trail-objective span {
  font: 12px var(--sans);
  margin-top: 3px;
}
.sprinkler-fixture {
  width: min(6vw, 10vh);
}
.sky-heatwave .world {
  filter: sepia(0.15) saturate(1.17);
}
.sky-heatwave .world:before {
  background: linear-gradient(
    118deg,
    #ffe79f30,
    transparent 46%,
    #f2b34b26 70%,
    transparent
  );
  animation: heat 4s infinite alternate;
}
.sky-cold-snap .world {
  filter: saturate(0.76) brightness(1.04);
}
.sky-cold-snap .world:before {
  background: #bedff82a;
}
.sky-downpour .world {
  filter: saturate(0.78) brightness(0.78);
}
.snow {
  position: absolute;
  top: 0;
  color: white;
  font-size: 19px;
  animation: rain 4s infinite linear;
}
.assembling > img:first-child {
  animation: built 1.13s step-end;
}
.world .plot .build-frame,
.world .plot .build-planks {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  animation: frame-in 1.1s steps(1) both;
}
.world .plot .build-planks {
  animation: planks-in 1.1s steps(1) both;
}
@keyframes built {
  0%,
  92% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes frame-in {
  0%,
  100% {
    opacity: 0;
  }
  36%,
  92% {
    opacity: 1;
  }
}
@keyframes planks-in {
  0%,
  35% {
    opacity: 1;
  }
  36%,
  100% {
    opacity: 0;
  }
}
@keyframes stride {
  0%,
  100% {
    background-position: 50% 100%;
    translate: 0 0;
  }
  25%,
  75% {
    background-position: 0 100%;
    translate: 0 -1px;
  }
  50% {
    background-position: 100% 100%;
    translate: 0 0;
  }
}
@keyframes breathe {
  50% {
    scale: 1 1.012;
  }
}
@keyframes target-pulse {
  to {
    opacity: 0.4;
    scale: 0.8;
  }
}
@keyframes use-gear {
  50% {
    rotate: -32deg;
    translate: -6px 3px;
  }
}
@keyframes heat {
  to {
    opacity: 0.4;
  }
}
#journal,
#modal {
  background: #faf3de;
  color: #3d432d;
  border: 3px solid #5c4b32;
  border-radius: 9px;
  box-shadow:
    inset 0 0 0 2px #d7be8d,
    0 7px 0 #362f21aa,
    0 12px 40px #192f2459;
}
dialog::backdrop {
  background: #192d2391;
  backdrop-filter: blur(2px);
}
#journal {
  width: min(920px, calc(100vw - 28px));
  max-height: min(84dvh, 820px);
  padding: 0;
  overflow: hidden;
}
#journal[open] {
  display: flex;
  flex-direction: column;
}
.folio-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #344936;
  border-bottom: 3px solid #9b7b4f;
  color: #ffedc9;
  padding: 8px 15px;
  font: 20px var(--pixel);
}
.folio-top > span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.folio-top .mini-btn {
  color: #f1e4c2;
  background: #465c43;
  border-color: #8d9876;
}
.folio-body {
  min-height: 0;
  overflow: auto;
  padding: 20px;
  overscroll-behavior: contain;
}
.folio-body .page-head h1,
.modal-head h2,
.folio-body h2 {
  font-family: var(--pixel);
  letter-spacing: -0.04em;
}
.folio-body .page-head h1 {
  font-size: 2.1rem;
}
.folio-body .cards {
  grid-template-columns: repeat(auto-fit, minmax(213px, 1fr));
}
.folio-body .collection {
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
}
.folio-body .content-card {
  border-radius: 5px;
  background: #fff9e7;
  border-color: #d8cba9;
}
.folio-body .content-card h2 {
  font-size: 1.3rem;
}
.tool-card-head .tool-icon {
  width: 65px;
  height: 64px;
  background: #ede2c5;
}
.tool-icon img {
  max-width: 95%;
  max-height: 90%;
}
.folio-body .inside {
  padding: 12px;
}
.folio-body .card-image {
  background-color: #ebe5cd;
}
.folio-body .subhead {
  font-size: 0.85rem;
}
.trail-map {
  position: relative;
  background: url("assets/trail-map.webp") center / 100% 100%;
  aspect-ratio: 3 / 2;
  border: 2px solid #b4915c;
  border-radius: 4px;
}
.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  background: #3e553e;
  color: #fff6d6;
  border: 2px solid #e4c48b;
  border-radius: 50%;
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  box-shadow: 0 2px 0 #6e5534;
}
.map-pin span {
  position: absolute;
  top: calc(100% + 3px);
  background: #473d2de6;
  color: #fff1cf;
  border: 1px solid #ceac72;
  white-space: nowrap;
  padding: 4px 8px;
  font: 15px var(--pixel);
  border-radius: 4px;
}
.map-pin.current {
  outline: 3px solid #fff0a3;
}
.map-pin.locked {
  background: #746858;
}
.map-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 0;
}
.map-caption h2 {
  font-size: 1.5rem;
}
.map-caption p {
  font-size: 0.85rem;
  margin: 5px 0;
}
.map-caption small {
  font-size: 0.76rem;
}
.pause-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.pause-options .choice {
  justify-content: flex-start;
  gap: 8px;
  font-size: 0.83rem;
}
html:not([data-installable]) [data-install-app] { display: none; }
.pause-foot {
  flex-wrap: wrap;
  gap: 6px 12px;
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  font-size: 0.76rem;
  color: var(--muted);
}
.pause-foot a {
  color: var(--green);
}
.build-recipe,
.gear-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #eae1c8;
  padding: 10px;
  margin-bottom: 13px;
  border: 1px solid #c8b58e;
  border-radius: 4px;
}
.build-recipe img {
  width: 23%;
  height: 58px;
  object-fit: contain;
}
.gear-display img {
  height: 75px;
}
.ingredient {
  height: 34px;
  width: 37px;
  object-fit: contain;
}
.forecast {
  padding: 12px;
  background: #e7e9d1;
  border: 1px solid #c2ccab;
  margin-bottom: 12px;
  border-radius: 5px;
}
.forecast p {
  font-size: 0.84rem;
  line-height: 1.45;
  margin-top: 4px;
}
.return-note {
  position: absolute;
  z-index: 10;
  left: 50%;
  top: 14%;
  transform: translateX(-50%);
  width: min(460px, 90vw);
  box-shadow: 0 4px 15px #263b2860;
}
.starter-kit {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-block: 1px solid #d3c5a3;
  padding: 7px 0;
  margin-bottom: 15px;
  font: 17px var(--pixel);
}
.starter-kit img {
  height: 36px;
  width: 36px;
  object-fit: contain;
}
#toasts {
  bottom: max(112px, 15vh);
}
@media (orientation: portrait) {
  .world {
    --bed-size: min(32vw, 21vh);
  }
  .world[data-environment="meadow"] {
    --terrain: url("assets/meadow-portrait.webp") !important;
  }
  .play-scene .world {
    background-size: 100% 100%;
  }
  .world:not([data-environment="meadow"]) {
    background-size: cover;
  }
  .gardener {
    height: clamp(68px, 11vh, 145px);
  }
  .hud-sw,
  .hud-se {
    bottom: calc(var(--edge-bottom) + 90px);
  }
  .hud-s {
    bottom: var(--edge-bottom);
  }
  .move-hint {
    font-size: 10px;
  }
  .waypost span {
    font-size: 13px;
  }
  .quick-item {
    min-width: 41px;
    min-height: 40px;
  }
  .trail-objective {
    width: min(340px, 92vw);
  }
  .forage-node {
    width: 21vw;
  }
  .sprinkler-fixture {
    width: 13vw;
  }
}
@media (max-width: 670px) {
  .hero-status,
  .day-plate {
    gap: 6px;
    padding: 6px 8px;
  }
  .face-frame {
    width: 36px;
    height: 39px;
  }
  .hero-status span > b {
    font-size: 22px;
  }
  .day-plate b {
    font-size: 16px;
  }
  .hero-status small,
  .day-plate small {
    font-size: 10px;
  }
  .day-plate .forecast-icon > .ico {
    width: 20px;
  }
  .day-plate > .ico:last-child {
    width: 12px;
    padding-left: 4px;
  }
  .quest-tab {
    padding: 4px 7px;
    font-size: 14px;
  }
  .location-tag {
    font-size: 14px;
    padding: 7px 9px;
  }
  .belt-slot {
    width: clamp(48px, 14vw, 65px);
    height: 58px;
  }
  .belt-slot kbd {
    display: none;
  }
  .belt-slot span {
    font-size: 12px;
  }
  .hud-nw,
  .hud-ne {
    gap: 7px;
  }
  .folio-body {
    padding: 12px;
  }
  .folio-body .collection {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .map-caption {
    flex-wrap: wrap;
  }
  .map-pin span {
    font-size: 11px;
    padding: 2px 4px;
  }
  .map-pin {
    width: 27px;
    height: 27px;
  }
  .folio-body .page-head h1 {
    font-size: 1.75rem;
  }
  .folio-body .tag {
    font-size: 0.7rem;
  }
}
@media (orientation: landscape) and (max-height: 580px) {
  :root {
    --margin: 8px;
  }
  .world {
    --bed-size: min(16vw, 31vh);
  }
  .hero-status,
  .day-plate {
    padding: 4px 7px;
    gap: 6px;
  }
  .hero-status span > b,
  .day-plate b {
    font-size: 17px;
  }
  .hero-status small,
  .day-plate small {
    font-size: 9px;
    margin: 1px 0;
  }
  .face-frame {
    width: 28px;
    height: 31px;
  }
  .hud-nw,
  .hud-ne {
    gap: 4px;
  }
  .quest-tab {
    padding: 2px 7px;
    font-size: 12px;
  }
  .belt {
    padding: 3px;
    gap: 3px;
  }
  .belt-slot {
    width: 45px;
    height: 44px;
    padding: 2px;
  }
  .belt-slot span {
    font-size: 10px;
  }
  .quick-item {
    min-width: 37px;
    min-height: 35px;
    font-size: 10px;
  }
  .quick-item svg {
    width: 15px;
    height: 15px;
  }
  .location-tag {
    font-size: 12px;
    padding: 6px;
  }
  .move-hint {
    display: none;
  }
  .gardener {
    height: 18vh;
    min-height: 0;
  }
  .waypost i {
    height: 9px;
  }
  .waypost span {
    font-size: 12px;
    padding: 2px 5px;
  }
  .plant-bubble {
    top: clamp(37px, calc(var(--by) - var(--bed-size) * 0.7 - 60px), 70%);
    padding: 5px 10px;
    min-width: 153px;
  }
  .plant-bubble strong {
    font-size: 15px;
  }
  .bubble-action {
    font-size: 11px;
    padding: 3px 5px;
  }
  .plant-bubble small {
    margin-bottom: 3px;
  }
  .folio-body {
    padding: 10px;
  }
  #journal,
  #modal {
    max-height: 94dvh;
  }
  #toasts {
    bottom: 65px;
  }
  .trail-objective {
    padding: 4px 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
}
@media (orientation: portrait) {
  .move-hint {
    position: absolute;
    bottom: calc(100% + 58px);
  }
}
.plot.bare .site-lumber {
  position: absolute;
  width: 53%;
  height: auto;
  opacity: 0.88;
  bottom: 4%;
  left: 19%;
  z-index: 0;
  filter: drop-shadow(1px 2px 1px #3a482966);
}
.world .plot.mature > .leaf-crown {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  clip-path: polygon(0 0, 100% 0, 100% 25%, 0 67%);
  filter: none;
  transform-origin: 50% 70%;
  animation: leaf-sway 4.5s ease-in-out infinite alternate;
}
@keyframes leaf-sway {
  to {
    transform: skewX(0.65deg) translateX(1px);
  }
}
.water-bead {
  position: absolute;
  width: 5px;
  height: 8px;
  background: #9aeafa;
  border: 1px solid #e1fbff;
  border-radius: 80% 50% 75% 55%;
  box-shadow: 0 1px 1px #447b9a;
  pointer-events: none;
}
.water-ring {
  position: absolute;
  width: 27px;
  height: 11px;
  border: 2px solid #bcefff;
  border-radius: 50%;
  pointer-events: none;
}
.hose-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.world .rain {
  background: #cfedffcd;
}
.cover-actions {
  pointer-events: auto;
}

.actor-sprite {
  background-image: var(--walk-sheet);
}
.world .plot.behind-foliage {
  opacity: 0.48;
}
.folio-logo {
  display: block;
  width: 156px;
  height: auto;
}
.hero-status span > b {
  max-width: clamp(65px, 18vw, 240px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.first-task {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px;
  text-align: left;
  white-space: nowrap;
}
.first-task img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.first-task b,
.first-task small {
  display: block;
}
.first-task b {
  color: #ffe3a5;
  font: 600 17px/1.1 var(--pixel);
}
.first-task small {
  margin-top: 2px;
  color: #efe8c9;
  font: 12px/1.2 var(--sans);
}
.guided-site.bare:before {
  border-color: #fff1a2;
  box-shadow: 0 0 9px #efce7180;
}
.guide-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.guide-stack .move-hint {
  position: static;
}
@media (orientation: portrait) {
  .guide-stack {
    position: absolute;
    bottom: calc(100% + 51px);
  }
}
@media (orientation: landscape) and (max-height: 530px) {
  .first-task {
    padding: 3px 8px;
    gap: 6px;
  }
  .first-task img {
    height: 22px;
    width: 22px;
  }
  .first-task b {
    font-size: 14px;
  }
  .first-task small {
    font-size: 10px;
  }
}

#modal .modal-head {
  background: linear-gradient(100deg, #283e2e, #42583d);
  border-bottom: 3px solid #aa8250;
  color: #ffe9b7;
  padding: 11px 15px;
}
#modal .modal-head .round {
  color: #ffedbf;
  background: #344833;
  border-color: #ae9567;
  border-radius: 4px;
  box-shadow: 0 2px #202e22;
}
#modal:is([data-kind="profile"], [data-kind="create"]) {
  width: min(465px, calc(100vw - 22px));
  max-height: min(92dvh, 780px);
  border: 4px solid #674c32;
  outline: 1px solid #312b1e;
  background: #f3e6c6;
  border-radius: 7px;
  box-shadow:
    inset 0 0 0 2px #cab07b,
    0 5px #3e3021,
    0 15px 48px #18261963;
}
#modal:is([data-kind="profile"], [data-kind="create"])
  .modal-body {
  padding: 13px 15px 16px;
}
.garden-confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(#536b45, #3c5338);
  color: #fff1c9;
  border: 2px solid #51462e;
  box-shadow:
    inset 0 0 0 1px #acac78,
    0 2px #493d29;
  border-radius: 4px;
  padding: 5px 12px;
  font: 600 17px/1 var(--pixel);
}
.avatar-options {
  padding: 0;
  border: 0;
  margin: 9px 0 0;
  min-width: 0;
}
.avatar-options legend,
.name-field {
  font: 600 16px var(--pixel);
  color: #4a5035;
  padding: 0;
  margin-bottom: 4px;
}

/* Item popups: anchored to the clicked garden item (see placePop in app.js). */
.pop-card {
  --cc-top: #36503c;
  --cc-bottom: #263a2d;
  --cc-mid: #2e4535;
  --cc-edge: #423a29;
  --cc-ink: #fff2cb;
  --cc-dim: #cfc9a4;
  --cc-well: #1b2c21;
  --cc-cream: #f6e7bf;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 20;
  width: min(336px, calc(100vw - 20px));
  color: var(--cc-ink);
  background: linear-gradient(170deg, var(--cc-top), var(--cc-bottom));
  border: 2px solid var(--cc-edge);
  border-radius: 9px;
  box-shadow:
    inset 0 0 0 1px #c6ac77,
    inset 0 0 0 3px #516547,
    0 4px 0 #1d2a1f,
    0 16px 34px #0f190f70;
  animation: pop-in 0.16s ease-out;
  outline: none;
}
.pop-card[data-side="top"] {
  transform-origin: var(--tail, 50%) 100%;
}
.pop-card[data-side="bottom"] {
  transform-origin: var(--tail, 50%) 0;
}
.pop-card[data-side="right"] {
  transform-origin: 0 var(--tail, 50%);
}
.pop-card[data-side="left"] {
  transform-origin: 100% var(--tail, 50%);
}
@keyframes pop-in {
  from {
    opacity: 0;
    scale: 0.94;
  }
}
.pop-body {
  display: grid;
  gap: 10px;
  padding: 12px 13px 13px;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #7c8b62 transparent;
}
.pop-tail {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--cc-mid);
  border: 2px solid var(--cc-edge);
  pointer-events: none;
}
.pop-card[data-side="top"] .pop-tail {
  left: var(--tail);
  bottom: -9px;
  margin-left: -7px;
  background: var(--cc-bottom);
  border-width: 0 2px 2px 0;
  rotate: 45deg;
}
.pop-card[data-side="bottom"] .pop-tail {
  left: var(--tail);
  top: -9px;
  margin-left: -7px;
  background: var(--cc-top);
  border-width: 2px 0 0 2px;
  rotate: 45deg;
}
.pop-card[data-side="right"] .pop-tail {
  top: var(--tail);
  left: -9px;
  margin-top: -7px;
  border-width: 0 0 2px 2px;
  rotate: 45deg;
}
.pop-card[data-side="left"] .pop-tail {
  top: var(--tail);
  right: -9px;
  margin-top: -7px;
  border-width: 2px 2px 0 0;
  rotate: 45deg;
}
.pop-card[data-side="sheet"] {
  inset: auto 0 0 0 !important;
  width: 100%;
  border-radius: 12px 12px 0 0;
  border-bottom: 0;
  animation-name: pop-sheet;
}
.pop-card[data-side="sheet"] .pop-body {
  max-height: 72dvh !important;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
}
.pop-card[data-side="sheet"] .pop-tail {
  display: none;
}
@keyframes pop-sheet {
  from {
    translate: 0 40px;
    opacity: 0;
  }
}

.pop-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}
.pop-thumb {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 2px solid #b6ad74;
  border-radius: 6px;
  background: radial-gradient(ellipse at 50% 70%, #b4c285, #6f8c53 85%);
  box-shadow: inset 0 -3px #0000001f;
}
.pop-thumb img {
  width: 92%;
  height: 92%;
  object-fit: contain;
  filter: drop-shadow(1px 2px 1px #35432977);
}
.pop-name small {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--cc-dim);
  font: 12px/1.2 var(--pixel);
}
.pop-name h2 {
  margin-top: 3px;
  color: #ffe4a2;
  font: 600 21px/1.05 var(--pixel);
  overflow-wrap: anywhere;
}
.care-rarity {
  padding: 1px 5px 2px;
  border-radius: 3px;
  color: #1f2b1f;
  background: #b5ce6a;
  font-size: 11px;
}
.care-rarity.special {
  background: #c7a7ea;
}
.care-rarity.rare {
  background: #f1c75b;
}
.pop-close {
  align-self: start;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #6f7f5c;
  border-radius: 6px;
  color: var(--cc-ink);
  background: #00000024;
}
.pop-close:hover {
  background: #ffffff18;
}

.pop-meters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 9px 11px 10px;
  border-radius: 7px;
  background: var(--cc-well);
  box-shadow: inset 0 1px 2px #0000004d;
}
.pop-meter span {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5px;
  color: var(--cc-dim);
  font: 12px var(--pixel);
}
.pop-meter b {
  color: var(--cc-ink);
  font-weight: 600;
}
.pop-meter i {
  position: relative;
  display: block;
  height: 7px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    var(--fill) var(--value),
    #0e1a13 var(--value)
  );
  box-shadow: 0 0 0 1px #0b140e;
}
.pop-meter em {
  position: absolute;
  left: var(--ideal);
  top: -3px;
  bottom: -3px;
  width: 2px;
  margin-left: -1px;
  background: var(--cc-ink);
  box-shadow: 0 0 0 1px #0b140e;
}

.care-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font: 13px var(--pixel);
}
.care-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 4px 7px;
  border-radius: 99px;
  color: var(--cc-ink);
  background: #ffffff14;
}
.care-pill.warn {
  color: #ffc9a0;
  background: #e2894f30;
}
.care-pill.good {
  color: #d9eca0;
  background: #b5ce6a2b;
}
.care-coins {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #f5dc8f;
}

.pop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pop-act {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 5px 10px;
  border: 2px solid #5b4a2e;
  border-radius: 6px;
  color: #3b3423;
  background: linear-gradient(var(--cc-cream), #e3cd96);
  box-shadow:
    inset 0 0 0 1px #fff8de,
    0 2px #2d2516;
  font: 600 15px/1 var(--pixel);
  white-space: nowrap;
}
.pop-act img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.pop-act:not(:disabled):hover {
  filter: brightness(1.06);
}
.pop-act:not(:disabled):active {
  translate: 0 2px;
  box-shadow: inset 0 0 0 1px #fff8de;
}
.pop-act:disabled {
  opacity: 1;
  color: #aeb293;
  border-color: #ffffff1c;
  background: #ffffff0d;
  box-shadow: none;
}
.pop-act:disabled img {
  opacity: 0.55;
  filter: grayscale(0.7);
}
.pop-act.urgent {
  border-color: #6b3a1d;
  background: linear-gradient(#f6c18f, #e2955f);
  color: #3a2312;
}
.pop-act.harvest {
  flex-basis: 100%;
  border-color: #6a4e18;
  background: linear-gradient(#ffe492, #e8b94a);
  color: #3a2b0c;
}

.care-settings {
  display: grid;
  gap: 9px;
  padding-top: 10px;
  border-top: 1px dashed #c6ac7755;
}
.care-set {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.care-set legend {
  float: left;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 5px;
  padding: 0;
  color: var(--cc-ink);
  font: 600 14px var(--pixel);
}
.care-set legend small {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--cc-dim);
  font: 11px/1.2 var(--sans);
  text-align: right;
}
.care-set legend small:before {
  content: "";
  width: 5px;
  height: 5px;
  background: #b5ce6a;
  box-shadow: 0 0 0 1px #0f1a13;
}
.care-seg {
  clear: both;
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: 7px;
  background: var(--cc-well);
  box-shadow: inset 0 1px 2px #00000059;
}
.care-seg button {
  position: relative;
  flex: 1 1 auto;
  min-height: 31px;
  padding: 5px 6px;
  border-radius: 5px;
  color: #e6dfbd;
  font: 13px var(--pixel);
  white-space: nowrap;
}
.care-seg button:not(:disabled):hover {
  background: #ffffff14;
}
.care-seg button[aria-pressed="true"] {
  opacity: 1;
  color: #33301f;
  background: linear-gradient(var(--cc-cream), #e3cd96);
  box-shadow:
    inset 0 0 0 1px #fff8de,
    0 1px 0 #00000080;
}
.care-seg button:disabled:not([aria-pressed="true"]) {
  opacity: 0.38;
}
.care-star {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 5px;
  height: 5px;
  background: #b5ce6a;
  box-shadow: 0 0 0 1px #0f1a13;
}
.pop-note {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--cc-dim);
  font: 12px/1.35 var(--sans);
}
.pop-note img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}
.pop-name small {
  flex-wrap: wrap;
}
.pop-thumb.dead img {
  filter: grayscale(0.9) sepia(0.6) brightness(0.7);
}
.pop-meters.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pop-copy {
  color: #e8e2c2;
  font: 13px/1.45 var(--sans);
}
.pop-warn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border-radius: 6px;
  color: #ffc9a0;
  background: #e2894f26;
  font: 12px/1.35 var(--sans);
}
.pop-warn .ico {
  flex-shrink: 0;
}
.pop-recipe {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding: 8px 11px;
  border-radius: 7px;
  background: var(--cc-well);
  box-shadow: inset 0 1px 2px #0000004d;
  font: 13px var(--pixel);
}
.pop-recipe span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.pop-recipe img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.pop-recipe b {
  color: #ffe4a2;
}
.pop-recipe small {
  margin-left: auto;
  color: var(--cc-dim);
  font: 11px var(--sans);
}
.pop-group {
  display: grid;
  gap: 6px;
}
.pop-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  color: var(--cc-ink);
  font: 600 14px var(--pixel);
}
.pop-label small {
  color: var(--cc-dim);
  font: 11px var(--sans);
}
.pop-list {
  display: grid;
  gap: 5px;
}
.pop-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 6px 10px 6px 7px;
  border: 1px solid #ffffff1a;
  border-radius: 7px;
  text-align: left;
  color: var(--cc-ink);
  background: #ffffff0d;
}
.pop-row:not(:disabled):hover {
  border-color: #c6ac7799;
  background: #ffffff1a;
}
.pop-row img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(1px 2px 1px #0000004d);
}
.pop-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.pop-row b {
  font: 600 15px/1.1 var(--pixel);
}
.pop-row small {
  color: var(--cc-dim);
  font: 11px/1.3 var(--sans);
}
.pop-row em {
  padding: 2px 7px 3px;
  border-radius: 99px;
  color: var(--cc-dim);
  background: #00000033;
  font: normal 12px var(--pixel);
  white-space: nowrap;
}
.pop-row.fit {
  border-color: #b5ce6a66;
  background: #b5ce6a1a;
}
.pop-row.fit small {
  color: #d9eca0;
}
.pop-row:disabled {
  opacity: 0.45;
}
.pop-body > .pop-act {
  justify-self: start;
  flex: none;
}
@media (max-width: 380px), (max-height: 520px) {
  .pop-body {
    gap: 8px;
    padding: 10px 11px 11px;
  }
  .pop-head {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }
  .pop-thumb {
    width: 44px;
    height: 44px;
  }
  .pop-name h2 {
    font-size: 18px;
  }
  .pop-act {
    min-height: 36px;
    font-size: 14px;
  }
  .care-seg button {
    min-height: 28px;
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pop-card {
    animation: none;
  }
}
.avatar-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}
.avatar-options label {
  position: relative;
  cursor: pointer;
}
.avatar-options input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.avatar-choice {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: end;
  padding: 8px 2px 5px;
  color: #394b32;
  text-align: center;
  border: 2px solid #af9c70;
  border-radius: 4px;
  background: radial-gradient(ellipse at 50% 80%, #ece0b4, #c7cda1);
}
.avatar-choice i {
  width: 100%;
  height: 95px;
  max-width: 51px;
  background-size: 300% 100%;
  background-position: 0 100%;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}
.avatar-choice b {
  font: 500 13px var(--pixel);
  margin-top: 4px;
}
.avatar-options input:checked + span {
  border-color: #805729;
  background: radial-gradient(ellipse at 50% 70%, #fceabd, #dfbc70);
  box-shadow: inset 0 0 0 2px #ffecb3;
}
.avatar-options input:checked + span:after {
  content: "✓";
  position: absolute;
  right: 3px;
  top: 1px;
  color: #435934;
}
.avatar-options input:focus-visible + span {
  outline: 2px solid #3b674e;
  outline-offset: 1px;
}
.name-field {
  display: block;
  margin: 16px 0 13px;
}
.name-field input {
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  background: #fff7dc;
  border: 2px solid #9a835d;
  border-radius: 4px;
  font: 16px var(--sans);
  color: #344533;
}
.starter-pack {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  padding: 8px 0 12px;
  border-top: 1px dashed #b29c71;
}
.starter-pack b {
  width: 100%;
  font: 600 16px var(--pixel);
}
.starter-pack span {
  display: flex;
  align-items: center;
  gap: 4px;
  font: 13px var(--sans);
}
.starter-pack img {
  width: 23px;
  height: 23px;
  object-fit: contain;
}
.garden-confirm {
  min-height: 38px;
  width: 100%;
}
@media (max-height: 500px) and (orientation: landscape) {
  #modal:is([data-kind="profile"], [data-kind="create"]) {
    max-height: 94dvh;
  }
}

.habitat {
  position: absolute;
  transform: translate(-50%, -100%);
  display: grid;
  place-items: end center;
  border: 0;
  background: transparent;
  padding: 0;
  min-width: 44px;
  height: clamp(48px, 12vmin, 112px);
  width: clamp(47px, 10vmin, 100px);
}
.habitat-feeder {
  height: clamp(69px, 16vmin, 146px);
  width: clamp(45px, 7vmin, 69px);
}
.habitat-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(2px 3px 1px #32442455);
}
.habitat:hover .habitat-art,
.habitat:focus-visible .habitat-art {
  filter: drop-shadow(0 0 2px #ffe7a6);
}
.visiting-robin {
  position: absolute;
  width: 25%;
  right: 8%;
  bottom: 73%;
  pointer-events: none;
  transform-origin: center bottom;
  animation: robin-visit 14s infinite;
}
.habitat-feeder .visiting-robin {
  width: 39%;
  right: 2%;
  bottom: 55%;
  animation-delay: -5s;
}
@keyframes robin-visit {
  0%,
  10%,
  87%,
  100% {
    opacity: 0;
    transform: translate(80%, -100%) rotate(8deg);
  }
  18%,
  38%,
  46%,
  63%,
  80% {
    opacity: 1;
    transform: none;
  }
  42%,
  67% {
    opacity: 1;
    transform: rotate(-13deg);
  }
  72% {
    opacity: 1;
    transform: translate(-3%, -8%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .visiting-robin {
    animation: none;
  }
}
.wildlife-recipes {
  margin: 18px 0;
}
.wildlife-recipes > h2 {
  margin: 0;
  font: 600 23px var(--pixel);
}
.wildlife-recipes > small {
  color: #61694e;
}
.habitat-recipes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr));
  gap: 8px;
  margin-top: 8px;
}
.habitat-recipes article {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  background: #f0e3c2;
  border: 2px solid #ad986c;
  border-radius: 5px;
  padding: 10px;
}
.habitat-portrait {
  display: grid;
  place-items: center;
  align-self: start;
  height: 93px;
  border: 1px solid #a2a277;
  background: radial-gradient(#e7dfb6, #b3be8c);
}
.habitat-portrait img {
  max-width: 90%;
  max-height: 86px;
}
.habitat-recipes h3 {
  margin: 0;
  font: 600 19px var(--pixel);
}
.habitat-recipes p {
  margin: 4px 0;
  font-size: 13px;
  line-height: 1.35;
}
.habitat-recipes .garden-confirm {
  margin-top: 6px;
  width: auto;
  display: flex;
  font-size: 14px;
  min-height: 32px;
}
.bird-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0;
  color: #445438;
  font-size: 13px;
}
.bird-note img {
  width: 19px;
  height: 19px;
  object-fit: contain;
}
.habitat-peek {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 10px;
  background: radial-gradient(ellipse at bottom, #d6dfac, #b7c396);
  border: 2px solid #ac9d72;
}
.habitat-peek img:first-child {
  height: 115px;
}
.habitat-peek img:last-child {
  width: 27px;
}

@media (min-width: 960px) and (min-height: 581px) and (orientation: landscape) and (pointer: fine) {
  .world {
    --bed-size: min(13vw, 24vh, 224px);
  }
  .gardener {
    height: clamp(68px, 12vh, 124px);
  }
  .belt {
    padding: 5px;
    gap: 3px;
  }
  .belt-slot {
    width: clamp(51px, 4.6vw, 66px);
    height: clamp(52px, 6.6vh, 63px);
  }
  .belt-slot span {
    font-size: 12px;
  }
  .hero-status,
  .day-plate {
    padding: 6px 10px;
    gap: 8px;
  }
  .hero-status span > b {
    font-size: 23px;
  }
  .face-frame {
    width: 40px;
    height: 42px;
  }
  .day-plate b {
    font-size: 18px;
  }
  .waypost span {
    font-size: clamp(13px, 1.1vw, 17px);
  }
  .waypost i {
    height: clamp(12px, 1.8vh, 18px);
  }
  .forage-node {
    width: min(9.8vw, 15vh, 144px);
  }
  .sprinkler-fixture {
    width: min(5vw, 8.5vh, 80px);
  }
}

.garden-clock {
  padding: 4px 7px;
  color: #ffedc4;
  font: 500 13px/1.1 var(--pixel);
  font-variant-numeric: tabular-nums;
}
.sky-light {
  position: absolute;
  inset: 0;
  z-index: 950;
  pointer-events: none;
  background: linear-gradient(
    148deg,
    rgb(255 177 96 / 0.48),
    rgb(230 132 97 / 0.19) 52%,
    rgb(106 72 135 / 0.36)
  );
  opacity: var(--warmth, 0);
}
.world:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 951;
  pointer-events: none;
  background: linear-gradient(
    138deg,
    rgb(20 39 84 / 0.63),
    rgb(29 46 90 / 0.53) 55%,
    rgb(17 30 65 / 0.7)
  );
  opacity: var(--darkness, 0);
}
.sky-light i {
  display: block;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 9% 15%, #ffe1ad55, transparent 62%);
}
.waypost[data-do="shed"]:after {
  content: "";
  position: absolute;
  right: -4px;
  top: 74%;
  width: 7px;
  height: 9px;
  border-radius: 2px 2px 3px 3px;
  border: 1px solid #64462a;
  background: #ffe69d;
  box-shadow:
    0 0 4px 2px #ffe79c,
    0 0 12px 5px #ffd88dba,
    0 0 27px 12px #ffe8a25c;
  opacity: var(--darkness, 0);
  pointer-events: none;
}
.play-scene[data-phase="Night"] .visiting-robin,
.play-scene[data-phase="Night"] .butterfly {
  visibility: hidden;
}
.play-scene:is([data-phase="Night"], [data-phase="Dusk"]) .mote {
  background: #fff5a3;
  box-shadow:
    0 0 3px 1px #f4ff8e,
    0 0 9px 3px #e3ef7185;
  animation:
    drift var(--t) ease-in-out calc(var(--d) - var(--now, 0s)) infinite alternate,
    firefly-glow 3.8s ease-in-out calc(var(--d) - var(--now, 0s)) infinite alternate;
}
.play-scene.rainy .mote,
.play-scene.sky-cold-snap .mote {
  display: none;
}
@keyframes firefly-glow {
  from {
    opacity: 0.06;
  }
  65%,
  to {
    opacity: 0.94;
  }
}
@media (max-width: 670px), (max-height: 580px) {
  .garden-clock {
    font-size: 11px;
    padding: 3px 5px;
  }
}

/* Horizontal 2.5D beds: the plants and front lip share a level soil plane. */
.front-planter {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.24;
  filter: drop-shadow(1px 4px 2px #20311e55);
}
.world .plot .front-planter img {
  position: absolute;
  filter: none;
  translate: none;
  transition: none;
}
.world .plot .planter-base,
.world .plot .planter-lip {
  bottom: 0;
  left: 0;
  width: 100%;
}
.world .plot .planter-lip {
  clip-path: inset(48% 0 0);
  z-index: 3;
}
.crop-group {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.world .plot .crop {
  bottom: 23%;
  left: var(--crop-left);
  transform: translateX(-50%);
  width: 36%;
  height: var(--crop-height);
  object-fit: contain;
  object-position: center bottom;
}
.world .plot.box-small { width: calc(var(--bed-size) * .8); }
.world .plot.box-medium { width: calc(var(--bed-size) * .93); }
.world .plot.box-lined .planter-base,
.world .plot.box-lined .planter-lip { filter: brightness(.78) saturate(.9); }
.world .plot.box-slatted .planter-base,
.world .plot.box-slatted .planter-lip { filter: saturate(.5) brightness(1.17); }
.world .plot .construction-lumber {
  bottom: 8%;
  left: 24%;
  width: 52%;
  z-index: 4;
}
.world .plot.building .front-planter { opacity: .75; }
.world .plot:hover .front-planter,
.world .plot.selected .front-planter {
  filter: drop-shadow(1px 0 #ffe6a4) drop-shadow(-1px 0 #ffe6a4) drop-shadow(0 3px 2px #24311d66);
}
.world .bare:before {
  transform: none;
  border-radius: 4px;
  inset: 27% 3% 7%;
}
.bed-canopy {
  position: absolute;
  inset: 0 0 11%;
  pointer-events: none;
  z-index: 4;
}
.bed-canopy svg { display: block; width: 100%; height: 100%; overflow: visible; }
.canopy-posts { fill: none; stroke: #88603a; stroke-width: 3; }
.canopy-roof { stroke: #655a3b; stroke-width: 2; fill: #547147c9; }
.canopy-ribs { fill: none; stroke: #d0c7a0; stroke-width: 1.4; }
.cover-rain .canopy-roof { fill: #badde94d; stroke: #94b9b6; }
.cover-frost .canopy-roof { fill: #eee8d6c7; stroke: #c2bbaa; }
.bed-readout {
  position: absolute;
  left: 50%;
  top: calc(100% + 4px);
  transform: translateX(-50%);
  min-width: 88px;
  max-width: 140px;
  padding: 3px 6px 4px;
  border: 1px solid #d3c4918c;
  border-radius: 4px;
  background: #233c2eea;
  color: #f8efd2;
  font: 600 10px/1.3 var(--sans);
  pointer-events: none;
  box-shadow: 0 2px 3px #15251a38;
}
.bed-readout > span { display: flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; }
.bed-readout.is-attention { color: #ffe0a9; border-color: #e5ae66; }
.bed-readout.is-ready { color: #d8efad; border-color: #c4db8d; }
.bed-growth { display: block; height: 3px; background: #0e201e; margin-top: 3px; overflow: hidden; border-radius: 2px; }
.bed-growth > i { display: block; height: 100%; background: #bad789; }

/* Garden status and inventory share the same HUD column. */
.hud-summary {
  position: absolute;
  top: var(--edge-top);
  left: 50%;
  transform: translateX(-50%);
  width: min(350px, 33vw);
  display: grid;
  gap: 5px;
}
.hud-resources {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 5px;
}
.hud-resources span {
  display: grid;
  gap: 2px;
  padding: 2px;
}
.hud-resources small {
  color: #e6dec0;
  font: 500 11px/1.2 var(--sans);
}
.hud-resources b {
  color: #ffedbe;
  font: 600 18px/1 var(--pixel);
  overflow-wrap: anywhere;
}
.garden-overview {
  padding: 10px 12px 8px;
  text-align: left;
}
.overview-heading, .overview-counts, .overview-counts > span, .overview-foot,
.hud-quests-title { display: flex; align-items: center; gap: 6px; }
.overview-heading b { font: 20px/1.1 var(--pixel); }
.overview-heading small { margin-left: auto; color: #d0e4b9; font-size: 11px; white-space: nowrap; }
.overview-counts { justify-content: space-between; margin-top: 8px; gap: 8px; font-size: 10px; }
.overview-counts b { font-size: 15px; }
.overview-counts .attention { color: #ffcf92; }
.overview-foot { justify-content: flex-end; font-size: 10px; color: #c6ccb0; margin-top: 5px; }
.hud-quests {
  position: absolute;
  left: var(--edge-x);
  top: calc(var(--edge-top) + 118px);
  width: 244px;
  padding: 10px 12px;
  pointer-events: auto;
}
.hud-quests-title { margin-bottom: 5px; }
.hud-quests-title b { font: 18px/1 var(--pixel); }
.hud-quests-title small { margin-left: auto; font-size: 10px; color: #d4dbbd; }
.hud-quest { display: flex; align-items: center; gap: 7px; min-height: 32px; border-top: 1px solid #d7c79526; font-size: 11px; }
.quest-name { flex: 1; }
.quest-progress { color: #e5d299; min-width: 23px; font-size: 10px; font-variant-numeric: tabular-nums; }
.quest-reward { font-size: 9px; color: #d3c69e; white-space: nowrap; }
.hud-quest.is-done .quest-name { color: #bdc9ad; }
.quest-claim { background: #e8c583; color: #2a3d27; padding: 6px; border-radius: 3px; font: 700 10px var(--sans); white-space: nowrap; }
.overview-intro { font-size: 13px; line-height: 1.5; margin-bottom: 12px; }
.overview-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: #55613b; }
.overview-area h3 { margin-top: 20px; margin-bottom: 6px; font: 23px var(--pixel); }
.overview-bed { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.overview-bed > div { flex: 1; min-width: 0; }
.overview-bed b { font-size: 13px; }
.overview-bed p { font-size: 11px; line-height: 1.5; margin: 3px 0; }
.overview-bed small { display: block; font-size: 10px; line-height: 1.5; }
.overview-bed-icon { color: #577044; }
.overview-bed.is-attention .overview-bed-icon { color: #a35c32; }
.overview-bed .mini-btn { min-height: 36px; }
@media (max-width: 1050px) and (orientation: landscape) {
  .hud-summary { width: 280px; }
  .garden-overview { padding: 7px 9px; }
  .overview-heading b { font-size: 17px; }
  .overview-heading small { font-size: 10px; }
  .hud-quests { width: 204px; padding: 7px 9px; }
  .hud-quest { font-size: 10px; gap: 4px; }
}
@media (orientation: portrait) {
  .hud-summary { top: calc(var(--edge-top) + 106px); left: var(--edge-x); transform: none; width: calc(36% - var(--edge-x) - 3px); }
  .hud-resources { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 3px; }
  .hud-resources small { font-size: 10px; }
  .hud-resources b { font-size: 15px; }
  .garden-overview { min-height: 120px; padding: 8px; }
  .overview-heading { display: block; }
  .overview-heading > .ico { display: none; }
  .overview-heading b { display: block; font-size: 16px; }
  .overview-heading small { display: block; margin-top: 4px; font-size: 10px; }
  .overview-counts { margin-top: 5px; align-items: flex-start; flex-direction: column; gap: 2px; font-size: 9px; }
  .overview-counts b { font-size: 12px; }
  .overview-foot { display: none; }
  .hud-quests { top: calc(var(--edge-top) + 106px); left: auto; right: var(--edge-x); width: calc(64% - var(--edge-x) - 3px); min-height: 120px; padding: 7px; }
  .hud-quests-title { margin-bottom: 2px; }
  .hud-quests-title b { font-size: 15px; }
  .hud-quests-title > .ico { display: none; }
  .hud-quests-title small { font-size: 9px; }
  .hud-quest { min-height: 30px; font-size: 10px; gap: 4px; }
  .quest-progress { min-width: 18px; }
  .quest-reward { font-size: 8px; }
  .quest-claim { padding: 5px; font-size: 9px; }
  .bed-readout { min-width: 75px; max-width: 105px; font-size: 9px; padding: 2px 4px; }
  .trail-gate span { font-size: 12px; padding: 4px 6px; }
  .trail-gate span .ico { display: none; }
}
@media (orientation: landscape) and (max-height: 580px) {
  .hud-summary { width: 270px; }
  .garden-overview { padding: 6px 9px; }
  .overview-foot { display: none; }
  .overview-counts { margin-top: 4px; }
  .hud-quests { top: calc(var(--edge-top) + 82px); width: 194px; }
  .hud-quest { min-height: 27px; font-size: 9px; }
  .quest-reward { font-size: 8px; }
  .hud-quests-title b { font-size: 16px; }
  .bed-readout { min-width: 72px; max-width: 100px; font-size: 8px; }
}

/* Loading splash shown until the garden renders */
.boot {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background:
    linear-gradient(#182c22b8, #182c22d9),
    url("/assets/cover.webp?v=glasshouse") center / cover;
}
.boot img {
  width: min(70vw, 420px);
  height: auto;
}
.boot p,
.boot noscript {
  font: 500 18px/1.3 var(--pixel);
  color: #fff2cb;
  text-shadow: 1px 2px #14241b;
}

.forecast-icon {
  display: grid;
  place-items: center;
  line-height: 1;
}
.world:not([data-trail]):after {
  mask-image: radial-gradient(ellipse 6% 8% at 83% 34%, #0005, black);
}
@media (orientation: portrait) {
  .world:not([data-trail]):after {
    mask-image: radial-gradient(ellipse 9% 6% at 84% 30%, #0005, black);
  }
}

/* Overhead home garden, with the walking scale retained on the trails. */
.garden-view .world {
  --bed-size: min(14vw, 23vh, 184px);
}
.garden-view .gardener {
  height: clamp(58px, 12.3vh, 114px);
}
.garden-view .plot:not(.bare) {
  transform: translate(-50%, -100%);
  transform-origin: center bottom;
}
.world[data-environment="greenhouse"] .rain,
.world[data-environment="greenhouse"] .snow {
  display: none;
}
.glasshouse-building {
  position: absolute;
  width: clamp(54px, 8.2vw, 134px);
  padding: 0;
  transform: translate(-50%, -100%);
}
.glasshouse-building img {
  width: 100%;
  display: block;
  filter: drop-shadow(2px 3px 2px #24312166);
}
.glasshouse-recipe {
  display: grid;
  grid-template-columns: minmax(65px, 22%) 1fr;
  align-items: center;
  gap: 14px;
  background: #e5e5c8;
  border: 2px solid #a3a276;
  padding: 12px;
  border-radius: 5px;
  margin: 12px 0;
}
.glasshouse-recipe img {
  width: 100%;
  max-height: 110px;
  object-fit: contain;
}
.glasshouse-recipe h2 {
  margin: 0;
}
.glasshouse-recipe p {
  margin: 4px 0;
  font-size: 14px;
}
.glasshouse-recipe small {
  display: block;
}
.glasshouse-recipe button {
  width: auto;
  margin-top: 6px;
}
.visit-name,
.visit-tip {
  padding: 8px 12px;
}
.visit-name small,
.visit-name b {
  display: block;
}
.visit-name b {
  font: 600 20px var(--pixel);
}
.visit-tip {
  text-align: center;
  width: max-content;
  max-width: 85vw;
  font: 14px var(--pixel);
}
.visit-link {
  display: block;
  color: #375b39;
  text-decoration: underline;
  font: 600 14px var(--pixel);
  padding: 5px 0;
}
.setup-home {
  color: #fff1bf;
  font: 15px var(--pixel);
}
#modal[data-kind="create"] {
  background: #f3e6c6;
}
@media (orientation: portrait) {
  .world[data-environment="homestead"] {
    --terrain: url("assets/homestead-portrait.webp?v=open-yard") !important;
  }
  .garden-view .world {
    --bed-size: min(27vw, 16vh);
  }
  .garden-view .gardener {
    height: clamp(61px, 9.5vh, 110px);
  }
  .hud-se .quick-item {
    min-width: 37px;
    padding: 4px;
  }
  .visitor-hud .hud-sw {
    bottom: calc(var(--edge-bottom) + 42px);
  }
}
@media (min-width: 960px) and (min-height: 581px) and (pointer: fine) and (orientation: landscape) {
  .garden-view .world {
    --bed-size: min(11.4vw, 20.8vh, 191px);
  }
  .garden-view .gardener {
    height: clamp(61px, 10.6vh, 105px);
  }
}
@media (orientation: landscape) and (max-height: 580px) {
  .garden-view .gardener {
    height: 16vh;
    min-height: 45px;
  }
  .garden-view .world {
    --bed-size: min(13vw, 25vh);
  }
}
.picker-face {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.field-path {
  position: absolute;
  transform: translate(-50%, -100%);
  padding: 5px 8px;
  border: 1px solid #6d5535;
  border-radius: 3px;
  box-shadow: 0 2px 0 #59452d;
  background: #e4c68c;
  color: #423b27;
  white-space: nowrap;
  font: 500 14px var(--pixel);
}
.waypost span {
  white-space: nowrap;
}
.action-error {
  background: #f0d6af;
  color: #6d321e;
  padding: 8px;
  border: 1px solid #c39269;
}
@media (orientation: portrait) {
  .hud-se [data-do="page:guide"] {
    display: none;
  }
  .guide-stack {
    bottom: calc(100% + 76px);
  }
  .field-path {
    font-size: 12px;
    padding: 4px 6px;
  }
}
@media (orientation: portrait) and (max-width: 350px) {
  .hud-se {
    gap: 3px;
  }
  .hud-se .quick-item {
    font-size: 10px;
    padding: 3px;
    min-width: 34px;
  }
  .hud-sw .location-tag {
    font-size: 12px;
    gap: 3px;
    padding: 6px;
  }
}
.workshop-wallet {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #4e5134;
  font: 600 16px var(--pixel);
}

.workshop-building,
.glasshouse-building {
  position: absolute;
  padding: 0;
  transform: translate(-42%, -97%);
}
.workshop-building {
  width: clamp(100px, min(15vw, 25vh), 220px);
  aspect-ratio: 1.12;
}
.glasshouse-building {
  transform: translate(-36%, -96%);
  aspect-ratio: 1;
}
.workshop-building img,
.glasshouse-building img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(2px 4px 2px #29341a66);
}
.workshop-building:is(:hover,:focus-visible) img,
.glasshouse-building:is(:hover,:focus-visible) img {
  filter: brightness(1.12) drop-shadow(1px 2px 2px #29341a66);
}
.door-name {
  position: absolute;
  left: 42%;
  top: 100%;
  transform: translate(-50%, -8%);
  padding: 2px 7px;
  color: #fff1cb;
  background: #394430ed;
  border: 1px solid #bdab7f;
  border-radius: 3px;
  font: 500 clamp(12px, 1.1vw, 16px)/1.1 var(--pixel);
  pointer-events: none;
}
.guest-building { left:83%; top:35%; z-index:350; pointer-events:none; }
.trail-gate { transform:translate(-25%, -100%); }
.trail-minimap {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  width: clamp(120px, 15vw, 176px);
  padding: 4px;
}
.minimap-terrain {
  position: relative;
  overflow: hidden;
  background: #526547 center / 100% 100% no-repeat;
  border-radius: 2px;
}
.minimap-view {
  position: absolute;
  border: 1px solid #fff4ce;
  box-shadow: 0 0 0 200px #182b2180;
}
.minimap-key, .minimap-key span {
  display: flex;
  align-items: center;
}
.minimap-key {
  justify-content: space-evenly;
  padding-top: 4px;
  font: 600 10px/1.2 var(--sans);
}
.minimap-key span { gap: 3px; }
.minimap-player, .minimap-find, .minimap-exit {
  width: 7px;
  height: 7px;
  border: 1px solid #302f26;
}
.minimap-terrain i {
  position: absolute;
  translate: -50% -50%;
}
.minimap-player {
  z-index: 1;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff9dd;
  box-shadow: 0 0 0 1px #344a38;
}
.minimap-find { background: #ffce62; rotate: 45deg; }
.minimap-exit { background: #82dce2; }
.play-scene.trail-view {
  container-type: size;
}
.play-scene.trail-view .world {
  /* Keep the 1536 × 1024 paintings near native size, with room to pan on both axes. */
  width: max(120cqw, 180cqh, min(215cqw, 1536px));
  height: auto;
  aspect-ratio: 3 / 2;
  inset: 0 auto auto 0;
  background-size: 100% 100%;
  image-rendering: pixelated;
  will-change: transform;
}
.trail-view .world > * { image-rendering: auto; }
.trail-view .forage-node { width: clamp(45px, 6.4vw, 92px); min-width:44px; }
.trail-view .forage-node span { opacity: 0; pointer-events:none; }
.trail-view .forage-node:is(:hover,:focus-visible) span { opacity:1; }
@media (orientation:portrait) {
  .world[data-environment="homestead"] { background-size:100% 100%; }
  .workshop-building { width:clamp(91px, 26vw, 150px); }
  .guest-building { left:80%; top:41%; }
  .trail-view .forage-node { width:60px; }
}
.observed-plant { pointer-events: none; opacity: .78; }
.trail-view .forage-node.within-reach span { opacity: 1; }

/* Construction timers */
.work-timer {
  position: absolute;
  left: 50%;
  bottom: 100%;
  translate: -50% 4px;
  z-index: 3;
  padding: 1px 7px;
  font: 600 14px/1.2 var(--pixel);
  color: #ffefc6;
  background: #2f4532;
  border: 1px solid #c6ac77;
  border-radius: 4px;
  box-shadow: 0 2px 0 #1f2b1f99;
  white-space: nowrap;
  pointer-events: none;
}
.world .plot.building .build-frame,
.world .plot.building .build-planks {
  animation: none;
  opacity: 1;
}
.world .plot.building .build-frame {
  animation: hammering 0.9s steps(2) infinite;
}
.world .plot.building .build-planks {
  opacity: 0.85;
  translate: 0 6%;
}
.habitat.building .habitat-art,
.glasshouse-building.building img,
.sprinkler-fixture.building img {
  opacity: 0.55;
  filter: sepia(0.6) saturate(0.6);
}
@keyframes hammering {
  50% {
    translate: 0 -2px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .world .plot.building .build-frame {
    animation: none;
  }
}
.works-tab {
  margin-left: 6px;
}
.works-tab span {
  font-variant-numeric: tabular-nums;
}
.workbench-busy {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  padding: 8px 12px;
  border: 1px solid #aa9c71;
  background: #e8e5c7;
  border-radius: 6px;
}
.workbench-busy img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.workbench-busy span {
  flex: 1;
  display: grid;
}
.workbench-busy small {
  color: var(--muted);
}
.workbench-busy .work-timer,
.works-list .work-timer {
  position: static;
  translate: none;
}
.works-list {
  display: grid;
  gap: 8px;
}
.works-list p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #d6c8a0;
  background: #fffaea;
  border-radius: 6px;
}
.works-list img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}
.works-list span {
  flex: 1;
  display: grid;
}
.works-list .work-timer {
  flex: none;
  font-variant-numeric: tabular-nums;
}
.works-list small {
  color: var(--muted);
}
.build-wait {
  font-variant-numeric: tabular-nums;
}

/* Field identification */
#modal[data-kind="field"] {
  width: min(560px, calc(100vw - 32px));
}
.field-case {
  display: grid;
  grid-template-columns: minmax(96px, 150px) 1fr;
  gap: 14px;
  align-items: start;
}
.field-lens {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  border: 4px solid #6b5636;
  background: radial-gradient(circle at 40% 35%, #f3efd4, #cfc79f);
  box-shadow: inset 0 0 0 2px #d7be8d, 0 3px 0 #3d33229c;
}
.field-lens img {
  width: 82%;
  transition: filter 0.5s, scale 0.5s;
}
.field-lens.focus-0 img {
  filter: blur(7px) saturate(0.7);
  scale: 1.35;
}
.field-lens.focus-1 img {
  filter: blur(2.5px);
  scale: 1.15;
}
.field-lens.soil-humus img,
.field-choices .soil-humus {
  filter: brightness(0.62) saturate(0.8);
}
.field-lens.soil-sand img,
.field-choices .soil-sand {
  filter: brightness(1.25) sepia(0.55) saturate(1.2);
}
.field-lens.focus-0.soil-humus img {
  filter: blur(7px) brightness(0.62);
}
.field-lens.focus-0.soil-sand img {
  filter: blur(7px) brightness(1.25) sepia(0.55);
}
.field-lens.focus-1.soil-humus img {
  filter: blur(2.5px) brightness(0.62);
}
.field-lens.focus-1.soil-sand img {
  filter: blur(2.5px) brightness(1.25) sepia(0.55);
}
.lens-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #ffffff55, transparent 38%);
  pointer-events: none;
}
.field-clues {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}
.field-clues li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 8px 10px;
  border: 1px solid #aa9c71;
  background: #e8e5c7;
  color: #39452f;
  border-radius: 5px;
  font-size: 0.9rem;
  line-height: 1.35;
}
.field-clues li svg {
  flex: none;
  margin-top: 2px;
}
.field-clues .hidden-clue {
  border-style: dashed;
  background: transparent;
  color: var(--muted);
}
.field-verdict {
  margin: 12px 0 0;
  padding: 8px 10px;
  border-left: 3px solid #b5552f;
  background: #f5e2cf;
  color: #6c2f17;
  border-radius: 3px;
}
.field-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.field-choice {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 7px 10px;
  text-align: left;
  border: 1px solid #b9a67a;
  background: #fffaea;
  border-radius: 6px;
}
.field-choice:hover:not(:disabled) {
  background: #f1ecd0;
}
.field-choice span {
  display: grid;
  min-width: 0;
}
.field-choice b {
  font-size: 0.92rem;
}
.field-choice small {
  font-size: 0.74rem;
  font-style: italic;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.field-choice.ruled {
  opacity: 0.5;
  text-decoration: line-through;
  cursor: not-allowed;
}
.choice-art {
  flex: none;
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.choice-art.unknown {
  display: grid;
  place-items: center;
  border: 1px dashed #a89566;
  border-radius: 50%;
  font: 600 18px var(--pixel);
  font-style: normal;
  color: #8a7a52;
}
.soil-chip {
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #9a7250, #6b4a2f);
  box-shadow: inset 0 0 0 2px #00000022;
}
@media (max-width: 480px) {
  .field-case {
    grid-template-columns: 1fr;
  }
  .field-lens {
    width: min(150px, 50vw);
    justify-self: center;
  }
  .field-choices {
    grid-template-columns: 1fr;
  }
}

/* Rules 7: flower orders, varieties, companions, charms, decor and garden visitors */
.orders-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 4px;
  padding: 6px 7px;
  border: 1px solid #d7c79540;
  border-radius: 3px;
  background: #ffffff10;
  font: 11px var(--sans);
  text-align: left;
}
.orders-tab span { flex: 1; }
.orders-tab b { font-size: 10px; color: #d3c69e; white-space: nowrap; }
.orders-tab.is-ready { background: #e8c583; color: #2a3d27; border-color: #e8c583; }
.orders-tab.is-ready b { color: #2a3d27; }
@media (orientation: portrait) {
  .orders-tab { margin-top: 2px; padding: 4px 6px; font-size: 10px; }
}
.order-list { display: grid; gap: 8px; margin-bottom: 16px; }
.order-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #d6c8a0;
  border-radius: 6px;
  background: #fffaea;
}
.order-card.is-ready { border-color: #b88a22; box-shadow: inset 0 0 0 1px #e8c583; }
.order-card > img { width: 44px; height: 44px; object-fit: contain; }
.order-card > div:first-of-type { flex: 1; min-width: 0; }
.order-card h3 { margin: 4px 0 2px; font: 19px/1.1 var(--pixel); }
.order-card small { display: block; color: var(--muted); font-size: 11px; line-height: 1.4; }
.order-actions { display: grid; gap: 5px; }
.order-actions .order-deliver { background: #35583c; border-color: #35583c; color: #fffbe9; }
.order-actions .order-deliver:disabled { background: #e8eddf; border-color: var(--line); color: var(--muted); cursor: default; }
.care-rarity.variety { background: #f2a6c8; margin-left: 4px; }
.variety-tag { background: #fbe1ec; }
.pop-thumb.variety img,
.world .plot .variety-crop .crop {
  filter: hue-rotate(150deg) saturate(1.25);
}
.companion-note { color: #8fb46a; }
.modal-copy.companion-note { display: flex; gap: 6px; align-items: center; color: var(--green); }
.charm-shelf { margin: 4px 0 18px; }
.charm-shelf h2 { margin: 0 0 8px; font: 22px var(--pixel); }
.charm-shelf > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.charm {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 9px 10px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
}
.charm div { display: grid; gap: 2px; }
.charm b { color: var(--ink); font-size: 13px; }
.charm small { font-size: 11px; line-height: 1.4; }
.charm.is-earned { border-style: solid; border-color: #d1b268; background: #fff6d8; color: var(--ink); }
.charm.is-earned .ico { color: var(--gold); }
.garden-decor {
  position: absolute;
  transform: translate(-50%, -100%);
  width: clamp(30px, 6vmin, 62px);
  pointer-events: none;
}
.garden-decor img {
  width: 100%;
  display: block;
  filter: drop-shadow(2px 3px 1px #32442455);
}
.decor-robin { width: clamp(26px, 5vmin, 52px); }
.decor-lantern img {
  filter: drop-shadow(2px 3px 1px #32442455) drop-shadow(0 0 calc(var(--darkness, 0) * 14px) #ffd88d);
}
.greet-butterfly {
  position: absolute;
  z-index: 900;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  padding: 0;
  border: 0;
  background: transparent;
  animation: flutter 3.2s ease-in-out infinite alternate;
}
.greet-butterfly .butterfly {
  left: 50%;
  top: 50%;
  margin: -5px 0 0 -6px;
  scale: 2.6;
  animation: none;
  filter: drop-shadow(0 0 3px #fff8d0) drop-shadow(1px 2px 1px #2a3b2266);
}
.greet-butterfly:hover .butterfly { filter: drop-shadow(0 0 5px #fff1a8); }
.greet-butterfly:focus-visible { outline-offset: -4px; }
@keyframes flutter {
  from { translate: -6px 3px; }
  50% { translate: 4px -6px; }
  to { translate: 7px 2px; }
}
.catch-firefly {
  position: absolute;
  z-index: 900;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  padding: 0;
  border: 0;
  background: transparent;
  animation: flutter 4.4s ease-in-out infinite alternate;
}
.catch-firefly i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px;
  border-radius: 50%;
  background: #fff5a3;
  box-shadow: 0 0 4px 2px #f4ff8e, 0 0 14px 6px #e3ef7185;
  animation: firefly-glow 1.6s ease-in-out infinite alternate;
}
.play-scene:not([data-phase="Dusk"]):not([data-phase="Night"]) .catch-firefly,
.play-scene[data-phase="Night"] .greet-butterfly {
  display: none;
}
.mystery-node img {
  filter: brightness(0) opacity(0.6) drop-shadow(0 0 6px #c6b2ff);
}
.field-case.is-mystery .field-lens.focus-0 img {
  filter: brightness(0) blur(4px) opacity(0.7);
}
@media (prefers-reduced-motion: reduce) {
  .greet-butterfly,
  .catch-firefly,
  .catch-firefly i { animation: none; }
}

.expedition-routes { margin-top: 1.5rem; }
.expedition-routes > p { margin: .4rem 0; }
.expedition-routes > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: .75rem;
  margin-top: .75rem;
}
.expedition-routes article { overflow: hidden; }
.expedition-routes article > img { display: block; width: 100%; aspect-ratio: 2/1; object-fit: cover; }
.expedition-routes article > div { padding: .8rem; }
.expedition-routes article p { margin: .35rem 0 .6rem; }
.expedition-routes article small { display: block; }
.expedition-routes article button { margin-top: .65rem; }
.pop-build .care-seg { flex-wrap: wrap; }
.frame-sample { width: 72px; height: auto; }

/* ---- Living garden: ambient motion -------------------------------------
   Loops read their phase from --now (set at render) so a re-render never
   snaps them back to the start. */
.cloud-shadows {
  position: absolute;
  inset: 0;
  z-index: 945;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: multiply;
  --cloud-o: 1;
  opacity: calc(var(--cloud-o) * (1 - var(--darkness, 0)));
}
.cloud-shadows i {
  position: absolute;
  top: var(--cy);
  left: 0;
  width: var(--cw);
  aspect-ratio: 2.3;
  background:
    radial-gradient(closest-side at 32% 55%, #1d3b2260, transparent),
    radial-gradient(closest-side at 62% 45%, #1d3b2252, transparent),
    radial-gradient(closest-side at 50% 60%, #1d3b2240, transparent 90%);
  filter: blur(16px);
  animation: cloud-pass var(--ct) linear infinite;
  animation-delay: calc(var(--cd) - var(--now, 0s));
}
.cloud-shadows i:nth-child(1) { --cy: 8%; --cw: 62%; --ct: 95s; --cd: -10s; }
.cloud-shadows i:nth-child(2) { --cy: 46%; --cw: 48%; --ct: 120s; --cd: -70s; }
.cloud-shadows i:nth-child(3) { --cy: 70%; --cw: 70%; --ct: 105s; --cd: -38s; }
.sky-overcast .cloud-shadows { --cloud-o: 1.6; }
.sky-breezy .cloud-shadows i { animation-duration: calc(var(--ct) * 0.45); }
.sky-heatwave .cloud-shadows,
.sky-sunny .cloud-shadows { --cloud-o: 0.75; }
/* Rain days sit under a grey sky; downpours darker still. */
.rainy .cloud-shadows { background: #5d6f8540; --cloud-o: 1.3; }
.sky-downpour .cloud-shadows { background: #48597080; --cloud-o: 1.5; }
.sky-downpour .rain { background: #e4f2ffcc; height: 18px; }
@keyframes cloud-pass {
  from { transform: translateX(-100%); }
  to { transform: translateX(calc(100vw + 100%)); }
}
.trail-view .cloud-shadows i {
  animation-name: cloud-pass-wide;
}
@keyframes cloud-pass-wide {
  from { transform: translateX(-100%); }
  to { transform: translateX(170%); }
}

/* Plants lean with the breeze, a little more on breezy days. */
.world .plot .swaying .crop {
  --amp: 1.6;
  transform-origin: 50% 100%;
  animation: crop-sway 3.4s ease-in-out infinite alternate;
  animation-delay: calc(var(--sway, 0s) - var(--now, 0s));
}
.sky-breezy .world .plot .swaying .crop {
  --amp: 4;
  animation-duration: 1.9s;
}
.under-glass .world .plot .swaying .crop { --amp: 0.7; animation-duration: 5s; }
@keyframes crop-sway {
  from { transform: translateX(-50%) skewX(calc(var(--amp) * -1deg)); }
  to { transform: translateX(-50%) skewX(calc(var(--amp) * 1deg)); }
}
/* A crop that just reached a new stage springs up. */
.crop-group.crop-grew {
  transform-origin: var(--crop-left) 77%;
  animation: crop-grow 0.75s cubic-bezier(0.3, 1.7, 0.5, 1);
}
@keyframes crop-grow {
  from { scale: 0.55; filter: brightness(1.6); }
  60% { filter: brightness(1.15); }
}
/* Glints on flowers in full bloom. */
.glint {
  position: absolute;
  left: var(--gx);
  top: 22%;
  width: 9px;
  height: 9px;
  z-index: 3;
  background: #fffbe0;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 3px #ffe9a0);
  opacity: 0;
  pointer-events: none;
  animation: glint 3.6s ease-in-out infinite;
  animation-delay: calc(var(--gd) - var(--now, 0s));
}
.glint + .glint { top: 36%; width: 7px; height: 7px; animation-duration: 4.3s; }
@keyframes glint {
  0%, 70%, 100% { opacity: 0; scale: 0.2; rotate: 0deg; }
  80% { opacity: 1; scale: 1; rotate: 45deg; }
  90% { opacity: 0; scale: 0.4; rotate: 90deg; }
}
.play-scene[data-phase="Night"] .glint { display: none; }
/* Gnats hovering over infested beds. */
.gnats {
  position: absolute;
  left: 50%;
  top: 4%;
  width: 0;
  height: 0;
  z-index: 5;
  pointer-events: none;
}
.gnats i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #2a2a1c;
  box-shadow: 0 0 0 1px #fff3c455;
  --r: 14px;
  transform-origin: var(--r) 0;
  animation:
    gnat-orbit var(--gt, 1.4s) linear infinite,
    gnat-bob 0.9s ease-in-out infinite alternate;
}
.gnats i:nth-child(2) { --r: -18px; --gt: 1.9s; animation-delay: -0.4s, -0.3s; }
.gnats i:nth-child(3) { --r: 9px; --gt: 1.1s; animation-delay: -0.8s, -0.6s; }
.gnats i:nth-child(4) { --r: -11px; --gt: 1.6s; animation-delay: -1.2s, -0.1s; }
@keyframes gnat-orbit { to { rotate: 360deg; } }
@keyframes gnat-bob { to { translate: 0 -9px; } }

/* Weather: falling snow, splashing rain, lightning, seasonal drift. */
.snow {
  left: var(--x);
  top: -3%;
  width: var(--s, 3px);
  height: var(--s, 3px);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 4px #ffffffb0;
  font-size: 0;
  animation: snowfall var(--t, 6s) linear infinite;
  animation-delay: calc(var(--d) - var(--now, 0s));
}
@keyframes snowfall {
  from { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 1; }
  30% { transform: translate(14px, 30vh); }
  60% { transform: translate(-10px, 62vh); }
  90% { opacity: 1; }
  to { transform: translate(8px, 105vh); opacity: 0; }
}
.splash {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 14px;
  height: 5px;
  border: 1.5px solid #e4f6ffb8;
  border-radius: 50%;
  opacity: 0;
  animation: splash 1.4s ease-out infinite;
  animation-delay: calc(var(--d) - var(--now, 0s));
}
.sky-downpour .splash { animation-duration: 0.9s; }
@keyframes splash {
  0% { opacity: 0; scale: 0.2; }
  8% { opacity: 0.9; }
  45%, 100% { opacity: 0; scale: 1.8; }
}
.lightning {
  position: absolute;
  inset: 0;
  background: #f4f8ff;
  mix-blend-mode: soft-light;
  opacity: 0;
  animation: lightning 11s linear infinite;
  animation-delay: calc(-3s - var(--now, 0s));
}
@keyframes lightning {
  0%, 91%, 93.5%, 95.5%, 100% { opacity: 0; }
  92% { opacity: 0.9; }
  94.5% { opacity: 0.6; }
}
.drift-leaf,
.drift-flake {
  position: absolute;
  left: var(--x);
  top: -4%;
  pointer-events: none;
  animation: leaf-fall var(--t) linear infinite;
  animation-delay: calc(var(--d) - var(--now, 0s));
}
.drift-leaf {
  width: 9px;
  height: 6px;
  background: var(--c);
  border-radius: 80% 0 80% 0;
  box-shadow: 1px 1px 0 #00000022;
}
.drift-flake {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 3px #fff;
  animation-name: snowfall;
}
@keyframes leaf-fall {
  0% { transform: translate(0, 0) rotate(0deg) scaleX(1); opacity: 0; }
  8% { opacity: 1; }
  25% { transform: translate(-40px, 26vh) rotate(110deg) scaleX(-1); }
  50% { transform: translate(20px, 52vh) rotate(220deg) scaleX(1); }
  75% { transform: translate(-30px, 78vh) rotate(330deg) scaleX(-1); }
  92% { opacity: 1; }
  100% { transform: translate(10px, 104vh) rotate(440deg) scaleX(1); opacity: 0; }
}
.play-scene[data-phase="Night"] .drift-leaf { opacity: 0.5; }

/* ---- Interaction effects ------------------------------------------------ */
.fx-bit {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
.fx-drop {
  width: 5px;
  height: 7px;
  background: var(--c);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  box-shadow: inset -1px -1px 0 #5aa6c288;
}
.fx-petal {
  width: 8px;
  height: 6px;
  background: var(--c);
  border-radius: 80% 0 80% 0;
  box-shadow: 0 1px 1px #3a2a2a33;
}
.fx-chip {
  width: 6px;
  height: 3px;
  background: var(--c);
  box-shadow: 0 1px 0 #4a3420aa;
}
.fx-spark {
  width: 10px;
  height: 10px;
  background: var(--c);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 3px #ffe58a);
}
.fx-note {
  font: 600 17px/1 var(--pixel);
  font-style: normal;
  color: var(--c);
  text-shadow: 0 1px 0 #3d3a24aa;
}
.fx-ring {
  position: absolute;
  width: 54px;
  height: 22px;
  border: 2px solid var(--c);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 8px var(--c);
}
.world .effect-note {
  box-shadow: 0 2px 0 #00000040;
  text-shadow: 0 1px 0 #00000055;
  border-bottom: 2px solid var(--c, #f5e2c0);
}
.dust-puff {
  position: absolute;
  width: 18px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(closest-side, #f3e6c2cc, #e7d6a855 60%, transparent);
  pointer-events: none;
}
.under-glass .dust-puff,
.rainy .dust-puff,
.sky-cold-snap .dust-puff { display: none; }
.destination:after {
  content: "";
  position: absolute;
  inset: -2px;
  border: 2px solid #fff2ae;
  border-radius: 50%;
  animation: dest-ripple 0.9s ease-out infinite;
}
@keyframes dest-ripple {
  to { scale: 2.2; opacity: 0; }
}

/* Scene changes fade in from the trail's shade instead of cutting. */
.scene-veil {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: radial-gradient(circle at 50% 55%, #24382acc, #101c14);
  pointer-events: none;
}

/* Resource counters tick and show what changed. */
.hud-resources span { position: relative; }
.hud-resources .gain b { animation: count-gain 0.6s ease-out; }
.hud-resources .spend b { animation: count-spend 0.45s ease-out; }
@keyframes count-gain {
  30% { scale: 1.28; color: #fff6a8; text-shadow: 0 0 8px #ffe27a; }
}
@keyframes count-spend {
  30% { scale: 0.9; color: #f2b48f; }
}
.hud-delta {
  position: absolute;
  right: 4px;
  top: -6px;
  font: 600 14px/1 var(--pixel);
  font-style: normal;
  color: #c7f59a;
  text-shadow: 0 1px 0 #1e2b1c, 0 0 6px #1e2b1c;
  pointer-events: none;
  animation: delta-rise 1.3s ease-out forwards;
}
.spend .hud-delta { color: #ffc9a6; }
@keyframes delta-rise {
  0% { opacity: 0; translate: 0 6px; scale: 0.7; }
  15% { opacity: 1; translate: 0 -4px; scale: 1.1; }
  70% { opacity: 1; }
  100% { opacity: 0; translate: 0 -20px; scale: 1; }
}

/* Level-up flourish over the whole screen. */
.level-burst {
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.level-rays {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 150vmax;
  height: 150vmax;
  margin: -75vmax 0 0 -75vmax;
  background: repeating-conic-gradient(from 0deg, #fff3b52e 0 7deg, transparent 7deg 20deg);
  mask: radial-gradient(closest-side, #000 10%, transparent 70%);
  animation: rays 2.6s ease-out forwards;
}
@keyframes rays {
  0% { opacity: 0; scale: 0.4; rotate: 0deg; }
  20% { opacity: 1; }
  70% { opacity: 0.8; }
  100% { opacity: 0; scale: 1.1; rotate: 40deg; }
}
.level-banner {
  position: relative;
  margin-top: -16vh;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 12px 30px 14px;
  color: #ffedbe;
  background: linear-gradient(#3c5a3f, #2c4430);
  border: 3px solid #9b7b4f;
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px #d7be8d55, 0 6px 0 #1d2a1fbb, 0 18px 50px #0e1a1066;
  animation: banner 2.6s cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
}
.level-banner small { font: 600 12px/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: #e6dec0; }
.level-banner b { font: 54px/0.9 var(--pixel); color: #ffe27a; text-shadow: 0 3px 0 #6b4c22, 0 0 18px #ffd65a99; }
.level-banner span { font: 18px/1.1 var(--pixel); }
@keyframes banner {
  0% { opacity: 0; scale: 0.3; translate: 0 30px; }
  18% { opacity: 1; scale: 1; translate: 0 0; }
  80% { opacity: 1; scale: 1; }
  100% { opacity: 0; scale: 0.92; translate: 0 -16px; }
}

/* ---- Interface motion -------------------------------------------------- */
.toast {
  animation: toast-in 0.42s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.toast.leaving {
  animation: toast-out 0.34s ease-in forwards;
}
@keyframes toast-in {
  from { opacity: 0; translate: 0 18px; scale: 0.94; }
}
@keyframes toast-out {
  to { opacity: 0; translate: 0 8px; scale: 0.96; }
}
#modal[open],
#journal[open] {
  animation: dialog-in 0.34s cubic-bezier(0.2, 1.25, 0.4, 1);
}
dialog[open]::backdrop {
  animation: backdrop-in 0.3s ease-out;
}
@keyframes dialog-in {
  from { opacity: 0; scale: 0.94; translate: 0 14px; }
}
@keyframes backdrop-in {
  from { opacity: 0; }
}
.pop-card {
  animation: pop-in 0.26s cubic-bezier(0.2, 1.5, 0.4, 1);
}
.pop-card.settled {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .cloud-shadows,
  .glint,
  .gnats,
  .splash,
  .lightning,
  .drift-leaf,
  .drift-flake,
  .dust-puff,
  .scene-veil,
  .hud-delta,
  .level-rays {
    display: none;
  }
  .world .plot .swaying .crop,
  .level-banner {
    animation: none;
  }
}

/* ---- Lighting ----------------------------------------------------------
   paintSun() sets --sun-x/--sun-y/--sun-blur/--sun-a and --ray-angle/--rays on
   the scene each clock tick; lightScene() builds the night lamps. */
.play-scene {
  --sun-shadow: drop-shadow(var(--sun-x, 2px) var(--sun-y, 5px) var(--sun-blur, 2px) rgb(26 42 24 / var(--sun-a, 0.33)));
}
.play-scene .world .plot .front-planter,
.play-scene .world .habitat-art,
.play-scene .world .garden-decor img,
.play-scene .world .forage-node img,
.play-scene .world .sprinkler-fixture img,
.play-scene .world .workshop-building img,
.play-scene .world .glasshouse-building img,
.play-scene .world .plot.bare .site-lumber {
  filter: var(--sun-shadow);
}
.play-scene .world .plot:is(:hover, .selected) .front-planter {
  filter: drop-shadow(1px 0 #ffe6a4) drop-shadow(-1px 0 #ffe6a4) var(--sun-shadow);
}
.play-scene .world .workshop-building:is(:hover, :focus-visible) img {
  filter: brightness(1.12) var(--sun-shadow);
}
.play-scene .world .habitat:is(:hover, :focus-visible) .habitat-art {
  filter: drop-shadow(0 0 2px #ffe7a6) var(--sun-shadow);
}
.play-scene .world .decor-lantern img {
  filter: var(--sun-shadow) drop-shadow(0 0 calc(var(--darkness, 0) * 14px) #ffd88d);
}
.play-scene .world .mystery-node img {
  filter: brightness(0) opacity(0.6) drop-shadow(0 0 6px #c6b2ff);
}
.play-scene .actor-shadow {
  translate: calc(var(--sun-x, 0px) * 0.7) calc(var(--sun-y, 4px) * 0.25 - 1px);
  scale: var(--sun-stretch, 1) 1;
  opacity: calc(0.4 + var(--sun-a, 0.33) * 1.7);
}

/* Sunbeams slant in from the sun's side and turn gold at dawn and dusk. */
.sun-rays {
  position: absolute;
  inset: -12% -35% -5%;
  z-index: 948;
  pointer-events: none;
  mix-blend-mode: screen;
  --beam: color-mix(in srgb, #fff3c4, #ff9f4a calc(var(--warmth, 0) * 100%));
  background:
    repeating-linear-gradient(90deg, transparent 0 7%, color-mix(in srgb, var(--beam), transparent 70%) 9.5%, transparent 13% 21%),
    repeating-linear-gradient(90deg, transparent 0 13%, color-mix(in srgb, var(--beam), transparent 62%) 15%, transparent 16.5% 31%);
  mask-image: linear-gradient(to bottom, #000 5%, rgb(0 0 0 / 0.5) 45%, transparent 85%);
  rotate: var(--ray-angle, -30deg);
  opacity: var(--rays, 0);
  animation: ray-drift 16s ease-in-out infinite alternate;
  animation-delay: calc(-4s - var(--now, 0s));
}
.under-glass .sun-rays { --rays: 0.35; }
/* Invisible beams would still blend and animate a large layer every frame. */
.play-scene:not([data-rays], .under-glass) .sun-rays { display: none; }
@keyframes ray-drift {
  from { translate: -2% 0; filter: brightness(0.85); }
  50% { filter: brightness(1.15); }
  to { translate: 2% 0; filter: brightness(1); }
}

/* Night: a moonlit shade with holes for every lamp, plus their warm glow. */
.play-scene .world:after {
  content: none;
}
.night-shade,
.night-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--darkness, 0);
  display: none;
}
.play-scene[data-dark] :is(.night-shade, .night-glow) {
  display: block;
}
.night-shade {
  z-index: 951;
  background:
    radial-gradient(ellipse 75% 70% at 50% 55%, transparent 35%, rgb(6 12 30 / 0.5)),
    linear-gradient(138deg, rgb(20 39 84 / 0.66), rgb(29 46 90 / 0.56) 55%, rgb(17 30 65 / 0.72));
  mask-composite: intersect;
  -webkit-mask-composite: source-in;
}
.night-glow {
  z-index: 952;
  mix-blend-mode: screen;
  overflow: hidden;
}
.lamp {
  position: absolute;
  translate: -50% -50%;
  border-radius: 50%;
  --lc: 255 150 60;
  background: radial-gradient(closest-side, rgb(var(--lc) / 0.55), rgb(var(--lc) / 0.22) 50%, transparent);
  animation: lamp-flicker 2.6s ease-in-out infinite alternate;
  animation-delay: var(--fl, 0s);
}
.lamp-window { --lc: 255 190 100; }
.lamp-flame {
  --lc: 255 222 150;
  background: radial-gradient(closest-side, rgb(var(--lc) / 0.9), rgb(var(--lc) / 0.3) 40%, transparent);
  animation-duration: 0.9s;
}
.lamp-glass { --lc: 214 236 170; animation: none; }
.lamp-firefly {
  --lc: 200 230 120;
  background: radial-gradient(closest-side, rgb(var(--lc) / 0.35), transparent);
  animation: firefly-glow 1.6s ease-in-out infinite alternate;
}
.lamp-find {
  --lc: 196 214 255;
  background: radial-gradient(closest-side, rgb(var(--lc) / 0.28), transparent);
  animation: find-shimmer 3.2s ease-in-out infinite alternate;
  animation-delay: var(--fl, 0s);
}
.lamp-gardener {
  left: var(--px, -50%);
  top: var(--py, -50%);
  width: var(--lamp-w, 120px);
  height: var(--lamp-h, 80px);
  translate: -50% -78%;
  --lc: 255 214 150;
  background: radial-gradient(closest-side, rgb(var(--lc) / 0.22), transparent);
  animation: none;
}
.moonlight {
  position: absolute;
  right: -15%;
  top: -25%;
  width: 70%;
  aspect-ratio: 1.4;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(150 180 255 / 0.22), transparent);
}
@keyframes lamp-flicker {
  0% { opacity: 0.88; scale: 1; }
  30% { opacity: 1; scale: 1.03; }
  55% { opacity: 0.82; scale: 0.98; }
  80% { opacity: 0.97; scale: 1.02; }
  100% { opacity: 0.9; scale: 1; }
}
@keyframes find-shimmer {
  from { opacity: 0.45; }
  to { opacity: 1; }
}

/* A burst briefly lights its surroundings, most noticeable after dark. */
.fx-flash {
  position: absolute;
  width: 150px;
  height: 100px;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c), transparent 35%), transparent);
}

@media (prefers-reduced-motion: reduce) {
  .sun-rays,
  .lamp {
    animation: none;
  }
  .fx-flash {
    display: none;
  }
}

/* Pocket HUD. Only the outer controls capture taps over the garden. */
.compact-hud {
  --edge-x: max(8px, env(safe-area-inset-left));
  --edge-right: max(8px, env(safe-area-inset-right));
  --edge-bottom: max(8px, env(safe-area-inset-bottom));
}
.pocket-top, .pocket-tools, .pocket-trail {
  position: absolute;
  left: var(--edge-x);
  right: var(--edge-right);
  display: flex;
  gap: 6px;
}
.pocket-top {
  top: 8px;
  align-items: flex-start;
  justify-content: space-between;
}
.pocket-day, .journal-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 5px 10px;
}
.pocket-day { text-align: left; }
.pocket-day:disabled { opacity: 1; }
.pocket-day b, .journal-trigger { font: 19px/1 var(--pixel); }
.pocket-day small { display: block; margin-top: 3px; color: #eadfbd; font: 11px/1.15 var(--sans); }
.pocket-day .garden-clock { padding: 0; font: inherit; font-variant-numeric: tabular-nums; }
.pocket-day .forecast-icon { color: #f4d790; }
.journal-count {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  background: #e8c583;
  color: #36452e;
  border-radius: 50%;
  font: 700 12px/1 var(--sans);
}
.pocket-tools {
  bottom: var(--edge-bottom);
  flex-direction: column;
  align-items: center;
}
.pocket-tools .belt { padding: 4px; gap: 3px; }
.pocket-tools .belt-slot {
  width: clamp(44px, 14vw, 58px);
  height: 48px;
  padding: 2px 3px;
}
.pocket-tools .belt-slot span { font-size: 13px; }
.pocket-tools .belt-slot kbd, .pocket-tools .equipped:before { display: none; }
.pocket-tools .first-task {
  min-height: 44px;
  max-width: 100%;
  padding: 4px 10px;
  white-space: normal;
}
.pocket-tools .first-task img { width: 24px; height: 24px; }
.pocket-tools .first-task b { font-size: 16px; }
.pocket-tools .first-task small { font-size: 11px; }
.pocket-tools .move-hint { position: static; }
.pocket-trail {
  bottom: var(--edge-bottom);
  justify-content: space-between;
  align-items: end;
}
.pocket-trail > div:first-child { display: grid; justify-items: start; gap: 4px; }
.pocket-trail > div > b {
  padding: 3px 7px;
  color: #fff2cf;
  background: #283e30eb;
  border-radius: 3px;
  font: 16px var(--pixel);
}
.pocket-trail .location-tag { min-height: 44px; }
.pocket-trail .trail-minimap { position: static; width: 106px; }

#modal[data-kind="gardenjournal"][open] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: min(440px, 100%);
  max-width: 100%;
  max-height: min(84dvh, 660px);
  margin: auto auto 0;
  border-radius: 14px 14px 0 0;
}
#modal[data-kind="gardenjournal"] .round { width: 44px; height: 44px; }
#modal[data-kind="gardenjournal"] .modal-head { flex: none; padding: 5px 12px; }
#modal[data-kind="gardenjournal"] .modal-body {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 14px max(14px, env(safe-area-inset-bottom));
}
.journal-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  text-align: left;
  color: #374831;
  background: transparent;
  min-height: 44px;
}
.journal-profile img { width: 42px; height: 42px; object-fit: contain; }
.journal-profile span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.journal-profile b { font: 21px/1.1 var(--pixel); }
.journal-profile small, .journal-links small { display: block; margin-top: 2px; font: 12px/1.2 var(--sans); }
#modal .hud-resources { grid-template-columns: repeat(4, minmax(0, 1fr)); min-height: 48px; }
#modal .hud-resources small { font-size: 11px; }
#modal .hud-resources b { font-size: 19px; }
.inventory-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 5px 5px;
  margin-bottom: 3px;
  border-bottom: 1px solid #d7c79540;
  font: 17px var(--pixel);
}
.inventory-heading .ico:last-child { margin-left: auto; }
.journal-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.journal-links .choice, .journal-menu.choice {
  justify-content: flex-start;
  min-height: 44px;
  padding: 7px 10px;
  gap: 8px;
  background: #f5ecd6;
  border-color: #d1c3a0;
  font: 17px/1.1 var(--pixel);
}
.journal-links .ico { flex-shrink: 0; }
#modal .hud-quests { position: static; width: 100%; min-height: 0; padding: 10px; }
#modal .hud-quests-title b { font-size: 18px; }
#modal .hud-quests-title small, #modal .quest-reward { font-size: 11px; }
#modal .hud-quest { min-height: 36px; gap: 7px; font-size: 12px; }
#modal .quest-claim, #modal .orders-tab { min-height: 44px; font-size: 12px; }
@media (orientation: landscape) and (max-height: 580px) {
  .pocket-tools {
    flex-direction: row-reverse;
    align-items: end;
    justify-content: space-between;
  }
  .pocket-tools .belt { margin-inline-end: auto; }
  .pocket-tools .belt-slot { width: 44px; }
  .pocket-tools .first-task { max-width: min(290px, 45%); }
}

.pop-card[data-side="pocket"] {
  inset: auto max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
  width: auto;
  max-width: 560px;
  margin-inline: auto;
}
.pop-card[data-side="pocket"] .pop-tail { display: none; }
.pop-card[data-side="pocket"] .pop-body {
  gap: 8px;
  padding: 10px;
  max-height: calc(100dvh - var(--beta-h) - max(6px, env(safe-area-inset-bottom)) - 8px);
}
.pop-card[data-side="pocket"] .pop-head { grid-template-columns: 42px minmax(0, 1fr) 44px; }
.pop-card[data-side="pocket"] .pop-thumb { width: 42px; height: 42px; }
.pop-card[data-side="pocket"] :is(.pop-act, .pop-row, .care-seg button) { min-height: 44px; }
.pop-card[data-side="pocket"] .pop-close { width: 44px; height: 44px; }
.pop-card[data-side="pocket"] .pop-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(135px, 100%), 1fr)); }
.pop-card[data-side="pocket"] .care-settings { grid-template-columns: repeat(3, minmax(0, 1fr)); border: 0; padding: 0; }
.pop-pickers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pop-picker { display: grid; gap: 3px; color: var(--cc-dim); font: 14px var(--pixel); }
.pop-picker select {
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 1px solid #a19973;
  border-radius: 5px;
  padding-inline: 4px;
  color: var(--cc-ink);
  background: var(--cc-well);
  font: 16px var(--pixel);
}
.seed-pages { display: flex; align-items: center; gap: 10px; font: 14px var(--pixel); }
@media (max-width: 760px), (max-height: 580px), (pointer: coarse) and (max-width: 1024px) {
  #toasts {
    inset: calc(var(--beta-h) + 68px) auto auto 50%;
    max-width: min(340px, calc(100vw - 24px));
  }
}
.pocket-refit { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; gap: 8px 12px; }
.pocket-refit img { width: 54px; height: 54px; object-fit: contain; }
.pocket-refit .pop-picker { color: var(--ink); }
.pocket-refit select { color: var(--ink); background: #fff9e7; }
.pocket-refit :is(p, button) { grid-column: 1 / -1; }
.condition-picker small { display: block; color: var(--cc-dim); font: 11px/1.35 var(--sans); margin-top: 4px; }
.build-notes { display: grid; gap: 3px; }
@media (orientation: landscape) and (max-height: 580px) {
  .pop-card[data-side="pocket"] { max-width: 700px; }
  .pop-card[data-side="pocket"] :is(.seed-choices, .pop-spots-list) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .seed-choices .pop-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px; }
  .seed-choices .pop-row img { display: none; }
  .seed-choices .pop-row em { grid-column: 1 / -1; justify-self: start; }
  .build-notes { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pop-care[data-side="pocket"] .pop-body { grid-template-columns: minmax(0, 1fr) auto; }
  .pop-care[data-side="pocket"] .pop-body > :not(.pop-head, .care-pages) { grid-column: 1 / -1; }
}
