:root {
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
  background: #e6b993;
  color: #2f3b32;
  font-family: "DM Mono", monospace;
}
#garden {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}
body.intro-active header,
body.intro-active .instruction,
body.intro-active .counter,
body.intro-active .mission {
  opacity: 0;
  pointer-events: none;
}
.scene-fade {
  position: fixed;
  z-index: 10;
  inset: 0;
  background: #171a22;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.1s ease;
}
.intro-start {
  position: fixed;
  z-index: 8;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 24px max(8vh, 48px);
  color: #fff4e4;
  text-align: center;
  background: linear-gradient(
    transparent 36%,
    rgba(26, 23, 31, 0.42) 75%,
    rgba(26, 23, 31, 0.78)
  );
  transition: opacity 0.7s ease;
}
.intro-start.hidden {
  opacity: 0;
  pointer-events: none;
}
.intro-start p {
  margin: 0 0 13px;
  color: #e9c89b;
  font-size: 10px;
  letter-spacing: 0.21em;
  text-transform: uppercase;
}
.intro-start h2 {
  margin: 0 0 26px;
  font: 500 clamp(28px, 4vw, 48px) / 1.1 "Playfair Display", serif;
}
.intro-start button,
.intro-skip {
  border: 1px solid rgba(255, 239, 215, 0.7);
  border-radius: 4px;
  color: #fff4e4;
  background: rgba(47, 38, 43, 0.58);
  font: 10px "DM Mono", monospace;
  letter-spacing: 0.12em;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.intro-start button {
  padding: 14px 21px;
}
.intro-skip {
  position: fixed;
  z-index: 8;
  top: 28px;
  right: 30px;
  padding: 10px 14px;
}
.intro-skip[hidden] {
  display: none;
}
.intro-caption {
  position: fixed;
  z-index: 6;
  bottom: 8vh;
  left: 50%;
  width: min(90vw, 560px);
  margin: 0;
  transform: translateX(-50%);
  color: #fff4e7;
  font: 500 clamp(16px, 2.2vw, 23px) / 1.4 "Playfair Display", serif;
  text-align: center;
  text-shadow: 0 2px 16px #1d1922;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.intro-thought {
  position: fixed;
  z-index: 6;
  top: 8%;
  left: 42%;
  width: clamp(145px, 19vw, 220px);
  aspect-ratio: 1;
  padding: 12px;
  border: 5px solid rgba(255, 255, 255, 0.74);
  border-radius: 50%;
  background: #f7ecdd;
  box-shadow:
    0 16px 50px rgba(16, 14, 25, 0.27),
    inset 0 0 22px rgba(164, 127, 109, 0.28);
  opacity: 0;
  pointer-events: none;
}
.intro-thought::before,
.intro-thought::after {
  position: absolute;
  content: "";
  border-radius: 50%;
  background: #f7ecdd;
  box-shadow: 0 5px 13px rgba(16, 14, 25, 0.2);
}
.intro-thought::before {
  width: 25px;
  height: 25px;
  bottom: -25px;
  left: 42px;
}
.intro-thought::after {
  width: 12px;
  height: 12px;
  bottom: -44px;
  left: 22px;
}
.intro-thought svg {
  width: 100%;
  height: 100%;
}
body.card-open,
body.card-open * {
  cursor: none !important;
}
header {
  position: fixed;
  left: clamp(24px, 5vw, 72px);
  top: clamp(28px, 6vh, 66px);
  pointer-events: none;
  text-shadow: 0 2px 18px rgba(255, 255, 236, 0.8);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.18em;
  margin: 0 0 12px;
  color: #624f3a;
}
h1 {
  font:
    500 clamp(32px, 4.4vw, 63px) / 0.93 "Playfair Display",
    serif;
  margin: 0;
  letter-spacing: -0.045em;
}
h1 em {
  color: #9d5e51;
}
.instruction {
  position: fixed;
  bottom: clamp(26px, 5vh, 55px);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  font:
    11px/1.8 "DM Mono",
    monospace;
  letter-spacing: 0.08em;
  transition: opacity 0.6s;
  white-space: nowrap;
  padding: 10px 18px;
  border-radius: 8px;
  background: rgba(255, 244, 215, 0.78);
  box-shadow: 0 4px 24px rgba(32, 74, 51, 0.12);
}
.instruction span {
  font-size: 8px;
  color: #65513e;
  letter-spacing: 0.04em;
}
.counter {
  position: fixed;
  right: clamp(22px, 4vw, 60px);
  top: clamp(31px, 6vh, 66px);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: #554331;
  background: rgba(255, 244, 215, 0.78);
  padding: 9px 12px;
  border-radius: 6px;
}
.mission {
  position: fixed;
  z-index: 2;
  top: clamp(86px, 13vh, 126px);
  right: clamp(22px, 4vw, 60px);
  width: min(320px, calc(100vw - 44px));
  padding: 17px 19px 15px;
  border: 1px solid rgba(132, 93, 51, 0.28);
  border-radius: 10px;
  color: #443a34;
  background: rgba(255, 247, 225, 0.88);
  box-shadow: 0 12px 38px rgba(72, 59, 39, 0.16);
  backdrop-filter: blur(9px);
  pointer-events: none;
  transition: opacity 0.6s ease, border-color 0.6s ease;
}
.mission.complete {
  border-color: rgba(181, 126, 58, 0.72);
  box-shadow: 0 12px 44px rgba(165, 103, 42, 0.24);
}
body.finale-active .mission {
  opacity: 0;
}
.mission-kicker {
  margin: 0 0 10px;
  color: #996a43;
  font-size: 9px;
  letter-spacing: 0.18em;
}
.mission-text {
  margin: 0;
  font: 500 16px/1.36 "Playfair Display", serif;
}
.mission-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  padding-top: 11px;
  border-top: 1px solid rgba(126, 97, 65, 0.2);
  color: #725b4a;
  font-size: 9px;
  letter-spacing: 0.07em;
}
.mission-dots {
  display: flex;
  gap: 6px;
}
.mission-dots span {
  width: 9px;
  height: 9px;
  border: 1px solid #b59c78;
  border-radius: 50%;
  background: transparent;
  transition: background 0.3s ease;
}
.mission-dots span.done {
  background: #d6965a;
}
.reunion-caption {
  position: fixed;
  z-index: 5;
  bottom: clamp(40px, 9vh, 90px);
  left: 50%;
  width: min(90vw, 620px);
  margin: 0;
  transform: translateX(-50%);
  color: #fff8e9;
  font: 500 clamp(21px, 3vw, 34px) / 1.25 "Playfair Display", serif;
  text-align: center;
  text-shadow: 0 3px 18px rgba(43, 30, 24, 0.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}
.reunion-caption.visible {
  opacity: 1;
}
body.finale-active {
  cursor: none;
}
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at center,
    transparent 45%,
    rgba(80, 47, 37, 0.17) 100%
  );
}
.memory {
  position: fixed;
  z-index: 4;
  color: #fff9ed;
  left: 50%;
  top: 50%;
  width: min(400px, calc(100vw - 44px));
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  transform: translate(-50%, -50%);
  background: rgba(27, 29, 44, 0.93);
  border: 1px solid rgba(255, 238, 204, 0.23);
  padding: 18px 25px 27px;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  text-align: center;
  transition:
    opacity 0.3s,
    transform 0.3s;
}
.memory.hidden,
.ending.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -44%);
}
.memory-photo {
  position: relative;
  height: 160px;
  overflow: hidden;
  background: linear-gradient(140deg, #b9777b, #e6c68e 45%, #647a80);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  color: #fff9ed;
  font: 50px "Playfair Display";
}
.memory-photo.has-image {
  height: min(48vh, 370px);
  background: #3c3a36 !important;
}
.memory-photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.memory [hidden] {
  display: none !important;
}
.memory-kicker,
.ending > p {
  font-size: 9px;
  letter-spacing: 0.2em;
  color: #e9c89b;
}
.memory h2,
.ending h2 {
  font:
    500 30px/1.1 "Playfair Display",
    serif;
  margin: 8px 0 14px;
}
.memory-text {
  font:
    14px/1.7 "Playfair Display",
    serif;
  margin: 0 auto;
  max-width: 31ch;
}
.memory-note {
  margin: 22px 0 0;
  font-size: 8px;
  letter-spacing: 0.04em;
  color: #b6ac9c;
}
.memory-exit {
  margin: 17px 0 0;
  color: #e9c89b;
  font-size: 10px;
  letter-spacing: 0.07em;
}
.memory-exit kbd {
  padding: 3px 6px;
  border: 1px solid rgba(233, 200, 155, 0.55);
  border-radius: 4px;
  font: inherit;
}
.close {
  position: absolute;
  right: 11px;
  top: 8px;
  color: #fff9ed;
  background: none;
  border: 0;
  font-size: 25px;
  cursor: pointer;
}
.ending {
  position: fixed;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: min(530px, calc(100vw - 44px));
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff9ed;
  background: rgba(36, 55, 46, 0.9);
  border-radius: 12px;
  padding: 32px 24px;
  box-shadow: 0 25px 80px rgba(24, 57, 44, 0.25);
  transition:
    opacity 0.4s,
    transform 0.4s;
}
.ending h2 {
  font-size: clamp(36px, 5vw, 58px);
}
.ending button {
  padding: 11px 16px;
  border: 1px solid #e9c89b;
  color: #fff9ed;
  background: transparent;
  font: 10px "DM Mono";
  letter-spacing: 0.1em;
  cursor: pointer;
}
@media (max-width: 560px) {
  .intro-thought {
    top: 13%;
    left: 48%;
  }
  .intro-caption {
    bottom: 10vh;
  }
  header {
    top: 28px;
  }
  h1 {
    font-size: 38px;
  }
  .counter {
    top: 32px;
  }
  .mission {
    top: 120px;
    right: 18px;
    width: min(290px, calc(100vw - 36px));
    padding: 13px 15px;
  }
  .mission-text {
    font-size: 14px;
  }
  .instruction {
    white-space: normal;
    width: 100%;
    padding: 0 20px;
  }
}
