:root {
  color-scheme: dark;
  --forest: #172b20;
  --deep: #111f18;
  --parchment: #f2e6c6;
  --ink: #283323;
  --muted: #c4c6a6;
  --gold: #e5c278;
  --rule: #53614a;
  --serif: Georgia, "Times New Roman", serif;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--deep);
  color: var(--parchment);
}
*, *::before, *::after { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(ellipse at 48% 0%, #354a30, var(--deep) 70%);
}
[hidden] { display: none !important; }
a { color: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; font: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid #f8cf76;
  outline-offset: 4px;
}
.masthead {
  border-bottom: 1px solid #84946a4f;
  background: #18291eef;
}
.masthead-inner, .layout { width: min(1240px, calc(100% - 64px)); margin: auto; }
.masthead-inner {
  min-height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: bold 1.13rem var(--serif);
  letter-spacing: .026em;
}
.brand-leaf {
  width: 21px; height: 27px;
  background: linear-gradient(66deg, #d6a94f, #f0d486);
  border-radius: 85% 6% 83% 10%;
  transform: rotate(27deg) scale(.78);
  box-shadow: -3px 2px 0 #719561;
}
.back {
  border: 1px solid #718365;
  border-radius: 5px;
  padding: 8px 13px;
  color: #e4e7ce;
  text-decoration: none;
  font-size: .84rem;
}
.back:hover { background: #334a31; }
.back span { padding-left: .35rem; }
.layout { padding: 26px 0 32px; }
.heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  padding-bottom: 22px;
}
h1, h2, h3, p { margin: 0; }
.heading > div:first-child { min-width: 0; }
h1 {
  font: 700 clamp(2.36rem, 5vw, 4.55rem) / .98 var(--serif);
  letter-spacing: -.055em;
  color: #fff0c9;
}
.heading p { margin-top: 10px; color: #d8d3b4; }
.heading-controls { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.sound-controls { display: grid; justify-items: stretch; gap: 4px; }
.sound-options { display: flex; justify-content: end; gap: 2px; }
.sound-toggle {
  color: #f0dfb5; background: #263b29; border: 1px solid #75805a; border-radius: 7px;
  font-size: .83rem; font-weight: 650; padding: 9px 11px; min-height: 39px;
}
.sound-toggle:hover, .sound-toggle[aria-pressed=true] { background: #3a5034; border-color: #b8a96e; }
.sound-toggle::before {
  content: ""; display: inline-block; height: 7px; width: 7px; border-radius: 50%;
  background: #b0a98f; margin-right: 6px; vertical-align: 1px;
}
.sound-toggle[aria-pressed=true]::before { background: #e4c170; box-shadow: 0 0 7px #edca837a; }
.sound-test {
  color: #f3dcad; background: transparent; border: 0; border-radius: 4px;
  padding: 4px 7px; font-size: .76rem; text-decoration: underline; text-underline-offset: 3px;
}
.sound-test:hover { color: #fff1ca; }
.day-display {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  padding: 10px 15px;
  border: 1px solid #75805a;
  border-radius: 8px;
  background: #263b29;
}
.day-display div { display: grid; gap: 1px; }
.day-display div span { color: var(--muted); font-size: .73rem; }
.day-display strong { font: bold 1.2rem var(--serif); }
.sun { font-size: 2rem; color: #f5cc6a; line-height: 1; }
.game-layout { display: grid; grid-template-columns: minmax(0, 2.5fr) minmax(250px, 1fr); gap: 21px; align-items: start; }
.garden, .journal { border-radius: 12px; box-shadow: 0 16px 36px #07130c55; }
.garden { border: 1px solid #566448; background: #243729; overflow: hidden; }
.scene {
  position: relative;
  height: clamp(207px, 20vw, 243px);
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(105deg, #1f3022 6%, #345638 58%, #627249);
  border-bottom: 1px solid #949263;
}
.scenery {
  position: absolute;
  inset: 0 0 0 auto;
  width: 76%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  mask-image: linear-gradient(90deg, transparent, black 22%);
  opacity: 0;
  transition: opacity 480ms ease;
}
.scenery.loaded { opacity: 1; }
.scene-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #15271ff5 4%, #1e3126ee 23%, #1b2d2399 41%, #24392316 73%),
    linear-gradient(0deg, #172b20ba 0%, transparent 42%);
}
.scene-label { position: absolute; bottom: 19px; left: 22px; width: 36%; text-shadow: 0 2px 9px #101c1266; }
.scene-label span { display: block; color: #e1c789; font-size: .8rem; margin-bottom: 5px; }
.scene-label h2 { font: bold clamp(1.45rem, 3vw, 2.65rem) / 1.04 var(--serif); color: #fff3cf; }
.hazel {
  position: absolute;
  left: 39%; bottom: 4%;
  height: 91%; max-width: 34%;
  object-fit: contain;
  opacity: 0;
  filter: drop-shadow(0 4px 5px #251b19a1);
  pointer-events: none;
}
.hazel.loaded { opacity: 1; }
.paper-doll-ready #hazel { opacity: 0; }
.paper-doll-ready .hazel-doll { opacity: 1; }
.beds {
  padding: 16px 20px 17px;
  background:
    radial-gradient(ellipse at 53% 27%, #5c6a38 0%, transparent 75%),
    repeating-linear-gradient(102deg, #5c6a3226 0 2px, transparent 2px 6px),
    #36482e;
}
.bed-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
h3 { font: bold 1.11rem var(--serif); }
.bed-header span { color: #f0e8c1; font-size: .78rem; }
.plots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px 13px; }
.plots[data-columns="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.plots[data-columns="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.plot {
  position: relative;
  min-width: 0;
  display: block;
  text-align: left;
  border: 1px solid #5c5236;
  border-radius: 9px;
  background: #282d1e;
  color: #fff0d3;
  padding: 5px 5px 6px;
  box-shadow: 0 3px 6px #1524194f;
  transition: border-color 160ms, transform 160ms, background 160ms;
}
.plot:hover, .plot:focus-visible { border-color: #e2c278; transform: translateY(-1px); background: #364127; }
.plot[data-growth=ripe] { border-color: #d2b26a; box-shadow: 0 0 11px #e9c97135; }
.soil {
  isolation: isolate;
  position: relative;
  display: block;
  height: clamp(51px, 6vw, 74px);
  border: 5px solid #8f623d;
  border-top-color: #b78b57;
  border-bottom-color: #ad7d4c;
  border-radius: 7px 7px 8px 8px;
  background: var(--soil-art, radial-gradient(ellipse at 46% 51%, #8f5937, #542f22)) center 56% / cover;
  box-shadow: inset 0 4px 6px #331b12ad, 0 3px #634021;
  overflow: hidden;
}
.soil::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent, #3b21198b);
  z-index: -1;
}
.plot[data-wet=true] .soil::before { background: linear-gradient(157deg, #1b2b2648, #2318119d); }
.plot-sign { display: grid; gap: 2px; margin: 6px 5px 0; }
.plot-sign strong { font-size: .82rem; }
.plot-sign small { font-size: .72rem; color: #dfd7af; white-space: normal; }
.plot[data-growth=ripe] .plot-sign small { color: #ffdc82; }
.plot[data-wet=true] .plot-sign small { color: #a7d7cb; }
.plant {
  position: absolute;
  bottom: 6%;
  left: 50%;
  height: 68px;
  width: 63px;
  transform: translateX(-50%) scale(.83);
  transform-origin: bottom center;
  filter: drop-shadow(0 4px 3px #341b0989);
}
.plant i, .seed { display: block; position: absolute; }
.stem { bottom: 0; left: 29px; width: 5px; height: 46px; background: #527c35; border-radius: 70% 40% 35% 40%; }
.leaf {
  height: 20px; width: 29px; bottom: 9px; left: 5px;
  background: linear-gradient(34deg, #3b642e, #a8be5b);
  border-radius: 80% 5% 86% 12%;
  transform: rotate(54deg);
}
.leaf-right { bottom: 14px; left: 29px; transform: rotate(-19deg); }
.bloom {
  top: 0; left: 12px; width: 40px; height: 41px;
  background: var(--daisy-art, radial-gradient(circle at center, #ecb93e 0 23%, #f4e6c9 25% 64%, transparent 66%)) center / contain no-repeat;
}
.bloom-small { width: 27px; height: 27px; top: 15px; left: 39px; opacity: 0; }
.plot:is([data-crop=goldleaf],[data-crop=moonmint]) .bloom {
  background-image: var(--goldleaf-art, radial-gradient(ellipse, #e4ae39 15%, #bd8632 54%, transparent 56%));
  width: 48px; height: 46px; left: 9px; top: 0;
}
.plot:is([data-crop=goldleaf],[data-crop=moonmint]) .bloom-small { width: 34px; height: 34px; left: 36px; top: 24px; transform: rotate(14deg); }
.plot[data-crop=moonmint] .bloom, .icon-moonmint { filter: hue-rotate(95deg); }
.plot[data-crop=starlily] .bloom, .icon-starlily { filter: sepia(.8) hue-rotate(217deg) saturate(2); }
.plot[data-crop=moonmint] .seed { background: #8ccf99; border-color: #daefd1; }
.plot[data-crop=starlily] .seed { background: #b283e2; border-color: #ead3ff; }
.plot[data-growth=ripe] .bloom-small { opacity: .94; }
.plot[data-growth=seed] .plant, .plot[data-growth=empty] .plant { display: none; }
.plot[data-growth=sprout] .plant { transform: translateX(-50%) scale(.46); }
.plot[data-growth=sprout] .bloom { display: none; }
.plot[data-growth=growing] .plant { transform: translateX(-50%) scale(.64); }
.plot[data-growth=growing] .bloom { width: 26px; height: 26px; top: 12px; left: 21px; }
.seed {
  display: none;
  width: 10px; height: 7px;
  left: 50%; bottom: 20%; margin-left: -5px;
  border-radius: 70% 35% 55% 45%;
  background: #d8ad68; border: 1px solid #edc889;
  transform: rotate(-28deg);
  box-shadow: 0 1px 2px #27120e;
}
.plot[data-growth=seed] .seed { display: block; }
.plot-effect {
  position: absolute; left: 50%; bottom: 19%; margin-left: -10px; width: 20px; height: 20px;
  border-radius: 50%; opacity: 0; background: #fff08b;
  box-shadow: -15px 2px 0 -6px #ecc376, 15px -4px 0 -6px #ffdb7c;
  pointer-events: none;
}
.plot-effect[data-effect=water] { background: #b5f2ec; box-shadow: -12px 0 0 -5px #9fdbd7, 14px -6px 0 -5px #9fdbd7; }
.toolbox {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end;
  column-gap: 15px; row-gap: 8px; padding: 13px 18px 11px; border-bottom: 1px solid #8591677a;
}
.toolbox h3 { margin-bottom: 7px; }
.day-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 7px; }
.water-all {
  min-height: 44px; padding: 8px 12px; border: 1px solid #80b2aa; border-radius: 6px;
  background: #2f5145; color: #d8eee3; font-size: .82rem; font-weight: 650;
}
.water-all:hover { background: #42685a; }
.feedback { grid-column: 1 / -1; color: #f1ddab; min-height: 1.3em; font-size: .82rem; line-height: 1.35; }
.tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.tool {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 5px;
  min-width: 0; min-height: 49px;
  position: relative;
  border: 1px solid #6f7752; border-radius: 6px; padding: 5px 6px;
  color: #fff2d1; background: #344433; text-align: left;
}
.tool:hover { background: #44563d; }
.tool[aria-pressed=true] { background: #554d2e; border-color: #e1bd71; box-shadow: inset 0 0 9px #d3ae5040; }
.tool strong { display: block; font-size: .76rem; line-height: 1.13; }
.tool-copy small { display: block; font-size: .66rem; margin-top: 3px; color: #e4dec0; line-height: 1.12; }
kbd { position: absolute; top: 2px; right: 3px; font-size: .6rem; color: #e6d9a8; }
.tool-copy { padding-right: 5px; }
.tool-icon, .goal-icon {
  display: block; flex-shrink: 0;
  width: 24px; height: 24px;
  background-position: center; background-size: contain; background-repeat: no-repeat;
}
.icon-goldleaf, .icon-moonmint { background-image: var(--goldleaf-art, radial-gradient(ellipse, #ddb64b 1% 45%, transparent 48%)); }
.icon-daisy, .icon-starlily { background-image: var(--daisy-art, radial-gradient(circle, #e9b844 0 20%, #fff0d1 22% 59%, transparent 62%)); }
.icon-water::after {
  content: ""; display: block; margin: 3px 0 0 4px; height: 17px; width: 17px;
  background: linear-gradient(115deg,#c2eee2,#4f9da9); border-radius: 22% 62% 64% 61%; transform: rotate(45deg);
}
.icon-harvest { position: relative; }
.icon-harvest::before {
  content: ""; position: absolute; inset: 2px 7px 10px;
  border-radius: 9px 9px 0 0; border: 2px solid #e5bf86;
}
.icon-harvest::after {
  content: ""; position: absolute; inset: 9px 3px 3px;
  border: 2px solid #dbaf75; border-radius: 2px 2px 5px 5px;
  background: repeating-linear-gradient(95deg, #d3ab72 0 2px, #926639 2px 4px);
}
.advance {
  color: #242617; background: #e5c278; padding: 10px 14px;
  min-height: 44px;
  border: 1px solid #edca79; border-radius: 6px;
  font-weight: 720; font-size: .85rem;
  white-space: nowrap;
}
.advance:hover { background: #f1d694; }
.advance span:first-child { padding-right: 3px; }
.advance span:last-child { padding-left: 4px; }
.journal {
  background: radial-gradient(ellipse at 77% 21%, #f8edcf, #e9d6a9);
  border: 1px solid #ccad72;
  color: var(--ink);
  padding: 20px 20px 15px;
}
.journal h2 {
  font: bold clamp(1.65rem, 3vw, 2.2rem) / 1 var(--serif);
  letter-spacing: -.045em;
  padding-bottom: 14px;
  border-bottom: 1px solid #ab945f8c;
}
.journal section { padding: 15px 0; border-bottom: 1px solid #ab945f72; }
.journal h3 { font-size: 1.11rem; }
.milestone-count { margin-bottom: 5px; font-size: .72rem; color: #555c37; }
.goal-reward { margin-top: 5px; font-size: .81rem; line-height: 1.35; color: #464d32; }
.goals, .goal ul { padding: 0; margin: 11px 0 0; }
.goal li { display: flex; align-items: center; list-style: none; gap: 8px; margin-top: 10px; }
.goal li .goal-icon { width: 29px; height: 29px; }
.goal-crop { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 5px; align-items: baseline; }
.goal-crop strong, .tally { font-size: .85rem; }
.tally { color: #585633; }
.goal-crop progress {
  display: block; grid-column: 1 / -1; width: 100%; height: 7px;
  border: none; border-radius: 99px; overflow: hidden; background: #bca57380; color: #588044;
}
.goal-crop progress::-webkit-progress-bar { background: #bca57380; }
.goal-crop progress::-webkit-progress-value { background: #588044; border-radius: 99px; }
.goal-crop progress::-moz-progress-bar { background: #588044; border-radius: 99px; }
.complete {
  margin-top: 15px; padding: 9px 11px; background: #d4e1b6;
  border: 1px solid #6e8957; border-radius: 6px; font-weight: 620; font-size: .85rem;
}
.help p, .help li { margin-top: 8px; font-size: .86rem; line-height: 1.48; }
.help { padding: 14px 0; border-bottom: 1px solid #ab945f72; }
.help summary { width: fit-content; font-weight: 660; font-size: .87rem; }
.help ol { padding-left: 1.25rem; }
.journal :focus-visible { outline-color: #425b30; }
.journal-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  color: #575536; padding-top: 12px; font-size: .73rem;
}
.text-button {
  padding: 4px 0;
  border: none; background: transparent; color: #4f4a2e;
  text-decoration: underline; flex-shrink: 0;
}
dialog {
  color: var(--ink); background: var(--parchment);
  width: min(430px, calc(100% - 32px));
  border: 1px solid #ab945f;
  border-radius: 9px; padding: 22px;
}
dialog::backdrop { background: #0d1b12aa; }
dialog h2 { font: bold 1.5rem var(--serif); }
dialog p { padding: 10px 0 18px; }
dialog form { display: flex; flex-wrap: wrap; justify-content: end; gap: 9px; }
dialog button { color: var(--ink); background: #fff4d7; border: 1px solid #ae9865; border-radius: 6px; padding: 7px 10px; }
@media (max-width: 980px) {
  .masthead-inner, .layout { width: min(900px, calc(100% - 40px)); }
  .game-layout { grid-template-columns: minmax(0, 1fr) 248px; gap: 14px; }
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plot-sign small { white-space: normal; }
  .plots[data-columns] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .layout { padding-top: 22px; }
  .game-layout { grid-template-columns: minmax(0, 1fr); }
  .day-display { padding: 8px 10px; }
  .heading { gap: 9px; }
  .heading-controls { flex-direction: column; align-items: flex-end; gap: 5px; }
  .sound-toggle { min-height: 34px; padding: 5px 8px; }
  .heading p { font-size: .89rem; }
  .scene { height: clamp(190px, 43vw, 250px); }
  .beds { padding: 12px; }
  .plots { gap: 8px; }
  .tools { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 495px) {
  .masthead-inner, .layout { width: calc(100% - 24px); }
  .masthead-inner { min-height: 53px; }
  .brand { font-size: 1rem; gap: 5px; }
  .back { font-size: .73rem; padding: 6px 7px; }
  .sun { font-size: 1.5rem; }
  .day-display div span { display: none; }
  .day-display { gap: 5px; }
  .day-display strong { font-size: .96rem; }
  .scene-label { left: 13px; bottom: 16px; }
  .scenery { width: 82%; }
  .hazel { max-width: 38%; }
  .toolbox { padding: 11px 12px 12px; grid-template-columns: minmax(0, 1fr); }
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .day-actions { justify-self: end; }
  .feedback { padding-bottom: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::after, *::before { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.valley-nav {
  display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
  padding: 0 0 13px;
}
.view-switch, .traveler-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.traveler-switch span { color: #c7c8a6; font-size: .78rem; margin-right: 2px; }
.valley-nav button {
  padding: 6px 10px; min-height: 35px; border: 1px solid #6c7753;
  border-radius: 6px; background: #233529; color: #f0dfb8; font-size: .83rem;
}
.valley-nav button:hover { background: #3b5035; }
.valley-nav button[aria-pressed=true] { background: #584d2c; color: #ffe3a1; border-color: #c2a158; }
.valley-nav button:disabled { opacity: .48; cursor: default; }
.wallet {
  margin-left: auto; color: #ffdc9a; padding: 7px 9px; border-radius: 5px;
  border: 1px solid #977945; background: #362e1d; font-weight: 650; font-size: .82rem;
}
.garden-plot { min-width: 0; border: 1px solid #899260; padding: 8px; border-radius: 8px; background: #2637238c; }
.garden-plot[data-width="2"], .garden-plot[data-width="3"] { grid-column: 1 / -1; }
.plot-heading { margin: 0 0 5px; font: bold .85rem var(--serif); color: #f4dfaa; }
.plot-spaces { display: grid; gap: 7px; }
.plot-spaces[data-width="2"] { grid-template-columns: repeat(2,minmax(0,1fr)); }
.plot-spaces[data-width="3"] { grid-template-columns: repeat(3,minmax(0,1fr)); }
#plots { grid-template-columns: repeat(2,minmax(0,1fr)); }
.storage-heading { margin-top: 9px; font-size: .83rem; font-weight: 750; }
.storage-caption { font-size: .78rem; margin-top: 3px; color: #505136; }
.basket-list, .rack-list { margin: 5px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.basket-row, .rack-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 4px 9px; flex-wrap: wrap;
  padding-top: 4px; border-top: 1px dashed #a58d5588; font-size: .75rem;
}
.basket-row span, .rack-row span { color: #595639; }
.rack-pack {
  padding: 4px 7px; color: #293e2b; border: 1px solid #8c9f69; background: #dce4bf;
  border-radius: 4px; font-size: .75rem;
}
.rack-pack:not(:disabled):hover { background: #edf1d6; }
.rack-pack:disabled { opacity: .54; }
.valley-layout { display: grid; grid-template-columns: minmax(0,2.5fr) minmax(250px,1fr); align-items: start; gap: 21px; }
.valley-board { border-radius: 10px; overflow: hidden; border: 1px solid #7b895b; background: #26392a; box-shadow: 0 16px 36px #07130c55; }
.valley-board header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; }
.valley-board h2 { font: bold clamp(1.3rem,3vw,2rem)/1.05 var(--serif); }
.valley-board header p, .map-instructions { margin-top: 5px; font-size: .81rem; color: #ded5ad; }
.map-surface { margin: 0 12px; position: relative; min-height: 343px; height: min(47vw,480px); border: 1px solid #9b9d69; border-radius: 8px; overflow: hidden; }
.map-surface canvas, .map-pins { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-traveler {
  position: absolute; z-index: 2; width: clamp(42px, 8vw, 70px); height: clamp(45px, 9vw, 74px);
  transform: translate(-50%, -100%); pointer-events: none;
  transition-property: none;
  filter: drop-shadow(1px 2px 2px #262614db);
}
.map-traveler[data-facing=left] > :is(canvas, #map-theo) { transform: scaleX(-1); }
.map-traveler canvas { object-fit: contain; }
.map-traveler #map-hazel { object-position: center bottom; }
.map-traveler #map-theo, .map-traveler .cast-figure { position: absolute; inset: 0; margin: 0; }
.map-traveler .cast-figure canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-traveler .cast-figure figcaption { display: none; }
.map-pin {
  position: absolute; transform: translate(-50%,-50%);
  max-width: clamp(68px,15vw,148px); min-width: 62px; padding: 5px 8px;
  background: #3a4930; color: #fcf0ca; border: 1px solid #738760;
  border-radius: 6px; font: bold .82rem/1.08 var(--serif);
  box-shadow: 0 3px 7px #2930196e;
}
.map-pin[data-linked=true] { background: #34593b; border-color: #fff1bd; }
.map-pin[data-current=true] { background: #574020; border: 2px solid #ffe2a0; color: #fff1c2; z-index: 1; }
.map-pin:hover { background: #50744b; }
.pin-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; background: #d5d2a2; }
.map-pin[data-current=true] .pin-dot { background: #ffe1a0; }
.map-instructions, .map-status { padding: 0 15px; margin-top: 9px; }
.map-status { min-height: 2.5em; color: #f4d896; margin-bottom: 3px; font-size: .81rem; line-height: 1.35; }
.valley-journal { padding: 0; overflow: hidden; }
.site-art {
  height: 167px;
  background: var(--location-art,linear-gradient(115deg,#8b9b62,#bca370)) center var(--location-focus,50%)/cover;
}
:is(.site-art,.location-stage)[data-site=burrow] { --location-art: var(--site-burrow,linear-gradient(#98a375,#798d5d)); --location-focus: 54%; }
:is(.site-art,.location-stage)[data-site=square] { --location-art: var(--site-square,linear-gradient(#ebc887,#be926d)); --location-focus: 45%; }
:is(.site-art,.location-stage)[data-site=nook] { --location-art: var(--site-nook,linear-gradient(#b89361,#776244)); --location-focus: 51%; }
:is(.site-art,.location-stage)[data-site=treehouse] { --location-art: var(--site-treehouse,linear-gradient(#91a16a,#695039)); --location-focus: 46%; }
:is(.site-art,.location-stage)[data-site=meadow] { --location-art: url("/garden/scenes/sunpetal-meadow.png"); --location-focus: 42%; }
:is(.site-art,.location-stage)[data-site=wood] { --location-art: url("/garden/scenes/bramblewood-edge.png"); --location-focus: 48%; }
:is(.site-art,.location-stage)[data-site=workshop] { --location-art: var(--site-workshop,linear-gradient(#a88a58,#a1a17c)); --location-focus: 57%; }
:is(.site-art,.location-stage)[data-site=hall] { --location-art: var(--site-hall,linear-gradient(#cba673,#935f41)); --location-focus: 53%; }
:is(.site-art,.location-stage)[data-site=lookout] { --location-art: url("/garden/scenes/pipers-lookout.webp"); --location-focus: 59%; }
.location-stage[data-site=lookout] .location-ground { visibility: hidden; }
.site-copy { padding: 15px 17px 17px; }
.site-copy h2 { margin: 5px 0 7px; font-size: clamp(1.3rem,3vw,1.85rem); padding-bottom: 9px; }
.site-kind { font-size: .73rem; font-weight: 800; color: #515d36; }
.site-description { font-size: .82rem; line-height: 1.4; }
.site-actions { display: grid; gap: 7px; margin-top: 12px; }
.site-actions p, .site-actions label { font-size: .76rem; line-height: 1.35; }
.site-actions h3 { font-size: .99rem; }
.bramble-encounter {
  display: grid; gap: 6px; border: 1px solid #a58c58; border-radius: 7px; padding: 9px;
  background: #eadbb2;
}
.map-action {
  width: 100%; border: 1px solid #9a884f; border-radius: 6px; padding: 6px 8px; min-height: 35px;
  color: #283321; background: #f9eac5; text-align: left; font-size: .79rem; font-weight: 650;
}
.map-action:not(:disabled):hover { background: #fff6d8; }
.map-action:disabled { cursor: default; opacity: .62; }
.tactics-challenge { display: flex; align-items: center; text-decoration: none; }
.enter-location {
  min-height: 42px; padding: 8px 13px;
  border: 1px solid #819561; border-radius: 7px; background: #354c32; color: #fff1c8;
  font-weight: 750; text-align: left;
}
.enter-location::after { content: "→"; float: right; margin-left: 6px; }
.enter-location:hover { background: #4a643d; }
#return-garden { margin-top: 10px; }
.upgrade-order { display: grid; gap: 4px; }
.upgrade-order select { display: block; width: 100%; background: #ffefcf; color: #343722; border: 1px solid #a7986b; border-radius: 4px; padding: 4px; }
.theo-satchel { border-top: 1px solid #ad9568; margin-top: 12px; padding-top: 9px; font-size: .77rem; }
.theo-satchel.with-theo { min-height: 48px; padding-left: 47px; background: var(--site-theo) left bottom/38px 44px no-repeat; }
.home-game-offer {
  display: grid; gap: 5px; padding: 10px; margin: 4px 0;
  border: 1px solid #9a956e; border-left: 4px solid #6e8051; border-radius: 7px;
  background: #fcf2d5; color: var(--ink);
}
.home-game-offer p { margin: 0; font-size: .78rem; line-height: 1.35; }
.home-game-offer .map-action { margin-top: 3px; }
.home-game {
  --game-accent: #36563b;
  width: min(566px, calc(100% - 24px)); max-height: min(760px, calc(100dvh - 24px));
  padding: 0; border-radius: 14px;
  color-scheme: light;
  background: #fbf2d7;
  box-shadow: 0 18px 58px #080f0bb3;
}
.home-game[data-game="ledger"] { --game-accent: #764720; }
.home-game[data-game="fit"] { --game-accent: #544637; }
.home-game[data-game="order"] { --game-accent: #35565a; }
.home-game[data-game="journal"] { --game-accent: #55445f; }
.home-game-header {
  display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px;
  padding: 16px clamp(12px, 4vw, 24px); border-bottom: 3px double #c1a56c;
  background: var(--game-accent); color: #fff2d2;
}
#home-game-mark {
  display: grid; place-items: center; width: 44px; aspect-ratio: 1;
  border: 1px solid #dfc58c; border-radius: 50%; color: #f3d9a3; font-size: 1.45rem;
}
.home-game h2 { margin: 2px 0; font-size: clamp(1.15rem, 5vw, 1.65rem); }
.home-game p { margin: 0; padding: 0; }
.home-game-header p { color: #f6dfae; font-size: .78rem; line-height: 1.3; }
.home-game-header button { background: #fff4d7; font-size: .83rem; }
.home-game-table { display: grid; gap: 12px; padding: 18px clamp(12px, 4vw, 24px) 10px; }
.home-game-description { line-height: 1.5; }
.home-game-bonus { color: var(--game-accent); font-weight: 750; }
.home-game-note { color: #584f38; font-size: .85rem; line-height: 1.45; }
.home-game-materials, .home-game-invoice {
  margin: 0; padding: 10px 12px; border: 1px solid #c7b57e; border-radius: 7px;
  background: #f5e6bb; list-style: none;
}
.home-game-materials li + li { margin-top: 6px; }
.home-game-materials span { display: block; font-size: .85rem; margin-top: 4px; }
.home-game-invoice { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-variant-numeric: tabular-nums; }
.home-game-invoice dd { margin: 0; }
.home-game-invoice dd { text-align: right; }
.home-game-invoice-bonus { padding-top: 7px; border-top: 1px solid #c7b57e; font-weight: 750; }
.home-game-step { color: var(--game-accent); font-size: .83rem; font-weight: 750; }
.home-game-prompt { font: bold 1.18rem/1.35 var(--serif); }
.home-game-choices, .home-game-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.home-game .home-game-choice { min-height: 42px; }
.home-game .home-game-choice:not(:disabled):hover { background: #f2dfaa; }
.home-game button:focus-visible { outline-color: var(--game-accent); outline-offset: 2px; }
.home-game-header button:focus-visible { outline-color: #fff2d2; }
.home-game .home-game-start {
  background: var(--game-accent); color: #fff4da; justify-self: start; min-height: 42px; padding: 8px 14px;
}
.home-game .home-game-start::after { content: none; }
.home-game button:disabled { opacity: .55; cursor: default; }
.home-game .home-game-start:not(:disabled):hover { filter: brightness(1.12); }
.home-game-paid-title { margin: 3px 0 0; padding-top: 11px; border-top: 1px solid #c7b57e; }
.home-game p.home-game-lock {
  padding: 8px 11px; border: 1px solid #b88c57; border-radius: 6px;
  background: #f7e1b5; color: #6d371d; font-size: .88rem; font-weight: 750;
}
.seedbed-tray, .seedbed-board {
  display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,132px),1fr)); gap: 8px;
}
.home-game .seedbed-label {
  min-height: 50px; padding: 7px; display: flex; align-items: center; gap: 6px; text-align: left;
}
.seedbed-label .tool-icon, .seedbed-soil .tool-icon {
  display: block; flex: 0 0 auto; width: 28px; height: 28px; margin: 0;
}
.seedbed-label small { display: block; }
.home-game .seedbed-label[aria-pressed="true"] {
  border-color: #3e6540; box-shadow: inset 0 0 0 1px #3e6540; background: #dde8c1;
}
.home-game .seedbed-bed {
  display: grid; grid-template-rows: auto auto auto 1fr; gap: 5px; align-content: start;
  min-height: 128px; padding: 8px; text-align: center;
}
.seedbed-soil {
  min-height: 42px; display: grid; place-items: center; border-radius: 6px;
  background: var(--soil-art,radial-gradient(ellipse at 50% 38%,#9e7050,#60402b)) center / cover;
}
.seedbed-soil .tool-icon { background-color: #fbefd4; border: 1px solid #f1d89b; border-radius: 50%; }
.seedbed-empty { color: #fff0d0; font-size: 1.3rem; line-height: 1; }
.home-game .seedbed-bed[data-result="match"] { border-color: #638044; background: #e9efcf; opacity: 1; }
.home-game .seedbed-bed[data-result="adjust"] { border-color: #ab6e40; background: #f8e2bf; }
.home-game .seedbed-bed:not(:disabled):hover { box-shadow: inset 0 0 0 1px var(--game-accent); }
.seedbed-result { font-weight: 750; }
.home-game-slots {
  display: grid; grid-template-columns: repeat(auto-fit,minmax(66px,1fr)); gap: 6px;
  list-style: none; padding: 0; margin: 0;
}
.home-game-slots li {
  display: grid; min-height: 46px; place-items: center; padding: 5px; border-radius: 5px; text-align: center;
  background: #e8d3a0; border: 1px solid #a88f5a; font-size: .82rem; font-weight: 650;
}
.home-game-slots .open { color: #615232; background: transparent; border-style: dashed; }
.home-game-ruler { width: 100%; height: 12px; accent-color: var(--game-accent); }
.home-game .home-game-status {
  min-height: 24px; margin: 0 clamp(12px, 4vw, 24px) 16px;
  color: var(--game-accent); font-size: .88rem; font-weight: 700; line-height: 1.4;
}
.home-game .home-game-status:empty { min-height: 0; }
@media (max-width: 980px) {
  .valley-layout { grid-template-columns: minmax(0,1fr) 248px; gap: 14px; }
}
@media (max-width: 720px) {
  .valley-layout { grid-template-columns: minmax(0,1fr); }
  .map-surface { height: 365px; min-height: 310px; }
  .map-pin { max-width: 94px; font-size: .74rem; padding: 4px 5px; }
  .site-art { height: 155px; }
}
@media (max-width: 495px) {
  .valley-nav { gap: 7px; padding-bottom: 11px; }
  .valley-nav button { padding: 5px 8px; }
  .wallet { margin-left: 0; }
  .map-surface { margin: 0 8px; }
}

.location-stage {
  height: clamp(360px, 43vw, 515px); margin: 0 12px;
  border: 1px solid #a59768; border-radius: 8px;
}
#location-status:empty { display: none; }
.location-board[data-sleeping=true] .location-stage::after {
  content: ""; position: absolute; inset: 0; z-index: 1000; pointer-events: none;
  background: radial-gradient(ellipse at center,#31254570,#151923f5);
  animation: bloom-sleep 1.5s ease-in both;
}
@keyframes bloom-sleep {
  from { opacity: 0; }
  to { opacity: .94; }
}
.location-backdrop, .location-ground, .location-cast { position: absolute; inset: 0; width: 100%; height: 100%; }
.location-backdrop {
  background: linear-gradient(180deg,#1926122c 0%,transparent 38%,#22251449 74%),
    var(--location-art,linear-gradient(#7f9357,#425537)) center var(--location-focus,50%)/cover;
}
.location-cast { pointer-events: none; }
.location-cast .cast-figure {
  position: absolute; margin: 0; left: var(--actor-x); top: var(--actor-y);
  transition-property: none;
  width: calc(clamp(100px,31%,265px) * var(--actor-scale,1) * var(--shape-scale,1));
  transform: translate(calc(-1 * var(--foot-x)),calc(-1 * var(--foot-y)));
}
.location-cast .cast-figure::before {
  content: ""; position: absolute; left: var(--foot-x); top: var(--foot-y);
  width: 49%; height: 9%; transform: translate(-50%,-42%);
  background: radial-gradient(ellipse at center,#18170ec9 0%,#2622138c 26%,#30291745 49%,transparent 73%);
}
.cast-figure canvas {
  position: relative; display: block; width: 100%; height: auto;
  filter: drop-shadow(1px 2px 3px #241a166e);
}
.cast-figure:not([data-character=theo],[data-character=hazel]) canvas {
  transform: scaleX(-1); transform-origin: var(--foot-x) center;
}
.cast-figure[data-character=hazel] { --shape-scale: .77; --foot-x: 44%; --foot-y: 95.5%; }
.location-hazel-art { position: relative; aspect-ratio: 365 / 500; }
.location-hazel-art img {
  position: absolute; top: 2.4%; left: 3%; width: 82.74%; height: 95.4%;
  filter: drop-shadow(1px 2px 3px #241a166e);
}
.location-hazel-art img:not([src]), .paper-doll-ready .location-hazel-art img { visibility: hidden; }
.cast-figure figcaption {
  position: absolute; left: var(--foot-x); top: calc(var(--foot-y) + 5px);
  transform: translateX(-50%); width: max-content; max-width: 124%;
  border-radius: 4px; background: #263420e8; color: #fcf0cb; border: 1px solid #96a6788a;
  padding: 3px 7px; font: bold .83rem var(--serif); text-align: center;
}
@media (max-width: 720px) {
  .location-stage { height: clamp(270px, 76vw, 390px); margin: 0 8px; }
  .cast-figure figcaption { font-size: .71rem; padding: 2px 5px; }
}
