:root {
  color-scheme: dark;
  --ink: #ecede4;
  --ink-soft: rgba(236, 237, 228, 0.72);
  --ink-faint: rgba(236, 237, 228, 0.48);
  --moss: #15251b;
  --moss-deep: #0a1211;
  --stone: #9c9583;
  --mist: rgba(220, 226, 221, 0.24);
  --gold: #f6cb76;
  --gold-hot: #fff0ba;
  --petal: #e9aeb2;
  --maple: #793324;
  --mx: 0;
  --my: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--moss-deep);
}

body {
  color: var(--ink);
}

a {
  color: inherit;
}

.garden {
  position: relative;
  isolation: isolate;
  width: 100vw;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  background: #0b1110;
}

.garden::before,
.garden::after {
  position: absolute;
  inset: 0;
  z-index: 28;
  pointer-events: none;
  content: "";
}

.garden::before {
  background:
    radial-gradient(circle at 50% 70%, transparent 0 35%, rgba(2, 7, 7, 0.06) 56%, rgba(1, 4, 4, 0.46) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.54), transparent 20% 76%, rgba(0, 0, 0, 0.22));
}

.garden::after {
  background:
    linear-gradient(180deg, transparent 0 68%, rgba(0, 0, 0, 0.34) 100%),
    radial-gradient(circle at 75% 55%, rgba(246, 203, 118, 0.13), transparent 18%);
  mix-blend-mode: screen;
  opacity: 0.62;
}

.layer {
  transform:
    translate3d(calc(var(--mx) * var(--depth-x, 0px)), calc(var(--my) * var(--depth-y, 0px)), 0)
    scale(var(--layer-scale, 1));
  transition: transform 900ms cubic-bezier(0.2, 0.7, 0.18, 1);
  will-change: transform;
}

.backdrop {
  --depth-x: -7px;
  --depth-y: -4px;
  --layer-scale: 1.035;
  position: absolute;
  inset: -2.5%;
  z-index: 0;
  background-image: url("assets/garden-backdrop.png");
  background-position: center center;
  background-size: cover;
  filter: saturate(0.94) contrast(1.02);
}

.sky,
.distant-trees,
.moon-glow,
.torii,
.bamboo,
.pond,
.stone-path,
.foreground-left,
.foreground-right {
  display: none;
}

.sky {
  --depth-x: -8px;
  --depth-y: -5px;
  position: absolute;
  inset: -5% -5% 34%;
  z-index: 0;
  background:
    radial-gradient(circle at 46% 10%, rgba(247, 207, 189, 0.48), transparent 30%),
    linear-gradient(180deg, rgba(56, 76, 86, 0.72), rgba(27, 42, 41, 0.2) 60%, transparent);
}

.distant-trees {
  --depth-x: -5px;
  --depth-y: -3px;
  position: absolute;
  inset: 12% -8% 34%;
  z-index: 2;
  opacity: 0.74;
  background:
    radial-gradient(ellipse at 15% 55%, rgba(8, 18, 18, 0.88) 0 19%, transparent 20%),
    radial-gradient(ellipse at 34% 42%, rgba(18, 31, 29, 0.82) 0 21%, transparent 22%),
    radial-gradient(ellipse at 70% 43%, rgba(15, 28, 30, 0.8) 0 25%, transparent 26%),
    radial-gradient(ellipse at 92% 52%, rgba(8, 18, 17, 0.86) 0 26%, transparent 27%);
  filter: blur(2px);
}

.moon-glow {
  --depth-x: -3px;
  --depth-y: -3px;
  position: absolute;
  left: 43%;
  top: 12%;
  z-index: 1;
  width: min(22vw, 310px);
  aspect-ratio: 1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 224, 182, 0.17), transparent 68%);
  opacity: 0.18;
}

.torii {
  --depth-x: -6px;
  --depth-y: -4px;
  position: absolute;
  left: 52%;
  top: 22%;
  z-index: 5;
  width: clamp(118px, 13vw, 190px);
  height: clamp(118px, 14vw, 210px);
  opacity: 0;
  filter: blur(3px);
  transition:
    opacity 2800ms ease,
    filter 2800ms ease,
    transform 900ms cubic-bezier(0.2, 0.7, 0.18, 1);
}

