@font-face { font-family: Pixelify; src: url("../assets/fonts/pixelify-sans.ttf") format("truetype"); font-display: swap; }
.garden-page {
  --type: Pixelify, monospace;
  --garden-gap: clamp(.375rem, calc(3dvh - .5rem), 1.5rem);
  font-family: var(--type);
  width: min(60rem, calc(100% - 2rem));
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  padding-block: var(--garden-gap);
  display: flex;
  flex-direction: column;
}
.garden-page header { display: flex; justify-content: space-between; align-items: center; }
.garden-page .signature { font-size: clamp(.9rem, 3.5vw, 1.15rem); gap: .4em; }
.garden-page .signature-avatar { width: 1.9em; height: 1.9em; font-size: inherit; }
.garden-page h1 { margin-top: calc(var(--garden-gap) * 1.5); font: bold clamp(2rem, 6vh, 3.75rem)/1.1 var(--type); }
#controls { margin: var(--garden-gap) 0; }
#hint { margin: var(--garden-gap) 0 0; }
.garden-page p { max-width: 68ch; }
.garden-page button:not(:where(.theme-toggle)) { font: bold 1rem var(--type); cursor: pointer; color: var(--ink); }
#work button { min-height: 44px; background: var(--blush); border: 1px solid var(--line); border-radius: .4rem; padding: .5rem .8rem; }
.garden-map {
  flex: 0 1 min(40.75rem, calc(62.5vw + 2rem));
  min-height: 0;
  container-type: size;
}
.map-heading, .game-screen {
  width: min(100%, max(0px, calc((100cqh - 3.25rem) * 1.6)));
  margin-inline: auto;
}
.game-screen { position: relative; }
#music { position: absolute; top: .5rem; right: .5rem; width: 44px; height: 44px; padding: 9px; border: 0; border-radius: 50%; background: var(--blush); color: var(--rose); }
#music svg { display: block; width: 100%; height: 100%; }
#music[aria-pressed="true"] .music-off { display: none; }
.clearing {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 384 / 240;
  background: #b6c791 url("../assets/garden/clearing.png") center / 100% 100%;
  image-rendering: pixelated;
  border: 3px solid var(--line);
  box-shadow: 3px 4px var(--blush);
}
.clearing:focus-visible { outline: none; border-color: var(--rose); }
.station, .wanderer { position: absolute; transform: translate(-50%, -100%); }
.station {
  left: var(--x); top: var(--y); width: 17%; min-height: 44px;
  padding: 0; border: 0; background: transparent; display: grid; justify-items: center;
}
.station { align-items: end; }
.station img { display: block; width: 100%; image-rendering: pixelated; }
.station:is(:hover, :focus-visible) > :first-child { filter: drop-shadow(1px 0 #fff0cb) drop-shadow(-1px 0 #fff0cb); }
.plant-station, .cat-station { width: max(44px, 7%); }
.plant-station[data-size="large"] { width: max(52px, 10%); }
.cat-station img { width: 82%; }
#cat-companion { position: absolute; width: max(36px, 5.75%); pointer-events: none; transform: translate(-50%, -100%) scaleX(var(--facing, 1)); image-rendering: pixelated; }
.wanderer { width: 5.5%; left: 48%; top: 86%; pointer-events: none; image-rendering: pixelated; }
.wanderer, #cat-companion {
  background-size: 300% 100%;
  background-position: 100% 0;
  background-repeat: no-repeat;
}
.wanderer { aspect-ratio: 1; background-image: url("../assets/garden/wanderer-poses.png"); }
#cat-companion { aspect-ratio: 18 / 12; background-image: url("../assets/garden/cat-poses.png"); }
#cat-companion.walking { background-position: 0 0; }
@media (prefers-reduced-motion: no-preference) {
  .wanderer.walking, #cat-companion.walking { animation: garden-steps .34s steps(2, end) infinite; }
  @keyframes garden-steps { from { background-position: 0 0; } to { background-position: 100% 0; } }
}
.wind { position: absolute; inset: 0; pointer-events: none; }
.wind i { position: absolute; top: 12%; left: 0; width: .6%; height: 1%; background: #f8cbd1; box-shadow: 2px -2px #d79bab; opacity: 0; }
.wind i:nth-child(2) { top: 22%; animation-delay: -3s; }
.wind i:nth-child(3) { top: 33%; animation-delay: -7s; }
.wind i:nth-child(4) { top: 44%; animation-delay: -9s; }
.wind i:nth-child(5) { top: 7%; animation-delay: -5s; }
@media (prefers-reduced-motion: no-preference) {
  .wind i { animation: drift 12s linear infinite; }
  @keyframes drift {
    0% { left: -2%; transform: translateY(0) rotate(0deg); opacity: 0; }
    12%, 86% { opacity: .9; }
    50% { transform: translateY(1.5rem) rotate(120deg); }
    100% { left: 102%; transform: translateY(1rem) rotate(230deg); opacity: 0; }
  }
}
#work { color: var(--ink); background: var(--surface); border: 2px solid var(--line); width: min(30rem, 92%); padding: 1.25rem; }
#work::backdrop { background: rgb(43 33 46 / 55%); }
#work form { text-align: right; }
#hint { min-height: 1.6em; font-family: var(--type); }
.pot-sprite {
  width: 65%;
  aspect-ratio: 41 / 72;
  background: url("../assets/garden/flowerpot.png") 0 0 / 400% 100% no-repeat;
}
.pot-sprite.wild { aspect-ratio: 16 / 18; background-image: url("../assets/garden/wildflower.png"); }
.bloom-petal {
  position: absolute; left: 49%; top: 15%; width: 5px; height: 3px;
  background: #ffb7cd; box-shadow: 1px 1px #a86481; pointer-events: none;
  animation: bloom-drift 1.3s ease-out both;
}
@keyframes bloom-drift {
  from { transform: translate(0, 0); opacity: 1; }
  to { transform: translate(var(--drift), var(--lift)) rotate(160deg); opacity: 0; }
}
.map-heading, .map-routes { display: flex; align-items: center; gap: .5rem; }
.map-heading {
  justify-content: space-between;
  height: 3.25rem;
  padding-inline: clamp(.5rem, 2vw, 1rem);
  background: var(--blush);
  border: 3px solid var(--line);
  border-bottom: 0;
  box-shadow: 3px 0 var(--blush);
}
.map-heading h2 { margin: 0; font: bold clamp(1.15rem, 4vw, 1.6rem) var(--type); }
.map-routes button { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; color: var(--rose); background: transparent; border: 0; }
.map-routes svg { width: 30px; height: 30px; fill: currentColor; }
.map-routes button:disabled { opacity: .35; cursor: default; }
.station[data-work="contact"] { width: max(44px, 9%); }
.station[data-work="contact"] img { width: 75%; }
.station[data-work="hobbies"] { width: 22%; }
#work { border: 3px solid var(--ink); background: color-mix(in srgb, var(--card-tint) 28%, var(--surface)); box-shadow: inset 0 5px var(--card-tint), 5px 5px 0 var(--card-tint); max-height: 88vh; }
#card-title { font: 1.9rem/1.15 var(--type); }
.garden-page .signature, #card-body p { font-family: "Courier New", Courier, monospace; }
#card-icon { object-fit: contain; image-rendering: pixelated; }
#card-subtitle { color: var(--rose); font: bold .95rem/1.5 var(--type); }
#card-links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; border-top: 2px dashed var(--line); }
#card-links a { display: inline-flex; align-items: center; min-height: 44px; }
.station[data-work="cha"] { width: max(44px, 11%); }
.station[data-work="resume"] { width: max(44px, 8%); }
.station[data-work="resume"] img { width: 78%; }
#card-links:empty { display: none; }
#booth-email-status { min-height: 1.5em; margin: .5rem 0 0; font-weight: bold; }
.garden-icon-link { display: inline-grid; place-items: center; width: 44px; height: 44px; color: white; background: #90455e; --rose: #90455e; border-radius: 50%; }
.garden-icon-link svg { width: 1.35rem; height: 1.35rem; }
#work button.garden-icon-link { padding: 0; border: 0; border-radius: 50%; background: #90455e; color: white; }
#card-links { padding-top: .7rem; gap: .5rem; }
#card-links a { display: inline-grid; }
.garden-project { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .15rem .75rem; padding-block: .75rem; }
.garden-project + .garden-project { border-top: 1px solid var(--line); }
.garden-project h3, .garden-project p { margin: 0; }
.garden-project a { grid-area: 1 / 2 / 3; }
.cat-photo {
  display: block;
  width: min(100%, 12rem);
  aspect-ratio: 1;
  object-fit: cover;
  object-view-box: inset(5% 10% 6% 10%);
  margin: 1rem auto;
  border: 4px solid var(--surface);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--card-tint);
}
