.heart-garden-page {
  --garden-stage-scale: 1;
  --ink: #51321f;
  --mood-ink: #4d4036;
  --mood-accent: #d88970;
  --focus: #fff0b4;
  position: absolute;
  z-index: 20;
  inset: 0;
  min-width: 320px;
  overflow: hidden;
  background: #8a552f;
  color: var(--ink);
  color-scheme: only light;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  isolation: isolate;
  outline: none;
}

.heart-garden-page[hidden] {
  display: none !important;
}

.heart-garden-page,
.heart-garden-page * {
  box-sizing: border-box;
}

.heart-garden-page button,
.heart-garden-page textarea {
  font: inherit;
}

.heart-garden-page button {
  -webkit-tap-highlight-color: transparent;
}

.heart-garden-shell {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #8a552f;
}

.garden-background-full {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
  image-rendering: auto;
}

.garden-stage {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 1672px;
  height: 941px;
  overflow: visible;
  isolation: isolate;
  transform: translate(-50%, -50%) scale(var(--garden-stage-scale));
  transform-origin: 50% 50%;
}

.garden-art,
.garden-control img,
.mood-option img,
.weather-option img {
  display: block;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
  image-rendering: auto;
}

.garden-art {
  position: absolute;
  pointer-events: none;
}

.garden-art--diary-pad {
  z-index: 10;
  top: 155px;
  left: 244px;
  width: 1190px;
  height: 746px;
}

.paper-export-stage {
  position: absolute;
  z-index: 20;
  top: 225px;
  left: 365px;
  width: 970px;
  height: 626px;
  isolation: isolate;
}

.garden-art--paper {
  z-index: 0;
  inset: 0;
  width: 970px;
  height: 626px;
}

.journal-meta-value,
.journal-meta-mood {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}

.journal-meta-date {
  top: 29px;
  left: 112px;
  width: 132px;
  height: 44px;
  font-variant-numeric: tabular-nums;
}

.journal-meta-mood {
  top: 28px;
  left: 300px;
  width: 148px;
  height: 45px;
  gap: 8px;
  color: var(--mood-ink);
}

.journal-mood-star {
  color: var(--mood-accent);
  font-size: 29px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 1px 1px 0 rgb(74 43 27 / 24%);
}

.weather-picker {
  position: absolute;
  z-index: 5;
  inset: 0;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
}

.weather-option {
  position: absolute;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
}

.weather-art {
  position: relative;
  display: block;
  width: 42px;
  height: 42px;
  transition: transform 140ms cubic-bezier(0.25, 1, 0.5, 1);
}

.weather-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 120ms ease;
}

.weather-art__selected {
  opacity: 0;
}

.weather-option.is-selected .weather-art__neutral,
.weather-option:has(input:checked) .weather-art__neutral {
  opacity: 0;
}

.weather-option.is-selected .weather-art__selected,
.weather-option:has(input:checked) .weather-art__selected {
  opacity: 1;
}

.weather-option:hover .weather-art {
  transform: translateY(-2px);
}

.weather-option:active .weather-art {
  transform: translateY(1px);
}

.weather-option:has(input:focus-visible) .weather-art {
  filter:
    drop-shadow(0 0 2px #70452c)
    drop-shadow(0 0 4px var(--focus));
}

.weather-option--sunny {
  top: 26px;
  left: 558px;
}

.weather-option--partly-cloudy {
  top: 26px;
  left: 614px;
}

.weather-option--cloudy {
  top: 26px;
  left: 670px;
}

.weather-option--rainy {
  top: 26px;
  left: 726px;
}

.weather-option--snowy {
  top: 26px;
  left: 782px;
}

[data-heart-garden-note] {
  position: absolute;
  z-index: 4;
  top: 94px;
  left: 108px;
  width: 792px;
  height: 490px;
  padding: 0 4px;
  overflow: auto;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--mood-ink);
  caret-color: var(--mood-accent);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 21px;
  font-weight: 500;
  line-height: 50px;
  resize: none;
  scrollbar-color: rgb(122 74 43 / 28%) transparent;
}

[data-heart-garden-note]::placeholder {
  color: rgb(106 66 42 / 58%);
  opacity: 1;
}

[data-heart-garden-note]:focus,
[data-heart-garden-note]:focus-visible {
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
}

.mood-rack {
  position: absolute;
  z-index: 40;
  inset: 0;
  pointer-events: none;
}

.garden-art--mood-rack {
  z-index: 40;
  top: 302px;
  left: 66px;
  width: 260px;
  height: 523px;
}

.mood-grid {
  position: absolute;
  z-index: 50;
  inset: 0;
  pointer-events: none;
}

.mood-option {
  position: absolute;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  transform-origin: 50% 78%;
  transition:
    transform 140ms cubic-bezier(0.25, 1, 0.5, 1),
    filter 140ms ease;
}

.mood-option__plate,
.mood-option__selected {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.mood-option__selected {
  z-index: 2;
  inset: -3px;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.mood-option--happy {
  top: 328px;
  left: 146px;
  width: 146px;
  height: 66px;
}

.mood-option--calm {
  top: 404px;
  left: 137px;
  width: 149px;
  height: 66px;
}

.mood-option--warm {
  top: 480px;
  left: 128px;
  width: 152px;
  height: 67px;
}

.mood-option--miss {
  top: 556px;
  left: 118px;
  width: 156px;
  height: 68px;
}

.mood-option--sad {
  top: 633px;
  left: 108px;
  width: 159px;
  height: 68px;
}

.mood-option--hope {
  top: 710px;
  left: 98px;
  width: 163px;
  height: 70px;
}

.mood-option:hover {
  z-index: 2;
  transform: translateY(-4px);
  filter: brightness(1.045);
}

.mood-option.is-selected {
  z-index: 3;
  transform: translateY(-2px);
}

.mood-option.is-selected .mood-option__selected {
  opacity: 1;
}

.mood-option.is-selected:hover {
  transform: translateY(-4px);
}

.mood-option:active,
.mood-option.is-selected:active {
  transform: translateY(1px);
  filter: brightness(0.98);
}

.mood-option:focus-visible {
  z-index: 4;
  filter:
    brightness(1.05)
    drop-shadow(0 0 2px #70452c)
    drop-shadow(0 0 5px var(--focus));
}

.garden-control {
  position: absolute;
  z-index: 70;
  display: block;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: pointer;
  transition:
    transform 140ms ease,
    filter 140ms ease;
}

.back-button {
  top: 20px;
  left: 20px;
  width: 102px;
  height: 100px;
}

.camera-button {
  top: 716px;
  left: 1450px;
  width: 160px;
  height: 160px;
}

.garden-control img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.garden-control:hover {
  transform: translateY(-3px);
  filter: brightness(1.055);
}

.garden-control:active {
  transform: translateY(1px);
  filter: brightness(0.98);
}

.garden-control:focus-visible {
  filter:
    brightness(1.06)
    drop-shadow(0 0 3px #70452c)
    drop-shadow(0 0 6px var(--focus));
}

.camera-button[aria-busy="true"] {
  cursor: wait;
  filter: saturate(0.75);
}

.save-status {
  position: absolute;
  z-index: 80;
  left: 50%;
  bottom: 20px;
  min-width: 220px;
  margin: 0;
  padding: 10px 18px;
  border: 2px solid #875033;
  border-radius: 8px;
  background: #fff0cf;
  box-shadow: 0 4px 0 rgb(75 40 21 / 38%);
  color: #6d3f28;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.save-status.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.heart-garden-page .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
  .heart-garden-page,
  .heart-garden-page *,
  .heart-garden-page *::before,
  .heart-garden-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