.garden.is-awake .torii {
  opacity: 0.55;
  filter: blur(1px);
}

.torii span {
  position: absolute;
  display: block;
  background: linear-gradient(180deg, #93634b, #563425);
  box-shadow: 0 0 28px rgba(245, 172, 96, 0.12);
}

.torii-top {
  left: 2%;
  top: 7%;
  width: 96%;
  height: 7%;
  border-radius: 999px 999px 35% 35%;
}

.torii-cross {
  left: 15%;
  top: 23%;
  width: 70%;
  height: 5%;
}

.torii-left,
.torii-right {
  top: 21%;
  width: 7%;
  height: 74%;
}

.torii-left {
  left: 25%;
}

.torii-right {
  right: 25%;
}

.bamboo {
  --depth-x: 18px;
  --depth-y: 10px;
  position: absolute;
  top: -7%;
  right: 4%;
  z-index: 18;
  width: min(24vw, 310px);
  height: 62vh;
  opacity: 0.8;
  filter: drop-shadow(0 20px 20px rgba(0, 0, 0, 0.34));
}

.bamboo span {
  position: absolute;
  bottom: 0;
  width: clamp(8px, 0.85vw, 14px);
  height: 100%;
  border-radius: 999px;
  background:
    repeating-linear-gradient(
      180deg,
      transparent 0 58px,
      rgba(244, 216, 119, 0.22) 59px 62px
    ),
    linear-gradient(90deg, #12251d, #46633c 42%, #1d3528);
}

.bamboo span:nth-child(1) {
  left: 13%;
  transform: rotate(2deg);
}

.bamboo span:nth-child(2) {
  left: 31%;
  transform: rotate(-1deg);
}

.bamboo span:nth-child(3) {
  left: 49%;
  transform: rotate(1deg);
}

.bamboo span:nth-child(4) {
  left: 67%;
  transform: rotate(-3deg);
}

.bamboo span:nth-child(5) {
  left: 82%;
  transform: rotate(2deg);
}

.bamboo::before,
.bamboo::after {
  position: absolute;
  right: 4%;
  top: 9%;
  width: 78%;
  height: 28%;
  content: "";
  background:
    radial-gradient(ellipse at 10% 40%, rgba(157, 176, 77, 0.9) 0 3%, transparent 4%),
    radial-gradient(ellipse at 26% 45%, rgba(132, 162, 71, 0.84) 0 4%, transparent 5%),
    radial-gradient(ellipse at 45% 36%, rgba(164, 188, 91, 0.9) 0 5%, transparent 6%),
    radial-gradient(ellipse at 68% 44%, rgba(136, 162, 70, 0.88) 0 4%, transparent 5%),
    radial-gradient(ellipse at 89% 28%, rgba(178, 195, 106, 0.82) 0 4%, transparent 5%);
  filter: blur(0.2px);
}

.bamboo::after {
  top: 26%;
  right: 8%;
  transform: rotate(7deg);
  opacity: 0.75;
}

.mist {
  position: absolute;
  z-index: 15;
  pointer-events: none;
  opacity: 0.88;
  filter: blur(18px);
  background:
    radial-gradient(ellipse at 18% 44%, var(--mist), transparent 44%),
    radial-gradient(ellipse at 48% 52%, rgba(220, 226, 221, 0.17), transparent 42%),
    radial-gradient(ellipse at 82% 45%, rgba(220, 226, 221, 0.2), transparent 46%);
  animation: mist-drift 24s ease-in-out infinite alternate;
}

.mist-a {
  --depth-x: -2px;
  --depth-y: -1px;
  inset: 34% -12% 36%;
}

.mist-b {
  --depth-x: 6px;
  --depth-y: 2px;
  inset: 47% -18% 27%;
  opacity: 0.52;
  animation-duration: 32s;
  animation-direction: alternate-reverse;
}

.copy {
  --depth-x: 4px;
  --depth-y: 2px;
  position: absolute;
  left: clamp(24px, 6vw, 82px);
  top: clamp(44px, 8vh, 86px);
  z-index: 26;
  max-width: min(900px, 63vw);
  text-shadow: 0 10px 32px rgba(0, 0, 0, 0.9);
}

.owner {
  margin: 0 0 clamp(150px, 24vh, 248px);
  color: rgba(236, 237, 228, 0.78);
  font-size: clamp(0.68rem, 0.62rem + 0.25vw, 0.92rem);
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: min(940px, 65vw);
  color: rgba(246, 239, 214, 0.92);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 1.5vw + 1.25rem, 3.3rem);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: 0.28em;
  white-space: nowrap;
}

.pond {
  --depth-x: 2px;
  --depth-y: 2px;
  position: absolute;
  left: -10%;
  right: -5%;
  bottom: -10%;
  z-index: 8;
  height: 58%;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background:
    radial-gradient(ellipse at 32% 53%, rgba(69, 96, 96, 0.55), transparent 36%),
    radial-gradient(ellipse at 58% 25%, rgba(233, 205, 161, 0.14), transparent 23%),
    linear-gradient(180deg, rgba(14, 31, 31, 0.26), rgba(4, 9, 12, 0.94) 70%),
    repeating-linear-gradient(
      -8deg,
      rgba(255, 255, 255, 0.055) 0 1px,
      transparent 1px 34px
    );
  clip-path: ellipse(68% 48% at 42% 54%);
}

.pond::before,
.pond::after {
  position: absolute;
  content: "";
}

.pond::before {
  inset: 5% 2% auto 7%;
  height: 34%;
  background:
    radial-gradient(ellipse at 35% 42%, rgba(246, 225, 188, 0.1), transparent 24%),
    repeating-linear-gradient(
      175deg,
      transparent 0 23px,
      rgba(237, 243, 232, 0.08) 24px 25px
    );
  filter: blur(0.8px);
  opacity: 0.9;
  animation: water-shift 8s ease-in-out infinite alternate;
}

.pond::after {
  left: 12%;
  right: 34%;
  bottom: 8%;
  height: 36%;
  background: radial-gradient(ellipse, rgba(2, 7, 7, 0.58), transparent 65%);
}

.moon-reflection {
  position: absolute;
  left: 23%;
  bottom: 20%;
  z-index: 1;
  width: clamp(70px, 9vw, 136px);
  aspect-ratio: 1;
  border-radius: 999px;
  background:
    radial-gradient(circle at 28% 26%, rgba(255, 255, 255, 0.58) 0 6%, transparent 7%),
    radial-gradient(circle at 58% 46%, rgba(43, 47, 49, 0.27) 0 11%, transparent 12%),
    radial-gradient(circle, rgba(246, 238, 218, 0.9), rgba(240, 230, 203, 0.26) 55%, transparent 68%);
  box-shadow:
    0 0 40px rgba(238, 226, 196, 0.26),
    0 12px 35px rgba(255, 244, 215, 0.15);
  opacity: 0.84;
  transform: scaleY(0.88);
  animation: moon-water 5.6s ease-in-out infinite alternate;
}

.water-sheen {
  position: absolute;
  inset: 3% 10% 24% 26%;
  background:
    linear-gradient(100deg, transparent 0 22%, rgba(255, 244, 204, 0.18) 25%, transparent 28% 100%),
    linear-gradient(93deg, transparent 0 56%, rgba(255, 244, 204, 0.1) 58%, transparent 61% 100%);
  opacity: 0.7;
  animation: water-shift 7s ease-in-out infinite alternate;
}

.reflection-gate {
  position: absolute;
  left: 50%;
  bottom: 27%;
  width: min(18vw, 220px);
  height: 20%;
  border: 2px solid rgba(223, 172, 124, 0.14);
  border-top-width: 8px;
  border-bottom: 0;
  filter: blur(2px);
  opacity: 0.45;
  transform: skewX(-8deg) scaleY(-1);
}

.stone-path {
  --depth-x: 8px;
  --depth-y: 5px;
  position: absolute;
  inset: 0;
  z-index: 17;
  pointer-events: none;
}

.moon-portal {
  --depth-x: -7px;
  --depth-y: -4px;
  position: absolute;
  left: calc(50vw - 48.2vh);
  left: calc(50vw - 48.2svh);
  top: 81.4vh;
  top: 81.4svh;
  z-index: 32;
  width: clamp(82px, 14.5vh, 152px);
  width: clamp(82px, 14.5svh, 152px);
  aspect-ratio: 1;
  border-radius: 50%;
  color: rgba(255, 245, 214, 0.92);
  text-decoration: none;
  outline: none;
  transform: translate(-50%, -50%);
}

@media (min-aspect-ratio: 1672/941) {
  .moon-portal {
    left: 22.9vw;
    top: calc(50vh + 17.7vw);
    top: calc(50svh + 17.7vw);
    width: clamp(82px, 8.16vw, 152px);
  }
}

.moon-portal span,
.moon-portal::before,
.moon-portal::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  content: "";
}

