@import url("https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Noto+Serif+SC:wght@400;500&display=swap");
:root {
  font-family: "Noto Serif SC", Georgia, serif;
  color: #f9f3f4;
  background: #302b44;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button {
  font: inherit;
  cursor: pointer;
}
button:focus-visible {
  outline: 2px solid #fff3d8;
  outline-offset: 5px;
}
[hidden] {
  display: none !important;
}
.opening,
.universe {
  min-height: 100svh;
  position: relative;
  overflow: hidden;
}
.opening {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    ellipse at 50% 45%,
    #81708f 0%,
    #514963 45%,
    #28283e 100%
  );
  transition: opacity 0.65s;
}
.opening:before,
.universe:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 85%, #d9a9bd44, transparent 35%),
    radial-gradient(ellipse at 80% 15%, #a6b7cc44, transparent 38%);
  pointer-events: none;
}
.opening-glow {
  position: absolute;
  width: 55vw;
  height: 55vw;
  border-radius: 50%;
  background: #e9bbca22;
  filter: blur(80px);
}
.eyebrow {
  letter-spacing: 0.32em;
  font:
    11px Arial,
    sans-serif;
  color: #f8e8e8b8;
}
.opening > .eyebrow {
  margin-bottom: 55px;
}
.envelope {
  position: relative;
  width: min(330px, 74vw);
  height: 220px;
  border: 0;
  background: transparent;
  filter: drop-shadow(0 28px 35px #1b1c2b77);
  perspective: 900px;
}
.envelope-back,
.envelope-front,
.envelope-flap {
  position: absolute;
  inset: 0;
}
.envelope-back {
  background: #dfc6c2;
  border-radius: 4px;
}
.envelope-front {
  z-index: 3;
  background: linear-gradient(145deg, #f4ddd5, #d2afb5);
  clip-path: polygon(0 0, 50% 57%, 100% 0, 100% 100%, 0 100%);
  border-radius: 4px;
}
.envelope-flap {
  z-index: 4;
  background: #edcfca;
  clip-path: polygon(0 0, 100% 0, 50% 57%);
  transform-origin: top;
  transition:
    transform 0.85s ease,
    z-index 0.1s 0.45s;
}
.letter {
  position: absolute;
  z-index: 2;
  left: 8%;
  top: 8%;
  width: 84%;
  height: 85%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: #fbf1e9;
  color: #645366;
  box-shadow: 0 0 15px #6d536044;
  transition: transform 0.9s 0.4s ease;
}
.letter-heading {
  font-size: 18px;
}
.letter-placeholder {
  font-size: 12px;
  color: #aa939a;
}
.envelope.opened .envelope-flap {
  transform: rotateX(180deg);
  z-index: 1;
}
.envelope.opened .letter {
  transform: translateY(-115px);
}
.text-button {
  z-index: 5;
  border: 0;
  background: transparent;
  color: #fff6f3;
  margin-top: 75px;
  padding: 12px 20px;
  letter-spacing: 0.12em;
  border-bottom: 1px solid #fff8;
}
.opening-hint {
  position: absolute;
  bottom: 8%;
  font-size: 12px;
  color: #f8e8e8a8;
}
.fade-out {
  opacity: 0;
}
.universe {
  opacity: 0;
  transition: opacity 0.8s;
  background: #69617d;
}
.universe.visible {
  opacity: 1;
}
.sky {
  position: absolute;
  inset: 0;
  background-color: var(--scene-tone, #746c87);
  background-size: cover;
  background-position: center;
  transition: background-color 0.8s;
}
.sky:not(.has-image) {
  background-image:
    radial-gradient(ellipse at 20% 20%, #c8adca 0%, transparent 40%),
    radial-gradient(ellipse at 75% 76%, #8fa2b7 0%, transparent 45%),
    linear-gradient(150deg, #55516f, #a188a2 62%, #d4abba) !important;
}
.sky:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #29283c55, transparent 32%, #29283c66);
  pointer-events: none;
}
.cloud {
  position: absolute;
  width: 70vw;
  height: 24vw;
  min-height: 160px;
  border-radius: 50%;
  background: #e8d9eb3d;
  filter: blur(55px);
  animation: drift 30s ease-in-out infinite alternate;
}
.cloud-a {
  left: -20%;
  top: 15%;
}
.cloud-b {
  right: -25%;
  top: 53%;
  animation-duration: 38s;
}
.cloud-c {
  left: 20%;
  bottom: -13%;
  animation-duration: 45s;
}
.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: start;
  padding: 34px 5vw;
}
.brand {
  font:
    italic 25px "DM Serif Display",
    Georgia,
    serif;
  letter-spacing: 0.04em;
}
.brand span {
  display: block;
  font:
    10px Arial,
    sans-serif;
  letter-spacing: 0.25em;
  opacity: 0.7;
  margin-top: 6px;
}
.header-button,
.scene-nav button {
  border: 1px solid #ffffff70;
  background: #ffffff14;
  color: #fff;
  border-radius: 100px;
  padding: 10px 17px;
  backdrop-filter: blur(10px);
}
.overview,
.scene {
  position: relative;
  z-index: 2;
  min-height: calc(100svh - 95px);
}
.overview {
  transition:
    opacity 0.42s,
    transform 0.6s;
}
.overview.leaving {
  opacity: 0;
  transform: scale(1.08);
}
.intro {
  position: absolute;
  left: 8%;
  top: 12%;
  z-index: 3;
  pointer-events: none;
}
.intro h1 {
  font-size: clamp(35px, 4.7vw, 72px);
  font-weight: 400;
  line-height: 1.45;
  margin: 18px 0;
}
.intro em {
  font-weight: 400;
  color: #ffdfdc;
}
.intro > p:last-child {
  font-size: 13px;
  line-height: 2.2;
  opacity: 0.8;
}
.islands {
  position: absolute;
  inset: 0;
}
.island {
  position: absolute;
  width: clamp(155px, 20vw, 290px);
  height: clamp(115px, 15vw, 210px);
  border: 0;
  background: transparent;
  color: white;
  filter: drop-shadow(0 28px 25px #24223577);
  animation: float 7s ease-in-out infinite;
  transition:
    filter 0.5s,
    transform 0.7s;
}
.island:hover {
  filter: drop-shadow(0 0 25px #f9e5f3aa) drop-shadow(0 28px 25px #24223577);
  transform: translateY(-9px) scale(1.06);
}
.island.zooming {
  transform: scale(2.8);
  opacity: 0;
  transition:
    transform 0.75s,
    opacity 0.75s;
}
.island-surface {
  position: absolute;
  inset: 0 0 20%;
  border-radius: 55% 48% 42% 45%;
  background:
    linear-gradient(155deg, #fff9 0%, transparent 42%), var(--island-image),
    var(--island-tone);
  background-size: cover;
  background-position: var(--island-position);
  box-shadow:
    inset 0 7px 25px #fff7,
    0 0 28px #f2d1ec44;
}
.island-base {
  position: absolute;
  left: 12%;
  right: 8%;
  top: 48%;
  height: 52%;
  background: linear-gradient(#b9abc0, #696179aa 75%, transparent);
  clip-path: polygon(0 0, 100% 0, 69% 84%, 49% 100%, 20% 73%);
  border-radius: 0 0 45% 45%;
}
.island-label {
  position: absolute;
  top: -22%;
  left: 4%;
  white-space: nowrap;
  text-align: left;
  font-size: 16px;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.4s;
  text-shadow: 0 2px 12px #30263d;
}
.island-label small {
  display: block;
  font:
    10px Arial,
    sans-serif;
  letter-spacing: 0.13em;
  margin-top: 7px;
}
.island:hover .island-label,
.island:focus-visible .island-label {
  opacity: 1;
  transform: none;
}
.island-1 {
  left: 44%;
  top: 18%;
}
.island-2 {
  left: 73%;
  top: 38%;
  width: clamp(135px, 16vw, 240px);
  animation-delay: -2s;
}
.island-3 {
  left: 25%;
  top: 60%;
  width: clamp(130px, 17vw, 250px);
  animation-delay: -4s;
}
.island-4 {
  left: 62%;
  top: 70%;
  width: clamp(115px, 14vw, 215px);
  animation-delay: -1s;
}
.overview-note {
  position: absolute;
  left: 8%;
  bottom: 4%;
  font-size: 11px;
  letter-spacing: 0.12em;
  opacity: 0.7;
}
.scene {
  animation: appear 0.85s both;
}
.scene-copy {
  position: absolute;
  left: 8%;
  top: 10%;
  z-index: 2;
}
.scene-copy h2 {
  font-size: clamp(38px, 5vw, 72px);
  font-weight: 400;
  margin: 16px 0;
}
.scene-copy > p:last-child {
  font-size: 13px;
  opacity: 0.8;
}
.objects {
  position: absolute;
  inset: 0;
}
.object {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  filter: drop-shadow(0 15px 15px #28243a77);
  transition:
    transform 0.4s,
    filter 0.4s;
}
.object:hover {
  transform: translate(-50%, -58%) scale(1.08);
  filter: drop-shadow(0 0 22px #ffe9e0) drop-shadow(0 15px 15px #28243a77);
}
.object-art {
  position: relative;
  display: block;
  width: 100px;
  height: 100px;
}
.object-label {
  padding: 6px 12px;
  background: #372f4b66;
  border: 1px solid #fff5;
  border-radius: 30px;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s;
}
.object:hover .object-label,
.object:focus-visible .object-label {
  opacity: 1;
}
.object-house .object-art:before {
  content: "";
  position: absolute;
  left: 17px;
  bottom: 3px;
  width: 68px;
  height: 58px;
  background: #e6d0c8;
  border-radius: 3px 3px 8px 8px;
  box-shadow: inset -12px -8px #a5819a55;
}
.object-house .object-art:after {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  border-left: 41px solid transparent;
  border-right: 41px solid transparent;
  border-bottom: 38px solid #80718b;
}
.object-tree .object-art:before {
  content: "";
  position: absolute;
  left: 46px;
  bottom: 0;
  width: 11px;
  height: 48px;
  background: #725f6e;
}
.object-tree .object-art:after {
  content: "";
  position: absolute;
  left: 13px;
  top: 4px;
  width: 76px;
  height: 72px;
  border-radius: 52% 48% 45% 55%;
  background: radial-gradient(circle at 35% 30%, #d9d8c2, #819f9b 65%, #647e84);
}
.object-star .object-art:before {
  content: "✦";
  position: absolute;
  inset: 0;
  color: #fff1d7;
  font-size: 85px;
  text-shadow: 0 0 25px #fff4cc;
}
.object-cloud .object-art:before {
  content: "";
  position: absolute;
  left: 4px;
  top: 35px;
  width: 92px;
  height: 50px;
  border-radius: 50%;
  background: #f4e9edcc;
  box-shadow:
    18px -15px 0 -7px #f4e9edcc,
    -15px 10px 0 -10px #f4e9edcc;
}
.object-lake .object-art {
  width: 160px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(ellipse, #e6e6e4bb, #9eb6c4bb 60%, #697f9e99);
  box-shadow: 0 0 30px #c6dbec88;
}
.scene-nav {
  position: absolute;
  right: 7%;
  bottom: 8%;
  display: flex;
  align-items: center;
  gap: 18px;
  font:
    12px Arial,
    sans-serif;
}
.surprise-trigger {
  position: absolute;
  z-index: 10;
  left: 3%;
  bottom: 3%;
  border: 0;
  background: none;
  color: #fff9;
  font-size: 26px;
  transition: transform 0.3s;
}
.surprise-trigger:hover {
  transform: rotate(30deg) scale(1.3);
}
.content-dialog {
  width: min(470px, calc(100vw - 36px));
  border: 1px solid #fff9;
  border-radius: 6px;
  padding: 45px;
  background: linear-gradient(145deg, #faf0ea, #e9dce7);
  color: #554b60;
  box-shadow: 0 30px 80px #201e36aa;
}
.content-dialog::backdrop {
  background: #1e1b32aa;
  backdrop-filter: blur(8px);
}
.content-dialog .eyebrow {
  color: #9d8196;
}
.content-dialog h2 {
  font-weight: 400;
  font-size: 28px;
  margin: 20px 0;
}
.content-dialog p:not(.eyebrow) {
  font-size: 14px;
  line-height: 2;
  min-height: 80px;
}
.dialog-close {
  position: absolute;
  top: 12px;
  right: 16px;
  border: 0;
  background: none;
  color: #66566f;
  font-size: 28px;
}
.dialog-media img {
  max-width: 100%;
}
.dialog-media audio {
  width: 100%;
  margin-top: 14px;
}
@keyframes drift {
  to {
    transform: translateX(12vw) translateY(-3vw);
  }
}
@keyframes float {
  50% {
    translate: 0 -12px;
  }
}
@keyframes appear {
  from {
    opacity: 0;
    transform: scale(1.05);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@media (max-width: 700px) {
  .site-header {
    padding: 24px;
  }
  .brand {
    font-size: 21px;
  }
  .intro {
    top: 5%;
    left: 7%;
  }
  .intro h1 {
    font-size: 36px;
  }
  .intro > p:last-child {
    font-size: 11px;
  }
  .island-1 {
    left: 48%;
    top: 32%;
  }
  .island-2 {
    left: 63%;
    top: 55%;
  }
  .island-3 {
    left: 7%;
    top: 61%;
  }
  .island-4 {
    left: 45%;
    top: 78%;
  }
  .island {
    width: 145px;
    height: 105px;
  }
  .island-label {
    opacity: 1;
    top: -25%;
    font-size: 12px;
  }
  .island-label small {
    display: none;
  }
  .overview-note {
    display: none;
  }
  .scene-copy {
    top: 7%;
  }
  .scene-copy h2 {
    font-size: 38px;
  }
  .object-art {
    transform: scale(0.8);
  }
  .object-label {
    opacity: 1;
  }
  .scene-nav {
    bottom: 5%;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* The overview keeps its existing positions and motion while using painted island cutouts. */
.island .island-illustration {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 12px #30283d55);
}
.island .island-label {
  z-index: 2;
}
/* Restore the original gradient islands; keep their positions and float animation. */
.island-surface {
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 32% 20%,
    #ffffff99,
    var(--island-tone) 65%
  );
  box-shadow:
    inset 0 7px 25px #fff5,
    0 0 28px #f2d1ec33;
}
.island-base {
  background: linear-gradient(#b9abc099, #69617999 75%, transparent);
}
.object-marker {
  position: absolute;
  left: clamp(55px, var(--x), calc(100% - 55px));
  top: clamp(230px, var(--y), calc(100% - 90px));
  width: min(var(--width), 24vw);
  height: min(var(--width), 24vw);
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  color: #fff;
  z-index: 2;
}
.object-marker-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
  background: transparent;
  backdrop-filter: blur(5px);
  font-size: 11px;
  letter-spacing: 0.1em;
  box-shadow: 0 10px 35px #29253a44;
  animation: object-drift var(--duration) ease-in-out infinite alternate;
  transition:
    transform 0.35s,
    box-shadow 0.35s;
}
.object-marker-inner img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.object-marker:hover .object-marker-inner,
.object-marker:focus-visible .object-marker-inner,
.object-marker.selected .object-marker-inner {
  transform: scale(1.08);
  box-shadow:
    0 0 28px #fff9,
    0 12px 35px #29253a55;
}
@keyframes object-drift {
  to {
    translate: 0 calc(-1 * var(--distance));
  }
}
.content-dialog {
  animation: dialog-fade 0.4s ease both;
}
@keyframes dialog-fade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 700px) {
  .object-marker {
    left: clamp(44px, var(--x), calc(100% - 44px));
    top: clamp(230px, var(--y), calc(100% - 80px));
    width: min(var(--width), 20vw);
    height: min(var(--width), 20vw);
  }
  .object-marker-inner {
    font-size: 8px;
  }
  .scene-copy {
    max-width: 70%;
  }
}
/* Palette extension: retain the existing overview geometry and animations. */
:root { background: #536b68; color: #fffaf0; }
.opening { background: radial-gradient(ellipse at 50% 45%, #94a99b, #617e80 45%, #3b5357); }
.universe { background: #668283; }
.sky:not(.has-image) {
  background-image:
    radial-gradient(ellipse at 18% 18%, #a9c7bd 0%, transparent 46%),
    radial-gradient(ellipse at 78% 30%, #a5c8d7 0%, transparent 46%),
    radial-gradient(ellipse at 80% 88%, #e9b09a 0%, transparent 46%),
    linear-gradient(145deg, #52716d, #819d9e 52%, #c2ad91) !important;
}
.sky:after { background: linear-gradient(180deg, #253f4233, transparent 38%, #293f4833); }
.cloud { background: #f5efd83d; }
.intro em { color: #ffead0; }
.intro, .brand, .overview-note { text-shadow: 0 2px 14px #25413e99; }
.island-base { background: linear-gradient(#c4d0bb99, #597b7999 75%, transparent); }
.island.explored .island-surface { box-shadow: inset 0 7px 25px #fff8, 0 0 35px #ffebac99; }
.island.explored .island-label:after { content: "已探索"; display: block; font-size: 12px; margin-top: 6px; color: #fff2bc; }
.island.explored .island-label { opacity: 1; }
/* The entire image and its hotspots share exactly one proportional canvas. */
.exploring .sky { opacity: .28; }
.exploring .site-header { padding-top: 18px; padding-bottom: 18px; }
.exploring .brand { font-size: 18px; }
.scene { min-height: 0; padding: 0 3vw 80px; }
.scene-copy { position: relative; left: auto; top: auto; max-width: none; margin: 0 0 14px; }
.scene-copy .eyebrow { display: none; }
.scene-copy h2 { font-size: 26px; margin: 4px 0; }
.scene-copy > p:last-child { margin: 6px 0; font-size: 14px; }
.scene-tools { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.scene-tools p { font-size: 14px; margin: 0; }
.scene-viewport { overflow: auto; max-height: 73svh; overscroll-behavior: contain; border-radius: 8px; }
.scene-canvas { position: relative; width: min(100%, calc(70svh * 1920 / 1038)); aspect-ratio: 1920 / 1038; margin: auto; }
.scene-canvas > img { display: block; width: 100%; height: 100%; }
.scene-viewport.zoomed .scene-canvas { width: max(100%, 1100px); max-width: none; }
.hotspot {
  position: absolute; left: var(--x); top: var(--y); width: var(--width); height: var(--height);
  transform: translate(-50%, -50%); padding: 0; border: 0;
  background-color: transparent; background-repeat: no-repeat; border-radius: 35%;
  transition: filter .25s, scale .3s, rotate .3s; -webkit-tap-highlight-color: transparent;
}
.hotspot:hover, .hotspot:focus-visible { filter: brightness(1.13) drop-shadow(0 0 5px #fff2be99); }
.hotspot.forest:hover { rotate: -3deg; scale: 1.035; }
.hotspot.block.activated { rotate: 4deg; scale: 1.04; filter: brightness(1.15); }
.hotspot.door { border-radius: 0; transform-origin: left center; }
.hotspot.door.activated { animation: open-door .85s ease forwards; }
@keyframes open-door {
  30% { filter: brightness(1.25); }
  to { transform: translate(-50%, -50%) perspective(450px) rotateY(-72deg); filter: brightness(.85); }
}
.hotspot.steps { border-radius: 18%; }
.hotspot.steps:not(.locked) { box-shadow: 0 2px 5px #fff2bd66; }
.hotspot.locked { filter: saturate(.65) brightness(.93); cursor: help; }
.hotspot.visited { box-shadow: 0 0 9px #fff1b577; }
.scene-nav { position: relative; justify-content: flex-end; right: auto; bottom: auto; margin-top: 18px; }
.content-dialog { background: linear-gradient(145deg, #fff9e9ee, #dfebe5e8); color: #354b49; backdrop-filter: blur(14px); max-height: 80svh; overflow: auto; }
.content-dialog::backdrop { background: #1c353b33; backdrop-filter: none; }
.content-dialog .eyebrow { color: #637c70; }
.content-dialog p:not(.eyebrow) { font-size: 16px; white-space: pre-line; }
.task-form { display: grid; gap: 14px; }
.task-form label { font-size: 14px; line-height: 1.8; }
.task-form input { display: block; width: 100%; margin-top: 8px; border: 1px solid #69877c; border-radius: 6px; padding: 10px; font: inherit; background: #fff9; }
.task-form button { background: #4a7166; color: white; border: 0; border-radius: 20px; padding: 10px 16px; }
.task-form p { min-height: 0 !important; margin: 0; }
@media (max-width: 700px) {
  .scene { padding: 0 16px 65px; }
  .exploring .site-header { padding: 18px 16px; gap: 12px; }
  .exploring .brand { font-size: 16px; }
  .scene-copy h2 { font-size: 24px; }
  .scene-viewport { max-height: 65svh; }
  .content-dialog { padding: 32px 24px; }
  .island-2 { left: min(63%, calc(100% - 150px)); }
}
/* Second pass: a bright envelope; geometry and flap transitions are unchanged. */
.opening {
  color: #665443;
  background: radial-gradient(ellipse at 50% 40%, #fff8e8 0%, #f2e6b9 55%, #e8d69d 100%);
}
.opening:before {
  background: radial-gradient(ellipse at 20% 85%, #d9b8a933, transparent 40%),
    radial-gradient(ellipse at 80% 15%, #fffbee88, transparent 42%);
}
.opening-glow { background: #fff8e866; }
.opening .eyebrow, .opening-hint { color: #78634e; }
.opening .text-button { color: #665443; border-bottom-color: #94755388; }
.opening button:focus-visible { outline-color: #806342; }
.envelope { filter: drop-shadow(0 22px 30px #9e7e5138); }
.envelope-back { background: #e9d7bc; }
.envelope-front { background: linear-gradient(145deg, #fff8e8, #ead7c5); }
.envelope-flap { background: #f7e9d5; }
.letter { background: #fffdf4; color: #665443; box-shadow: 0 0 15px #9e7e5126; }
.letter-placeholder { color: #8b705c; }

/* One static blurred layer, clipped by the universe, never receives pointer events.
   Tune these variables to change atmosphere without filtering the clear picture. */
.universe {
  --atmosphere-blur: 24px;
  --atmosphere-brightness: .83;
  --atmosphere-saturation: .78;
  --atmosphere-contrast: .88;
  --atmosphere-opacity: .78;
}
.universe[data-scene="forest"] { --atmosphere-base: #344638; }
.universe[data-scene="cottage"] { --atmosphere-base: #508b9b; }
.universe[data-scene="blocks"] { --atmosphere-base: #bca975; }
.universe[data-scene="steps"] { --atmosphere-base: #c39260; }
.scene-atmosphere {
  display: none;
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(var(--atmosphere-blur)) brightness(var(--atmosphere-brightness))
    saturate(var(--atmosphere-saturation)) contrast(var(--atmosphere-contrast));
  opacity: var(--atmosphere-opacity);
  pointer-events: none;
}
.universe.exploring { background: var(--atmosphere-base); }
.exploring .scene-atmosphere { display: block; }
.exploring .sky, .exploring:before { display: none; }
.exploring .site-header, .scene-copy, .scene-tools, .scene-nav {
  text-shadow: 0 1px 6px #182e35cc;
}
.scene-canvas {
  --image-ratio: 1.8497;
  border-radius: 8px;
  box-shadow: 0 12px 36px #18242e40;
  /* Clip the feedback fragments at the same boundary as the clear image. */
  overflow: hidden;
}
.scene-canvas > img { object-fit: contain; }
.mobile-only, .orientation-hint { display: none; }

/* Pointer capability + viewport size, rather than a browser-specific user-agent. */
@media (any-pointer: coarse) and (max-width: 1100px) {
  .mobile-only { display: inline-block; }
  .exploring { min-height: 100svh; min-height: 100dvh; }
  .orientation-hint:not([hidden]) {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 16px;
    padding: 14px 16px;
    color: #fff8e8;
    background: #243d4699;
    border: 1px solid #fff4;
    border-radius: 12px;
  }
  .orientation-hint strong { font-size: 16px; font-weight: 500; }
  .orientation-hint p { font-size: 13px; line-height: 1.7; margin: 5px 0 0; }
  .rotate-phone { font: 38px Georgia, serif; transform: rotate(-25deg); }
  .scene-tools { flex-wrap: wrap; gap: 10px; }
  .scene-tools .header-button { font-size: 14px; }
  .scene-viewport { max-height: 65svh; max-height: 65dvh; }
}

/* Third pass: cues share the original hotbox; no new pointer-catching overlay. */
.compact-scene-only { display: none; }
.exploration-guide {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.6;
  color: #fff8dc;
  text-shadow: 0 1px 6px #182e35;
  transition: opacity .3s;
}
.exploration-guide.subtle { opacity: .7; }
.hotspot {
  --cue-color: #fff1b4;
  --cue-strength: .65;
  --cue-radius: 10px;
  /* Keep image fragments and hitboxes stationary while the cue breathes. */
}
.hotspot-cue {
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  box-shadow: 0 0 var(--cue-radius) var(--cue-color), inset 0 0 5px var(--cue-color);
  opacity: var(--cue-strength);
  pointer-events: none;
  animation: cue-breathe 3.4s ease-in-out var(--cue-delay, 0s) infinite;
}
.hotspot-cue:after {
  content: "✧";
  position: absolute;
  right: 5%;
  top: 5%;
  color: var(--cue-color);
  font: 16px Georgia, serif;
  text-shadow: 0 0 5px var(--cue-color);
}
.hotspot.forest { --cue-color: #e4f6c4; }
.hotspot.forest .hotspot-cue { inset: 12%; border-radius: 50%; }
.hotspot.forest .hotspot-cue:after { animation: cue-twinkle 4s ease-in-out var(--cue-delay, 0s) infinite; }
.hotspot.door { --cue-color: #ffdc8c; }
.hotspot.door .hotspot-cue { border-radius: 5px; }
.hotspot.door .hotspot-cue:after { right: auto; left: 12%; top: 52%; font-size: 12px; }
.hotspot.block:nth-child(1) { --cue-color: #e4edff; }
.hotspot.block:nth-child(2) { --cue-color: #ffe7aa; }
.hotspot.block:nth-child(3) { --cue-color: #d9f3dc; }
.hotspot.block .hotspot-cue { border-radius: 12%; }
.hotspot.visited { --cue-strength: .25; }
.hotspot.visited .hotspot-cue { animation: none; }
.hotspot.steps .hotspot-cue { border-radius: 25%; }
.hotspot.steps.current { --cue-strength: .85; --cue-radius: 14px; }
.hotspot.steps.locked .hotspot-cue { opacity: .12; animation: none; box-shadow: inset 0 0 4px var(--cue-color); }
.hotspot.steps.locked .hotspot-cue:after { display: none; }
.hotspot:hover .hotspot-cue, .hotspot:focus-visible .hotspot-cue,
.hotspot:active .hotspot-cue { opacity: 1; animation: none; }
.hotspot:active:not(.locked) { filter: brightness(1.2) drop-shadow(0 0 6px #fff1b4); }
.hotspot.forest.activated { animation: spirit-greet .32s ease; }
.hotspot.steps.activated { animation: stone-greet .32s ease; }
@keyframes cue-breathe {
  0%, 100% { opacity: calc(var(--cue-strength) * .5); }
  50% { opacity: var(--cue-strength); }
}
@keyframes cue-twinkle {
  0%, 75%, 100% { opacity: .3; }
  85% { opacity: 1; }
}
@keyframes spirit-greet {
  50% { transform: translate(-50%, -54%) rotate(-3deg); filter: brightness(1.15); }
}
@keyframes stone-greet {
  50% { filter: brightness(1.25); transform: translate(-50%, -55%); }
}

/* Landscape: a single compact header; the film replaces the three control rows.
   Keep 85–95% of the available width. If the original aspect cannot fit below
   the header, allow a small vertical pan instead of silently shrinking it. */
@media (any-pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .exploring {
    --landscape-header-height: 38px;
    --landscape-picture-height: calc(100svh - var(--landscape-header-height) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    --landscape-picture-height: calc(100dvh - var(--landscape-header-height) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    height: 100svh;
    height: 100dvh;
    min-height: 0;
  }
  .exploring .site-header {
    height: calc(var(--landscape-header-height) + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
  }
  .exploring .brand { display: none; }
  .exploring .compact-scene-only { display: inline-block; }
  #compact-scene-title { font-size: 16px; }
  #compact-scene-status { font-size: 13px; margin-left: auto; }
  .exploring .header-button, .exploring .scene-nav button { padding: 6px 12px; font-size: 13px; }
  .exploring #overview-button { order: -1; }
  .scene {
    display: block;
    height: calc(var(--landscape-picture-height) + env(safe-area-inset-bottom));
    padding: 0 max(8px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(8px, env(safe-area-inset-left));
    animation: none;
  }
  .scene-copy { display: none; }
  .scene-viewport {
    height: var(--landscape-picture-height);
    max-height: none;
    border-radius: 0;
  }
  .scene-canvas {
    width: clamp(87%, calc(var(--landscape-picture-height) * var(--image-ratio)), 95%);
    margin: 0 auto;
  }
  .scene-tools, .scene-nav { display: none; }
  .scene.controls-open .scene-tools,
  .scene.controls-open .scene-nav {
    display: flex;
    position: absolute;
    z-index: 5;
    right: max(12px, env(safe-area-inset-right));
    left: auto;
    padding: 10px 14px;
    margin: 0;
    background: #243d46ed;
    border-radius: 10px;
    text-shadow: none;
  }
  .scene.controls-open .scene-tools { top: 4px; gap: 12px; }
  .scene.controls-open .scene-nav { top: 60px; gap: 16px; bottom: auto; }
  .scene-tools #scene-status { display: none; }
  .exploration-guide {
    position: absolute;
    z-index: 3;
    bottom: calc(4px + env(safe-area-inset-bottom));
    left: 8%;
    right: 8%;
    width: fit-content;
    max-width: 84%;
    padding: 3px 10px;
    margin: 0 auto;
    font-size: 12px;
    border-radius: 20px;
    background: #20373c99;
    pointer-events: none;
    animation: guide-retire 1s ease 6s forwards;
  }
  .exploration-guide.subtle { visibility: hidden; }
  .exploring .surprise-trigger { bottom: calc(1px + env(safe-area-inset-bottom)); font-size: 22px; }
  .content-dialog { max-height: calc(100svh - 24px); max-height: calc(100dvh - 24px); padding: 28px; }
  .content-dialog h2 { font-size: 23px; margin: 12px 0; }
  .content-dialog p:not(.eyebrow) { min-height: 0; }
}
@keyframes guide-retire { to { opacity: .25; } }
@media (prefers-reduced-motion: reduce) {
  .hotspot-cue, .hotspot-cue:after, .exploration-guide { animation: none; }
}

/* Touch padding belongs to the same button, preserving its image patch and cue.
   Spaced spirits, stones and the single door can safely gain a 32px hit target.
   Adjacent blocks retain their existing hitboxes to avoid introducing overlap. */
@media (any-pointer: coarse) {
  .hotspot.forest::before, .hotspot.steps::before, .hotspot.door::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100%;
    height: 100%;
    min-width: var(--touch-target, 32px);
    min-height: var(--touch-target, 32px);
    transform: translate(-50%, -50%);
  }
}
/* Forest map: a separate modal with the same intact image and shared coordinates. */
.answer-dialog { width: min(1200px, 96vw); max-height: 94svh; border: 1px solid #fff8; border-radius: 12px; padding: 18px; color: #fff8e8; background: #31483ef5; }
.answer-dialog::backdrop { background: #14281d77; }
.answer-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.answer-dialog h2 { font-size: 21px; margin: 0; font-weight: 400; }
.answer-dialog p { font-size: 14px; line-height: 1.6; }
.answer-viewport { overflow: auto; max-height: 70svh; }
.answer-canvas { position: relative; aspect-ratio: 1920 / 1038; width: 100%; }
.answer-canvas img { width: 100%; height: 100%; display: block; object-fit: contain; }
.answer-marker { position: absolute; transform: translate(-50%, -50%); width: 32px; height: 32px; border: 1px solid #fff4c5; border-radius: 50%; background: #f3ca64; color: #49350d; font: bold 15px Arial, sans-serif; box-shadow: 0 0 12px #ffe7a7; }
.answer-marker.found { background: #d4dfc3; box-shadow: 0 0 6px #d4dfc3; }
.answer-marker.chosen { outline: 3px solid #fff8d4; outline-offset: 4px; }
.hotspot.forest.locating .hotspot-cue { --cue-strength: 1; --cue-radius: 22px; opacity: 1; animation: cue-breathe .55s ease-in-out infinite; }
#forest-answers { font-size: 13px; }
@media (any-pointer: coarse) and (orientation: landscape) and (max-width: 1100px) {
  .exploring .site-header { gap: 6px; }
  .exploring #forest-answers { font-size: 12px; padding: 6px 8px; }
  .exploring:has(#forest-answers:not([hidden])) #compact-scene-status { font-size: 12px; }
  .answer-dialog { padding: 12px; }
}
@media (max-width: 600px) and (orientation: portrait) {
  .site-header:has(#forest-answers:not([hidden])) { flex-wrap: wrap; }
  .answer-canvas { width: max(100%, 650px); }
}
@media (prefers-reduced-motion: reduce) {
  .hotspot.forest.locating .hotspot-cue { animation: none; }
}

.exploration-guide.complete { visibility: visible; opacity: 1; animation: none; }
/* Inside the cottage: transparent hitboxes over one complete original image. */
.universe[data-scene="inside"] { --atmosphere-base: #866c47; }
.room-hotspot { position: absolute; left: var(--x); top: var(--y); width: var(--width); height: var(--height); transform: translate(-50%, -50%); border: 0; padding: 0; background: transparent; border-radius: 45%; transition: box-shadow .25s; touch-action: manipulation; }
.room-hotspot:not(.secret):hover, .room-hotspot:focus-visible, .room-hotspot.playing { box-shadow: inset 0 0 12px #fff0bd88; }
.room-hotspot:not(.secret)::after { content: ""; position: absolute; width: 5px; height: 5px; left: 50%; top: 50%; border-radius: 50%; background: #fff3c2aa; box-shadow: 0 0 7px #ffe1a3; pointer-events: none; }
.inside-effects { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.inside-effects svg { width: 100%; height: 100%; fill: none; stroke: #fff0c4; stroke-width: 4; stroke-linecap: round; }
.inside-effects svg > g { opacity: 0; }
.inside-effects.playing-tea .room-tea,
.inside-effects.playing-bread .room-bread,
.inside-effects.playing-jam .room-jam,
.inside-effects.playing-greens .room-greens,
.inside-effects.playing-window .room-window { opacity: .7; }
.playing-tea .pot-gesture { transform-box: fill-box; transform-origin: 65% 90%; animation: room-pour 1.7s ease both; }
.tea-flow { stroke: #e4c38c; stroke-dasharray: 9 8; }
.playing-tea .tea-flow { animation: tea-flow 1.6s ease both; }
.playing-tea .steam { stroke: #fff9e2; stroke-width: 5; animation: room-steam 2s ease infinite; }
.playing-tea .steam-b { animation-delay: .5s; }
.playing-bread .room-bread { transform-box: fill-box; transform-origin: center; animation: room-hop .65s ease 2; }
.butter-glint { stroke: #ffe899; stroke-width: 10; }
.playing-jam .room-jam { transform-box: fill-box; transform-origin: center; animation: room-sway .6s ease 3; }
.playing-greens .room-greens, .playing-window .room-window { transform-box: fill-box; transform-origin: bottom center; animation: room-sway 1.2s ease 2; }
.playing-window .breeze { stroke-dasharray: 24 30; animation: breeze-drift 2.4s ease; }
.room-petal { position: absolute; left: var(--petal-x); top: var(--petal-y); width: clamp(5px, .7vw, 11px); height: clamp(8px, 1vw, 16px); border-radius: 70% 20% 70% 30%; background: #e9a8ac; animation: petal-fall 2.8s ease-in var(--petal-delay) both; }
.room-postcard { width: min(360px, 85vw); border: 1px solid #d3b78a; padding: 34px 28px; border-radius: 5px; background: repeating-linear-gradient(#fff7df, #fff7df 27px, #d7bb8c55 28px); color: #6b5137; box-shadow: 0 16px 45px #362a2266; transform: rotate(-2deg); }
.room-postcard::backdrop { background: #352a1c22; }
.room-postcard > button { position: absolute; right: 8px; top: 4px; border: 0; background: transparent; font-size: 24px; color: #6b5137; padding: 4px 10px; }
.room-postcard p { font-size: 20px; line-height: 1.7; }
.room-postcard > span { font-size: 26px; }
@keyframes room-pour { 45% { transform: rotate(12deg); } }
@keyframes tea-flow { 0%, 100% { opacity: 0; } 30%, 75% { opacity: .8; stroke-dashoffset: -32; } }
@keyframes room-steam { from { opacity: 0; transform: translateY(8px); } 35% { opacity: .7; } to { opacity: 0; transform: translateY(-45px); } }
@keyframes room-hop { 50% { transform: translateY(-12px); } }
@keyframes room-sway { 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }
@keyframes breeze-drift { to { stroke-dashoffset: -70; opacity: 0; } }
@keyframes petal-fall { from { opacity: 0; transform: translate(0, 0) rotate(0); } 12% { opacity: .9; } to { opacity: 0; transform: translate(65px, 170px) rotate(180deg); } }
@media (any-pointer: coarse) {
  .room-hotspot[data-room="postcard"] { min-height: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .inside-effects *, .room-postcard { animation-duration: .01ms !important; }
}
/* Blocks narration: all coordinates belong to the intact clear-image canvas.
   The mask ends at x=54%, before the nearest main tower face (~55%). */
.universe[data-scene="blocks"] .scene-canvas { container-type: inline-size; }
.blocks-story { position: absolute; inset: 0; pointer-events: none;
  --glow-left: 12%; --glow-top: 20%; --glow-width: 55%; --glow-height: 90%;
  --text-left: 34%; --text-top: 43%; --text-width: 19%; --text-height: 49%;
}
.blocks-glow { position: absolute; left: var(--glow-left); top: var(--glow-top); width: var(--glow-width); height: var(--glow-height);
  background: radial-gradient(ellipse 50% 50% at 50% 50%, #fff9e9f5 0%, #fff3dcd9 35%, #f4e3b873 65%, transparent 100%);
  opacity: 0; transition: opacity var(--glow-duration, 1800ms) ease; pointer-events: none;
}
.blocks-story.glowing .blocks-glow { opacity: 1; }
.blocks-reader { position: absolute; left: var(--text-left); top: var(--text-top); width: var(--text-width); height: var(--text-height);
  display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 8px; opacity: 0;
  color: #493e2e; background: transparent; transition: opacity var(--reader-duration, 800ms) ease;
  pointer-events: none;
}
.blocks-story.reading .blocks-reader { opacity: 1; pointer-events: auto; }
.blocks-page { min-height: 0; overflow: auto; white-space: pre-line; overflow-wrap: anywhere; font-size: clamp(14px, 1.8cqw, 23px); line-height: 1.95; opacity: 1; transition: opacity var(--page-duration, 450ms) ease; }
.blocks-page.fading { opacity: 0; }
.blocks-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px; font: 13px Georgia, serif; }
.blocks-pager button { border: 0; padding: 6px 2px; color: #51432e; background: transparent; font-size: 13px; min-height: 32px; }
.blocks-pager button:disabled { opacity: .3; cursor: default; }
.blocks-pager button:hover:not(:disabled) { color: #8a592a; }
.blocks-pager button:focus-visible { outline-color: #876c43; outline-offset: 1px; }
.universe[data-scene="blocks"] #exploration-guide:empty { display: none; }
@media (any-pointer: coarse) and (max-width: 1100px) {
  .blocks-story { --text-left: 32%; --text-top: 38%; --text-width: 21%; --text-height: 55%; }
  .blocks-pager { font-size: 12px; gap: 3px; }
  .blocks-pager button { font-size: 13px; }
}
@media (any-pointer: coarse) and (orientation: portrait) and (max-width: 700px) {
  /* Keep type readable rather than fitting a 19%-wide column into a tiny photo.
     The existing picture viewport handles horizontal panning and zoom. */
  .universe[data-scene="blocks"] .scene-canvas { min-width: 640px; }
}
@media (prefers-reduced-motion: reduce) {
  .blocks-glow, .blocks-reader, .blocks-page { transition-duration: .01ms; }
}
/* Five gifts: a small sunset journal, inside the existing accessible dialog. */
.content-dialog.wish-summary { width: min(720px, calc(100vw - 28px)); background: linear-gradient(145deg, #fff6e5f5, #f0d5bdf5 65%, #e7bb9cf5); color: #604733; border-radius: 14px; }
.wish-summary #dialog-text { min-height: 0; }
.wish-journal { display: grid; gap: 15px; margin: 20px 0; }
.wish-gift { padding: 18px 20px; border: 1px solid #cba67e66; border-radius: 8px; background: #fffaf080; box-shadow: 0 4px 12px #9463370a; }
.wish-gift h3 { margin: 0 0 9px; font-size: 18px; font-weight: 500; }
.content-dialog .wish-gift p { min-height: 0; margin: 6px 0; }
.wish-gift .wish-question { color: #8b6b50; font-size: 14px !important; }
.wish-gift .wish-answer { overflow-wrap: anywhere; white-space: pre-wrap; }
.wish-gift button, .wish-reset { border: 0; background: transparent; color: #8a5c3c; font: inherit; font-size: 14px; padding: 8px 0; text-decoration: underline; text-underline-offset: 4px; }
.task-form .wish-reset { color: #8a5c3c; background: transparent; }
@media (max-width: 600px) { .wish-gift { padding: 14px; } }
/* Along the way: light choices, optional notes, no scoring or form-like selects. */
.journey-form .journey-hint { min-height: 0 !important; margin: 0 0 12px; color: #8a7058; font-size: 14px !important; line-height: 1.8 !important; }
.journey-options { display: grid; grid-template-columns: 1fr; gap: 9px; }
.journey-options.weather-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.journey-form .journey-option { min-height: 46px; padding: 11px 14px; border: 1px solid #b7987044; border-radius: 12px; background: #fff8e966; color: #65503c; text-align: left; line-height: 1.6; overflow-wrap: anywhere; }
.journey-form .journey-option[aria-pressed="true"] { background: #f0d8ae; border-color: #ad7f47; box-shadow: inset 0 0 0 1px #ad7f4744; }
.weather-options .journey-option { display: grid; justify-items: center; text-align: center; gap: 4px; }
.weather-options .journey-option > span:first-child { font-size: 27px; }
.journey-form textarea { resize: vertical; min-height: 110px; width: 100%; border: 0; border-bottom: 1px solid #b69c77; padding: 12px; border-radius: 8px; background: #fff9ed88; font: inherit; font-size: 16px; color: #604b35; line-height: 1.8; }
.journey-form .journey-quiet { color: #8a7058; background: transparent; padding: 6px; font-size: 14px; }
.journey-edit-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0; }
.journey-edit-nav button, .journey-landscape { border: 1px solid #b7987055; border-radius: 18px; color: #755238; background: #fff9e777; padding: 9px 13px; font-size: 14px; }
.wish-gift .journey-keyword { font-size: 28px !important; color: #925d32; letter-spacing: .12em; }
/* Existing full-frame travel stills: contain, natural ratio, no image filters. */
.journey-picture-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.journey-form .journey-picture-options .journey-option { display: flex; flex-direction: column; gap: 10px; padding: 10px; text-align: left; border-radius: 12px; }
.journey-picture-options img, .journey-record-image { display: block; width: 100%; height: auto; aspect-ratio: 1920 / 1038; object-fit: contain; border-radius: 8px; }
.journey-option-title { font-weight: 500; }
.journey-option-description { font-size: 14px; line-height: 1.8; color: #826a54; }
.journey-train { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1920 / 1038; border-radius: 8px; overflow: hidden; background: linear-gradient(160deg, #e5e9d8, #efd8b7); color: #826d54; font-size: 15px; letter-spacing: .12em; }
.journey-train:after { content: ""; position: absolute; left: 10%; right: 10%; bottom: 18%; height: 7px; border-block: 1px solid #a88e6f77; background: repeating-linear-gradient(90deg, transparent 0 13px, #a88e6f44 13px 15px); transform: rotate(-7deg); }
.journey-retained { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px !important; color: #826a54; min-height: 0 !important; }
.journey-note { font-size: 16px !important; letter-spacing: normal; }
@media (max-width: 600px) { .journey-picture-options { grid-template-columns: minmax(0, 1fr); } }
/* Cottage sounds: floating shell and brightness child use separate animations. */
.sound-jar { --jar-right: 22px; --jar-bottom: 25px; position: fixed; z-index: 12; right: max(var(--jar-right), env(safe-area-inset-right)); bottom: max(var(--jar-bottom), env(safe-area-inset-bottom)); width: 58px; height: 80px; padding: 8px; border: 0; background: transparent; animation: jar-float 6s ease-in-out infinite; }
.sound-jar-glass { display: block; position: relative; width: 100%; height: 100%; border: 1px solid #fff9; border-radius: 9px 9px 17px 17px; background: linear-gradient(100deg, #ffffff44, #ffffff08 40%, #ffffff22); box-shadow: inset 4px 0 8px #fff4, 0 5px 16px #30484433; }
.sound-jar-glass:before { content: ""; position: absolute; left: -2px; right: -2px; top: -5px; height: 9px; border: 1px solid #fff9; border-radius: 5px; background: #f8efdf44; }
.sound-jar-glass.collected { animation: jar-collect 1.5s ease-in-out; }
@keyframes jar-float { 50% { transform: translateY(-7px); } }
@keyframes jar-collect { 0%, 33%, 66%, 100% { filter: brightness(1); box-shadow: inset 4px 0 8px #fff4, 0 0 5px #ffedc433; } 16%, 50%, 83% { filter: brightness(1.7); background-color: #fff4cc88; box-shadow: inset 0 0 25px #fff9, 0 0 30px #ffe8aaee; } }
.sound-dialog #sound-items section { border-bottom: 1px solid #9d815b33; padding: 12px 0; }
.sound-dialog #sound-items h3 { font-size: 20px; font-weight: 400; margin: 0; }
.sound-dialog p:not(.eyebrow) { min-height: 0; margin: 9px 0; font-size: 14px; }
.sound-dialog #sound-items button { color: #71563e; border: 1px solid #b49c7777; border-radius: 20px; padding: 8px 18px; background: #fff7e977; }
.inside-effects.playing-tea .room-tea { opacity: 1; }
.playing-tea .tea-flow { stroke: #f6d49a; stroke-width: 7; stroke-dasharray: 1500; animation: cottage-tea-pour 3s ease forwards; filter: drop-shadow(0 1px 2px #84532d88); }
.playing-tea .steam { stroke-width: 8; }
@keyframes cottage-tea-pour { 0% { stroke-dashoffset: 1500; opacity: 0; } 15% { opacity: 1; } 65% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: -1500; opacity: 0; } }
.butter-spread { stroke: #ffe5a0; stroke-width: 22; stroke-linecap: round; stroke-dasharray: 260; }
.playing-bread .butter-spread { animation: butter-spread 2s ease both; }
@keyframes butter-spread { 0% { stroke-dashoffset: 260; opacity: 0; } 35% { opacity: 1; } 70% { stroke-dashoffset: 0; opacity: .9; } 100% { opacity: 0; } }
.hotspot.sailboat { border-radius: 8%; }
.hotspot.sailboat .hotspot-cue { opacity: .25; }
.hotspot.sailboat.sailing { animation: sailboat-bob 3.6s ease-in-out; }
.hotspot.sailboat.sailing:after { content: ""; position: absolute; bottom: -3%; left: 0; right: 0; height: 5%; border-radius: 50%; box-shadow: 0 2px 4px #ffefd8aa; }
@keyframes sailboat-bob { 25%, 75% { transform: translate(-50%, -52%) rotate(.7deg); } 50% { transform: translate(-50%, -49%) rotate(-.6deg); } }
@media (any-pointer: coarse) and (orientation: landscape) { .sound-jar { --jar-right: 6px; --jar-bottom: 5px; width: 43px; height: 60px; } }
@media (prefers-reduced-motion: reduce) { .sound-jar, .sound-jar-glass.collected { animation: none; } .sound-jar-glass.collected { box-shadow: 0 0 22px #ffe8aa; } }
/* Jar movement, float and flash each own a layer; only one real jar exists. */
.sound-jar { --jar-side-gap: 32px; position: fixed; left: 0; top: 0; right: auto; bottom: auto; width: 76px; height: 102px; z-index: 25; animation: none; transition: left var(--jar-move-time,850ms) ease-in-out, top var(--jar-move-time,850ms) ease-in-out, width var(--jar-move-time,850ms) ease, height var(--jar-move-time,850ms) ease; }
.sound-jar-float { display: block; width: 100%; height: 100%; animation: jar-float 6s ease-in-out infinite; }
.sound-jar-glass.collected { animation-duration: var(--jar-flash-time,1500ms); }
.sound-jar.jar-intro { width: 104px; height: 138px; transition: none; cursor: default; }
.cottage-intro { width: min(560px, calc(100vw - 28px)); border-radius: 16px; background: linear-gradient(145deg,#fff9edf2,#e6eee6ed); padding: 30px; max-height: calc(100svh - 24px); animation: none; transform: none; transition: opacity .4s ease; }
.cottage-intro::backdrop { background: #203b4044; }
.cottage-intro.leaving { opacity: 0; }
.cottage-intro .eyebrow { font-size: 11px; margin: 0; }
.cottage-intro h2 { font-size: 25px; margin: 14px 0 18px; }
.content-dialog.cottage-intro p:not(.eyebrow) { min-height: 0; font-size: 15px; line-height: 1.85; margin: 0 0 12px; }
.cottage-intro-copy { padding-right: 105px; }
.content-dialog.cottage-intro .cottage-reminder { color: #6f7c70; font-size: 13px; }
.intro-jar-slot { position: absolute; width: 104px; height: 144px; right: 20px; top: 42%; }
.cottage-intro-actions { display: flex; justify-content: space-between; gap: 16px; margin-top: 20px; }
.cottage-intro-actions button { border: 1px solid #9eaf9c88; border-radius: 24px; background: #fff9; color: #566e61; padding: 10px 20px; font-size: 15px; }
.cottage-intro-actions #cottage-start { color: #fffaf0; background: #627e70; }
@media (max-width: 600px), (max-height: 500px) {
  .sound-jar { --jar-side-gap: 22px; width: 62px; height: 85px; }
  .cottage-intro { padding: 22px; }
  .cottage-intro-copy { padding: 0; }
  .intro-jar-slot { position: relative; top: auto; right: auto; width: 100%; height: 112px; }
  .sound-jar.jar-intro { width: 82px; height: 108px; }
}
@media (prefers-reduced-motion: reduce) { .sound-jar-float { animation: none; } .sound-jar { transition-duration: .01ms; } }

.sound-jar.jar-intro { position: relative; left: 0 !important; top: 0 !important; margin: 0 auto; display: block; }
.cottage-music-dialog p:not(.eyebrow) { min-height: 0; font-size: 15px; }
.cottage-song { display: grid; gap: 5px; width: 100%; text-align: left; border: 1px solid #a6b6a266; border-radius: 10px; padding: 13px 16px; margin: 10px 0; color: #586b59; background: #fff8e977; }
.cottage-song small { color: #7d8776; }
.cottage-song[aria-pressed="true"] { border-color: #738f79; background: #eef1dfbb; }
.cottage-music-actions { display: flex; gap: 12px; }
.cottage-music-actions button { border: 1px solid #a6b6a266; border-radius: 22px; padding: 9px 20px; color: #586b59; background: #fff8e977; }
.cottage-discovery-bar { display: flex; align-items: center; gap: 16px; margin: 0 0 12px; font-size: 14px; }
.cottage-discovery-bar button { border: 1px solid #fff5; border-radius: 22px; padding: 7px 15px; color: #fff9ed; background: #3d665466; font-size: 14px; }
.cottage-map-dialog h3 { font-size: 17px; font-weight: 400; }
.cottage-map-dialog .answer-viewport { max-height: 50svh; }
.answer-marker.map-surprise { background: #f6dcac; border-radius: 9px; }
.cottage-music-toast { position: fixed; bottom: max(25px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 40; width: max-content; max-width: calc(100vw - 40px); padding: 12px 20px; border: 1px solid #fff9; border-radius: 25px; background: #f8f2e6ee; color: #65775f; font-size: 14px; box-shadow: 0 8px 30px #304b3e22; pointer-events: none; }
.room-hotspot.music-playing::after { background: #ffedb9aa; animation: music-leaf-glow 4s ease-in-out infinite; }
@keyframes music-leaf-glow { 50% { opacity: .35; box-shadow: 0 0 10px #ffedb977; } }
@media (any-pointer: coarse) and (orientation: landscape) and (max-width: 1100px) {
  .cottage-discovery-bar { position: absolute; left: 20px; bottom: 8px; z-index: 5; margin: 0; padding: 4px 9px; border-radius: 20px; background: #365846b0; font-size: 12px; }
  .cottage-discovery-bar button { padding: 5px 10px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .room-hotspot.music-playing::after { animation: none; } }
/* Shared music entry: outside scene roots, above the lower-left decorative entry. */
.global-music-control {
  --music-mini-left: 24px;
  --music-mini-bottom: 76px;
  position: fixed;
  z-index: 30;
  left: max(var(--music-mini-left), env(safe-area-inset-left));
  bottom: max(var(--music-mini-bottom), env(safe-area-inset-bottom));
  max-width: min(260px, calc(100vw - 48px));
  padding: 10px 16px;
  border: 1px solid #fff8;
  border-radius: 24px;
  color: #526d5d;
  background: #fff8e9e6;
  box-shadow: 0 5px 22px #324a3922;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(10px);
}
@media (max-width: 700px), (max-height: 500px) {
  .global-music-control { --music-mini-left: 14px; --music-mini-bottom: 66px; max-width: 180px; padding: 8px 12px; }
}
@media (max-width: 700px), (max-height: 500px) {
  .global-music-control { width: 44px; height: 40px; max-width: 44px; padding: 8px; font-size: 0; }
  .global-music-control::before { content: "♫"; font-size: 18px; }
  .global-music-control[data-playback="paused"]::before { content: "Ⅱ"; }
}
