.stage--neighborhood,
.stage--social-home { overflow: hidden; padding: 0; }

.social-neighborhood,
.social-home,
.social-home-scene { position: relative; width: 100%; height: 100%; overflow: hidden; }
.social-neighborhood {
  background: url("../assets/scenes/neighborhood-lane-v1.png") center / cover no-repeat;
}
.social-neighborhood::after,
.social-home-scene::after {
  pointer-events: none;
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(180deg, rgb(49 61 54 / 4%) 45%, rgb(54 43 39 / 25%) 100%);
}
.neighborhood-light {
  pointer-events: none;
  position: absolute;
  z-index: 2;
  top: 16%;
  left: 50%;
  width: 260px;
  height: 170px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgb(255 224 153 / 12%);
  filter: blur(24px);
  animation: neighborhood-glow 4.8s ease-in-out infinite alternate;
}
.neighborhood-door {
  position: absolute;
  z-index: 4;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: white;
}
.neighborhood-door::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid rgb(255 231 178 / 0%);
  border-radius: 18px 18px 8px 8px;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0%);
  transition: 180ms ease;
}
.neighborhood-door:not(:disabled):hover::before,
.neighborhood-door:focus-visible::before {
  border-color: rgb(255 231 178 / 72%);
  box-shadow: inset 0 0 34px rgb(255 208 126 / 20%), 0 0 24px rgb(255 219 154 / 28%);
}
.neighborhood-door--left { top: 14%; left: 2%; width: 20%; height: 60%; }
.neighborhood-door--center { top: 31%; left: 43%; width: 14%; height: 36%; }
.neighborhood-door--right { top: 14%; right: 1.5%; width: 18%; height: 58%; }
.neighborhood-door > span {
  position: absolute;
  right: 50%;
  bottom: 1px;
  display: grid;
  min-width: 200px;
  max-width: 240px;
  gap: 1px;
  padding: 7px 14px;
  transform: translateX(50%);
  border: 1px solid rgb(255 255 255 / 54%);
  border-radius: 14px;
  background: rgb(67 55 50 / 72%);
  box-shadow: 0 8px 20px rgb(48 36 33 / 22%);
  backdrop-filter: blur(10px);
}
.neighborhood-door b { font-size: 13px; }
.neighborhood-door small { color: rgb(255 255 255 / 78%); font-size: 10px; white-space: nowrap; }
.neighborhood-door__presence { font-size: 11px; font-weight: 900; letter-spacing: .02em; white-space: nowrap; }
.neighborhood-door__presence.is-home { color: #ffe7b2; }
.neighborhood-door__presence.is-away { color: #f3c4a8; }
.neighborhood-door__hint { color: rgb(255 255 255 / 86%); font-size: 9px; font-style: normal; line-height: 1.35; white-space: nowrap; }
.neighborhood-door.is-locked > span { background: rgb(78 74 70 / 60%); }
.neighborhood-pages {
  position: absolute;
  z-index: 6;
  top: 72px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 16px;
  background: rgb(255 250 240 / 72%);
  color: var(--ink-soft);
  backdrop-filter: blur(12px);
}
.neighborhood-pages button { width: 34px; height: 30px; border-radius: 11px; background: rgb(255 255 255 / 68%); }
.neighborhood-pages span { min-width: 34px; font-size: 11px; text-align: center; }
.neighborhood-quiet {
  position: absolute;
  z-index: 5;
  bottom: 94px;
  left: 50%;
  display: grid;
  min-width: 240px;
  justify-items: center;
  gap: 2px;
  padding: 11px 18px;
  transform: translateX(-50%);
  border-radius: 18px;
  background: rgb(74 61 56 / 66%);
  color: white;
  backdrop-filter: blur(12px);
}
.neighborhood-quiet span { font-size: 20px; }
.neighborhood-quiet b { font-size: 13px; }
.neighborhood-quiet small { color: rgb(255 255 255 / 72%); font-size: 10px; }
.neighborhood-companion {
  pointer-events: none;
  position: absolute;
  z-index: 3;
  bottom: 58px;
  left: 32%;
  width: 180px;
  height: 190px;
  transform: translateX(-50%);
  object-fit: contain;
  filter: drop-shadow(0 18px 18px rgb(56 45 39 / 28%));
}

.social-home-scene { background: url("../assets/scenes/neighbor-home-yu-v1.png") center / cover no-repeat; }
.social-home-owner {
  position: absolute;
  z-index: 6;
  top: 22px;
  right: 22px;
  display: grid;
  gap: 2px;
  padding: 9px 13px;
  border: 1px solid rgb(255 255 255 / 58%);
  border-radius: 15px;
  background: rgb(255 250 239 / 75%);
  color: var(--ink);
  backdrop-filter: blur(12px);
}
.social-home-owner b { font-size: 13px; }
.social-home-owner small { color: var(--ink-soft); font-size: 10px; }
.social-home-scene > .social-visit-cat {
  position: absolute;
  z-index: 5;
  right: 21%;
  bottom: 54px;
  width: 330px;
  height: 390px;
}
.social-scene-hotspot {
  position: absolute;
  z-index: 5;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0%);
  border-radius: 50%;
  background: rgb(255 245 211 / 0%);
  transition: 180ms ease;
}
.social-scene-hotspot:hover,
.social-scene-hotspot:focus-visible { border-color: rgb(255 236 180 / 72%); background: rgb(255 224 148 / 14%); box-shadow: 0 0 24px rgb(255 215 137 / 32%); }
.social-scene-hotspot--photos { top: 36%; left: 25.5%; width: 15%; height: 19%; border-radius: 18px; }
.social-scene-hotspot--water { bottom: 16%; left: 24%; width: 72px; height: 48px; }
.social-scene-hotspot--water span { display: grid; width: 24px; height: 24px; margin: auto; place-items: center; border-radius: 50%; background: rgb(255 250 234 / 78%); color: #6f8e84; opacity: 0; }
.social-scene-hotspot--water:hover span,
.social-scene-hotspot--water:focus-visible span { opacity: 1; }
.social-home-exit {
  position: absolute;
  z-index: 6;
  top: 6%;
  bottom: 15%;
  left: 0;
  width: 17%;
  border: 0;
  background: transparent;
}
.social-home-exit span {
  position: absolute;
  top: 50%;
  left: 16px;
  display: grid;
  min-width: 34px;
  min-height: 72px;
  padding: 14px 10px;
  place-items: center;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  border: 1px solid rgb(255 255 255 / 48%);
  border-radius: 16px;
  background: rgb(73 61 55 / 62%);
  color: white;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .22em;
  line-height: 1.1;
  opacity: .92;
  backdrop-filter: blur(9px);
}
.social-home-exit:hover span,
.social-home-exit:focus-visible span { opacity: 1; }
.social-home-scene > .scene-note { z-index: 7; right: 18px; bottom: 84px; left: auto; max-width: 320px; }
.social-bond-shelf { display: grid; gap: 7px; padding: 10px; border: 1px solid rgb(166 95 88 / 20%); border-radius: 14px; background: rgb(255 250 239 / 88%); color: var(--ink); box-shadow: 0 12px 28px rgb(70 45 30 / 12%); backdrop-filter: blur(12px); }
.social-bond-shelf > header { display: grid; grid-template: auto auto / 1fr auto; align-items: center; column-gap: 8px; }
.social-bond-shelf > header span { color: #9b5b55; font-size: 9px; font-weight: 900; }
.social-bond-shelf > header b { grid-row: 1 / 3; grid-column: 2; color: #9e5853; font-family: var(--font-display); font-size: 24px; }
.social-bond-shelf > header small { color: var(--ink-soft); font-size: 9px; }
.social-bond-shelf > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.social-bond-shelf button { display: grid; min-width: 0; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 4px; padding: 6px; border: 1px solid rgb(158 91 84 / 18%); border-radius: 9px; background: rgb(255 255 255 / 76%); color: #774e49; text-align: left; }
.social-bond-shelf button:disabled { opacity: .42; }
.social-bond-shelf button i { font-size: 17px; font-style: normal; text-align: center; }
.social-bond-shelf button span { min-width: 0; }
.social-bond-shelf button b,
.social-bond-shelf button small { display: block; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.social-bond-shelf button small { color: var(--ink-soft); }
.social-home-scene > .social-bond-shelf { position: absolute; z-index: 7; top: 80px; right: 22px; width: 300px; }
.core-social-activity > .social-bond-shelf { padding: 8px; box-shadow: none; }

/* M1 好友合影把两只猫固定在同一房间坐标，并把离线/未解锁原因留在现场。 */
.core-social-home__scene > .friend-photo-visitor-cat,
.social-home-scene > .friend-photo-visitor-cat {
  display: grid;
  place-items: end center;
  position: absolute;
  z-index: 7;
  bottom: 52px;
  left: 15%;
  width: 250px;
  height: 300px;
  pointer-events: none;
  filter: saturate(.96) drop-shadow(0 13px 15px rgb(71 49 39 / 18%));
}
.friend-photo-visitor-cat .cat-sprite { width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.social-home-scene > .friend-photo-visitor-cat { bottom: 46px; left: 11%; width: 290px; height: 340px; }
.core-tool-dock [data-friend-photo-outfit-sheet] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.friend-photo-copy { display: grid; gap: 6px; padding: 10px; border: 1px solid rgb(166 95 88 / 18%); border-radius: 14px; background: rgb(255 250 239 / 88%); color: var(--ink); }
.social-home-scene > .friend-photo-copy { position: absolute; z-index: 8; top: 80px; left: 22px; width: 255px; }
.friend-photo-copy > header { display: grid; gap: 2px; }
.friend-photo-copy > header span { color: #a65f58; font-size: 9px; font-weight: 900; }
.friend-photo-copy > header b { font-size: 12px; }
.friend-photo-copy__cats { display: flex; height: 74px; align-items: end; justify-content: center; overflow: hidden; border-radius: 10px; background: linear-gradient(145deg, #f4e4d2, #fff8ec); }
.friend-photo-copy__cats img { width: 45%; height: 100%; object-fit: contain; }
.friend-photo-copy__cats i { z-index: 1; margin: 0 -4px 18px; color: #b96e67; font-size: 18px; font-style: normal; }
.friend-photo-copy > small { color: var(--ink-soft); font-size: 9px; line-height: 1.35; }
.friend-photo-preview { position: absolute; z-index: 50; inset: 0; display: grid; place-items: center; padding: 24px; background: rgb(56 39 40 / 42%); backdrop-filter: blur(4px); }
.friend-photo-preview__panel { display: grid; width: min(410px, 100%); gap: 8px; padding: 18px; border: 1px solid rgb(255 255 255 / 82%); border-radius: 22px; background: #fffaf0; box-shadow: 0 24px 60px rgb(52 35 35 / 28%); color: var(--ink); }
.friend-photo-preview__panel > header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.friend-photo-preview__panel > header span { color: #a65f58; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.friend-photo-preview__panel h2 { margin: 3px 0 0; font-family: var(--font-display); font-size: 20px; }
.friend-photo-preview__panel > header button { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgb(155 99 82 / 22%); border-radius: 50%; background: white; color: #82544f; font-size: 19px; }
.friend-photo-preview__panel > img { width: 100%; max-height: 300px; object-fit: contain; border-radius: 13px; box-shadow: 0 11px 24px rgb(76 47 42 / 14%); }
.friend-photo-preview__panel > p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.55; }
.friend-photo-preview__panel > .primary-button { min-height: 38px; padding: 10px 14px; border-radius: 10px; }
.friend-photo-away-reveal { position: absolute; z-index: 60; inset: 0; display: grid; place-items: center; padding: 24px; background: rgb(56 39 40 / 48%); backdrop-filter: blur(6px); }
.friend-photo-away-reveal__panel { display: grid; width: min(480px, 100%); gap: 10px; padding: 22px; border: 1px solid rgb(255 255 255 / 86%); border-radius: 26px; background: linear-gradient(145deg, #fffaf0, #f9e8dc); box-shadow: 0 26px 70px rgb(52 35 35 / 32%); color: var(--ink); }
.friend-photo-away-reveal__panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.friend-photo-away-reveal__panel > header span { color: #a65f58; font-size: 10px; font-weight: 950; letter-spacing: .1em; }
.friend-photo-away-reveal__panel > header button { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid rgb(155 99 82 / 22%); border-radius: 50%; background: white; color: #82544f; font-size: 20px; }
.friend-photo-away-reveal__panel h2 { margin: 0; font-family: var(--font-display); font-size: 25px; line-height: 1.15; }
.friend-photo-away-reveal__pair { display: grid; grid-template-columns: 1fr 28px 1fr; align-items: end; gap: 4px; min-height: 205px; padding: 12px; border: 1px solid rgb(166 95 88 / 18%); border-radius: 18px; background: linear-gradient(145deg, #f4e4d2, #fff8ec); }
.friend-photo-away-reveal__pair figure { display: grid; min-width: 0; justify-items: center; gap: 3px; margin: 0; }
.friend-photo-away-reveal__pair figure img { width: 100%; height: 150px; object-fit: contain; filter: drop-shadow(0 10px 10px rgb(76 47 42 / 14%)); }
.friend-photo-away-reveal__pair figure figcaption { max-width: 100%; overflow: hidden; color: var(--ink); font-size: 11px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.friend-photo-away-reveal__pair > b { align-self: center; color: #b96e67; font-size: 23px; }
.friend-photo-away-reveal__panel > p { margin: 0; color: var(--ink); font-size: 13px; line-height: 1.65; }
.friend-photo-away-reveal__panel > small { color: var(--ink-soft); font-size: 10px; line-height: 1.45; }
.friend-photo-away-reveal__panel > .primary-button { min-height: 40px; padding: 10px 14px; border: 0; border-radius: 11px; color: white; text-align: center; }

@media (max-width: 760px) {
  .core-social-home__scene > .friend-photo-visitor-cat,
  .social-home-scene > .friend-photo-visitor-cat { left: 8%; width: 210px; height: 255px; }
  .social-home-scene > .friend-photo-copy { top: 74px; left: 14px; width: 210px; }
  .friend-photo-away-reveal { padding: 14px; }
  .friend-photo-away-reveal__panel { padding: 17px; }
  .friend-photo-away-reveal__pair { min-height: 170px; }
  .friend-photo-away-reveal__pair figure img { height: 120px; }
}

@keyframes neighborhood-glow { to { transform: translateX(-50%) scale(1.08); opacity: .68; } }

/* 羁绊提示独立于通用 notify，容器不拦截提示之外的操作。 */
.bond-toast-stack {
  pointer-events: none;
  position: fixed;
  z-index: 90;
  top: max(78px, calc(env(safe-area-inset-top) + 70px));
  right: 18px;
  display: grid;
  width: min(340px, calc(100vw - 36px));
  gap: 10px;
}

.bond-toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 10px;
  min-height: 60px;
  padding: 11px 14px;
  border: 1px solid rgb(224 177 102 / 58%);
  border-radius: 16px;
  background: rgb(255 250 239 / 96%);
  box-shadow: 0 12px 28px rgb(80 54 42 / 18%);
  color: #704a3f;
  text-align: left;
  cursor: pointer;
  animation: bond-toast-in 220ms var(--ease, ease-out) both;
}

.bond-toast:hover,
.bond-toast:focus-visible {
  border-color: rgb(206 143 63 / 82%);
  outline: 2px solid rgb(224 177 102 / 58%);
  outline-offset: 2px;
}

.bond-toast strong {
  color: #be6b36;
  font-size: var(--text-sm);
  font-weight: 800;
}

.bond-toast span {
  overflow: hidden;
  color: #966452;
  font-size: var(--text-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bond-toast p {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: #704a3f;
  font-size: var(--text-xs);
  line-height: 1.45;
}

.bond-toast.is-leaving {
  animation: bond-toast-out 240ms var(--ease, ease-in) forwards;
}

@keyframes bond-toast-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes bond-toast-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-6px) scale(0.98); }
}

@media (max-width: 760px) {
  .bond-toast-stack {
    right: 12px;
    left: 12px;
    width: auto;
  }
}