.moon-portal span {
  background:
    radial-gradient(circle at 29% 28%, rgba(255, 255, 255, 0.48) 0 4%, transparent 5%),
    radial-gradient(circle at 62% 47%, rgba(44, 47, 50, 0.24) 0 11%, transparent 12%),
    radial-gradient(circle at 42% 69%, rgba(74, 78, 78, 0.2) 0 8%, transparent 9%),
    radial-gradient(circle, rgba(255, 248, 224, 0.2), rgba(246, 238, 213, 0.08) 56%, transparent 70%);
  filter: blur(0.2px);
  opacity: 0;
  transform: scale(0.96);
  transition:
    opacity 420ms ease,
    transform 420ms ease;
}

.moon-portal::before {
  inset: -28%;
  background: radial-gradient(circle, rgba(255, 244, 210, 0.38), transparent 64%);
  opacity: 0;
  transform: scale(0.86);
  transition:
    opacity 420ms ease,
    transform 420ms ease;
}

.moon-portal::after {
  inset: -18%;
  border: 1px solid rgba(255, 239, 190, 0);
  box-shadow: 0 0 0 rgba(255, 232, 165, 0);
  transition:
    border-color 420ms ease,
    box-shadow 420ms ease,
    transform 420ms ease;
}

.stone {
  position: absolute;
  display: block;
  border-radius: 52% 48% 45% 55%;
  background:
    radial-gradient(ellipse at 40% 20%, rgba(255, 255, 255, 0.25), transparent 30%),
    linear-gradient(160deg, #6f695d, #282d29 70%);
  box-shadow:
    inset 0 -18px 28px rgba(0, 0, 0, 0.35),
    0 16px 22px rgba(0, 0, 0, 0.38);
}

.stone::after {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 7%;
  height: 4px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 16px rgba(246, 203, 118, 0.68);
  opacity: 0.2;
  content: "";
  transition: opacity 600ms ease;
}

.garden.is-awake .stone::after,
.garden:has(.lantern-cta:is(:hover, :focus-visible)) .stone::after {
  opacity: 0.9;
}

.stone-1 {
  left: 46%;
  bottom: 2%;
  width: clamp(190px, 19vw, 320px);
  height: clamp(72px, 7vw, 112px);
  transform: rotate(-2deg);
}

.stone-2 {
  left: 51%;
  bottom: 15%;
  width: clamp(150px, 15vw, 250px);
  height: clamp(58px, 6vw, 92px);
  transform: rotate(3deg);
}

.stone-3 {
  left: 53%;
  bottom: 27%;
  width: clamp(118px, 12vw, 200px);
  height: clamp(45px, 5vw, 76px);
  transform: rotate(-5deg);
}

.stone-4 {
  left: 55%;
  bottom: 38%;
  width: clamp(92px, 9vw, 160px);
  height: clamp(35px, 4vw, 62px);
  transform: rotate(2deg);
}

.stone-5 {
  left: 57%;
  bottom: 48%;
  width: clamp(68px, 7vw, 124px);
  height: clamp(28px, 3.4vw, 48px);
  transform: rotate(-2deg);
}

.lantern-cta {
  --depth-x: -7px;
  --depth-y: -4px;
  position: absolute;
  left: calc(50vw + 40.8vh);
  left: calc(50vw + 40.8svh);
  top: 32.6vh;
  top: 32.6svh;
  right: auto;
  z-index: 24;
  display: grid;
  justify-items: center;
  width: 16.6vh;
  width: 16.6svh;
  min-height: 19.6vh;
  min-height: 19.6svh;
  color: #2b241a;
  text-decoration: none;
  outline: none;
  filter: drop-shadow(0 0 24px rgba(246, 203, 118, 0.12));
}

@media (min-width: 761px) and (min-aspect-ratio: 1672/941) {
  .lantern-cta {
    left: 72.96vw;
    top: calc((100vh - 56.28vw) / 2 + 18.35vw);
    top: calc((100svh - 56.28vw) / 2 + 18.35vw);
    width: 9.34vw;
    min-height: 11.03vw;
  }
}

.lantern-cta::before {
  position: absolute;
  inset: -12% -6%;
  z-index: -1;
  border-radius: 22px;
  background: radial-gradient(ellipse, rgba(250, 215, 136, 0.34), transparent 68%);
  opacity: 0;
  content: "";
  animation: lantern-breathe 3.8s ease-in-out infinite;
}

.lantern-cta:focus-visible {
  outline: 2px solid rgba(255, 240, 186, 0.9);
  outline-offset: 10px;
  border-radius: 18px;
}

.lantern-cta:is(:hover, :focus-visible) .lantern-body {
  background: transparent;
  box-shadow: none;
}

.lantern-cta:is(:hover, :focus-visible) .lantern-label,
.lantern-cta:is(:hover, :focus-visible) .lantern-arrow {
  opacity: 1;
  text-shadow: 0 0 18px rgba(255, 236, 176, 0.62);
}

.lantern-cap {
  display: none;
}

.lantern-roof {
  display: none;
}

.lantern-body {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  margin-top: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  transition:
    background 500ms ease,
    box-shadow 500ms ease,
    transform 500ms ease;
}

.lantern-body::before,
.lantern-body::after {
  display: none;
}

.lantern-body::before {
  left: 38%;
}

.lantern-body::after {
  right: 38%;
}

.lantern-label {
  position: relative;
  z-index: 2;
  display: block;
  max-width: 9ch;
  color: rgba(45, 34, 22, 0.92);
  font-size: clamp(0.62rem, 0.32rem + 0.42vw, 0.86rem);
  font-family:
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Yu Gothic UI",
    "Noto Sans JP", "Arial Narrow", system-ui, sans-serif;
  font-feature-settings: "palt" 1;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.34em;
  text-align: center;
  text-transform: uppercase;
  transform: scaleX(0.92);
  transform-origin: center;
}

.lantern-arrow {
  position: absolute;
  bottom: 26%;
  left: 50%;
  width: 28px;
  height: 1px;
  background: rgba(44, 35, 24, 0.74);
  transform: translateX(-50%);
}

.lantern-arrow::after {
  position: absolute;
  right: 0;
  top: -4px;
  width: 8px;
  height: 8px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  color: rgba(44, 35, 24, 0.74);
  transform: rotate(45deg);
  content: "";
}

.lantern-base {
  display: none;
}

.quiet-links {
  --depth-x: 4px;
  --depth-y: 2px;
  position: absolute;
  left: clamp(18px, 4.6vw, 62px);
  bottom: clamp(22px, 6vh, 74px);
  z-index: 26;
  display: grid;
  gap: 18px;
  color: var(--ink-faint);
  font-size: clamp(0.72rem, 0.64rem + 0.22vw, 0.9rem);
  letter-spacing: 0.16em;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.84);
}

.quiet-links p {
  margin: 0;
}

.future-line {
  color: rgba(246, 239, 214, 0.62);
  text-shadow:
    0 10px 28px rgba(0, 0, 0, 0.84),
    0 0 10px rgba(246, 203, 118, 0.1);
  transition:
    color 1200ms ease,
    opacity 1050ms ease,
    text-shadow 1200ms ease;
}

.future-line.is-alt {
  color: rgba(255, 244, 204, 0.72);
  text-shadow:
    0 10px 28px rgba(0, 0, 0, 0.84),
    0 0 14px rgba(246, 203, 118, 0.18);
}

.future-line.is-swapping {
  opacity: 0.58;
}

.quiet-links a {
  width: max-content;
  text-decoration: none;
  border-bottom: 1px solid rgba(236, 237, 228, 0.44);
  padding-bottom: 6px;
  transition:
    color 240ms ease,
    border-color 240ms ease;
}

.quiet-links a span::before {
  content: "↗";
  margin-left: 8px;
}

.quiet-links a:is(:hover, :focus-visible) {
  color: var(--ink);
  border-color: var(--gold);
  outline: none;
}

.quiet-links a:focus-visible {
  box-shadow: 0 8px 0 -5px rgba(246, 203, 118, 0.85);
}

.foreground-left,
.foreground-right {
  position: absolute;
  z-index: 30;
  pointer-events: none;
  filter: blur(0.4px) drop-shadow(0 12px 18px rgba(0, 0, 0, 0.55));
}

.foreground-left {
  --depth-x: 25px;
  --depth-y: 12px;
  left: -6%;
  top: 0;
  width: 34vw;
  height: 52vh;
  background:
    radial-gradient(ellipse at 14% 12%, rgba(88, 34, 25, 0.94) 0 4%, transparent 5%),
    radial-gradient(ellipse at 27% 22%, rgba(113, 47, 30, 0.8) 0 5%, transparent 6%),
    radial-gradient(ellipse at 42% 6%, rgba(92, 35, 26, 0.94) 0 5%, transparent 6%),
    radial-gradient(ellipse at 58% 20%, rgba(120, 55, 34, 0.74) 0 4%, transparent 5%),
    radial-gradient(ellipse at 20% 44%, rgba(97, 40, 28, 0.86) 0 5%, transparent 6%),
    linear-gradient(120deg, rgba(33, 12, 9, 0.74), transparent 64%);
}

.foreground-right {
  --depth-x: 30px;
  --depth-y: 16px;
  right: -8%;
  bottom: -6%;
  width: 32vw;
  height: 38vh;
  background:
    radial-gradient(ellipse at 24% 45%, rgba(107, 43, 30, 0.86) 0 5%, transparent 6%),
    radial-gradient(ellipse at 46% 32%, rgba(128, 55, 34, 0.74) 0 6%, transparent 7%),
    radial-gradient(ellipse at 66% 55%, rgba(77, 32, 24, 0.95) 0 6%, transparent 7%),
    radial-gradient(ellipse at 78% 18%, rgba(111, 47, 31, 0.8) 0 5%, transparent 6%),
    linear-gradient(310deg, rgba(34, 10, 8, 0.72), transparent 58%);
}

#garden-canvas {
  position: absolute;
  inset: 0;
  z-index: 22;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

@keyframes mist-drift {
  from {
    transform: translate3d(-4%, 2%, 0) scale(1);
  }
  to {
    transform: translate3d(4%, -2%, 0) scale(1.06);
  }
}

@keyframes water-shift {
  from {
    transform: translate3d(-2%, 0, 0) skewX(-1deg);
  }
  to {
    transform: translate3d(2%, 1%, 0) skewX(1deg);
  }
}

@keyframes moon-water {
  from {
    transform: scaleY(0.84) translateY(0);
    opacity: 0.72;
  }
  to {
    transform: scaleY(0.94) translateY(-4px);
    opacity: 0.94;
  }
}

@keyframes lantern-breathe {
  0%,
  100% {
    opacity: 0.54;
    transform: scale(0.95);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.04);
  }
}

@media (max-width: 760px) {
  html,
  body {
    overflow: hidden;
  }

  .garden {
    min-height: 100svh;
  }

  .backdrop {
    inset: -2%;
    background-position: 64% center;
  }

  .copy {
    left: 22px;
    top: 32px;
    max-width: 82vw;
  }

  .owner {
    margin-bottom: 16vh;
    letter-spacing: 0.32em;
  }

  h1 {
    max-width: 11ch;
    font-size: clamp(2rem, 8.5vw, 3.3rem);
    letter-spacing: 0.18em;
    white-space: normal;
  }

  .lantern-cta {
    --depth-x: 0px;
    --depth-y: 0px;
    left: 50%;
    right: auto;
    top: auto;
    bottom: 13vh;
    width: min(210px, 58vw);
    min-height: 58px;
    margin-left: -105px;
    color: rgba(255, 238, 181, 0.94);
    filter: drop-shadow(0 0 18px rgba(246, 203, 118, 0.32));
  }

  .lantern-cta::before {
    inset: -28% -16%;
    border-radius: 999px;
    background: radial-gradient(ellipse, rgba(250, 215, 136, 0.2), transparent 65%);
    opacity: 0.7;
  }

  .lantern-body {
    border: 1px solid rgba(255, 225, 150, 0.34);
    border-color: rgba(255, 225, 150, 0.34);
    border-radius: 999px;
    background:
      radial-gradient(ellipse at 50% 35%, rgba(255, 236, 171, 0.14), rgba(246, 203, 118, 0.08) 68%, transparent),
      rgba(8, 13, 11, 0.14);
    box-shadow:
      inset 0 0 22px rgba(255, 228, 161, 0.12),
      0 0 34px rgba(246, 203, 118, 0.22);
    backdrop-filter: blur(2px);
  }

  .lantern-body::before,
  .lantern-body::after {
    display: none;
  }

  .lantern-label {
    max-width: none;
    color: rgba(255, 242, 197, 0.95);
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    transform: scaleX(0.96);
    white-space: nowrap;
  }

  .lantern-arrow {
    right: 18px;
    bottom: 49%;
    color: rgba(255, 242, 197, 0.84);
    background: currentColor;
  }

  .bamboo {
    right: -8%;
    width: 38vw;
    opacity: 0.54;
  }

  .stone-1 {
    left: 33%;
    bottom: 0;
  }

  .stone-2 {
    left: 40%;
  }

  .stone-3 {
    left: 45%;
  }

  .pond {
    left: -36%;
    right: -32%;
    height: 56%;
    clip-path: ellipse(62% 47% at 45% 56%);
  }

  .moon-reflection {
    left: 28%;
    bottom: 19%;
  }

  .torii {
    left: 42%;
    top: 24%;
  }

  .quiet-links {
    left: 16px;
    bottom: 24px;
    gap: 13px;
    max-width: 52vw;
  }

  .foreground-left {
    width: 48vw;
  }

  .foreground-right {
    width: 48vw;
  }
}

@media (max-width: 760px) and (orientation: portrait) {
  html,
  body {
    height: 100%;
    min-height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  html::-webkit-scrollbar,
  body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  body {
    min-width: max(100vw, 177.7svh);
    touch-action: pan-x;
  }

  .garden {
    width: max(100vw, 177.7svh);
    min-width: max(100vw, 177.7svh);
    height: 100svh;
    min-height: 100svh;
  }

  .garden::before,
  .garden::after {
    position: fixed;
  }

  .layer {
    transform: none;
    transition: none;
    will-change: auto;
  }

  .backdrop {
    inset: 0;
    background-position: center center;
    background-size: 100% 100%;
  }

  .copy {
    position: fixed;
    left: calc(env(safe-area-inset-left) + 20px);
    top: calc(env(safe-area-inset-top) + 28px);
    max-width: min(330px, 76vw);
  }

  .owner {
    margin-bottom: clamp(86px, 16svh, 142px);
    font-size: 0.66rem;
    letter-spacing: 0.28em;
  }

  h1 {
    max-width: 11ch;
    font-size: clamp(2rem, 8.5vw, 3.35rem);
    letter-spacing: 0.17em;
    white-space: normal;
  }

  .lantern-cta {
    position: fixed;
    left: 50%;
    right: auto;
    top: auto;
    bottom: calc(env(safe-area-inset-bottom) + 18px);
    width: min(220px, 58vw);
    min-height: 58px;
    margin-left: 0;
    transform: translateX(-50%);
  }

  .lantern-arrow {
    left: auto;
    right: 18px;
    bottom: 50%;
    transform: translateY(50%);
  }

  .moon-portal {
    position: absolute;
    left: 25%;
    right: auto;
    top: 78.9%;
    width: clamp(104px, 14.5svh, 152px);
    transform: translate(-50%, -50%);
  }

  .quiet-links {
    position: fixed;
    left: calc(env(safe-area-inset-left) + 18px);
    bottom: calc(env(safe-area-inset-bottom) + 92px);
    gap: 10px;
    max-width: 44vw;
    font-size: 0.68rem;
    letter-spacing: 0.13em;
  }

  .future-line {
    max-width: 18ch;
  }

  #garden-canvas {
    position: fixed;
    width: 100vw;
    height: 100svh;
    pointer-events: none;
  }
}

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

  .layer {
    transform: none !important;
  }
}
