/* ═══ doors.css — Hub, Pink floating gallery, back buttons, toast ═══ */

/* ── shared Back / Return to Doors ───────────────────── */
.back-btn {
  position: absolute; top: 18px; left: 18px; z-index: 30;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(36,16,32,.75); color: var(--baby-pink);
  border: 1px solid rgba(236,121,187,.45);
  border-radius: 999px; padding: 10px 18px;
  font-size: .88rem; letter-spacing: .03em;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  transition: transform .15s ease, box-shadow .2s ease;
}
.back-btn:hover { transform: translateY(-1px); box-shadow: 0 0 20px rgba(236,121,187,.5); }

/* ── HUB ─────────────────────────────────────────────── */
.hub-doors {
  display: flex; gap: clamp(18px, 4vw, 54px);
  align-items: stretch; justify-content: center; flex-wrap: wrap;
}
.hub-door {
  appearance: none; position: relative;
  width: clamp(230px, 26vw, 300px);
  background: var(--plum-70);
  border: 1px solid rgba(236,121,187,.30);
  border-radius: 22px;
  padding: 26px 20px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  box-shadow: 0 22px 60px rgba(0,0,0,.5);
  backdrop-filter: blur(6px);
  transition: transform .25s ease, box-shadow .3s ease, border-color .25s ease;
}
.hub-door:hover { transform: translateY(-8px); border-color: rgba(236,121,187,.6);
  box-shadow: 0 26px 70px rgba(0,0,0,.55), 0 0 40px rgba(236,121,187,.25); }
.hub-num {
  position: absolute; top: 12px; left: 16px;
  font-family: var(--font-display); font-size: 1.5rem;
  color: rgba(236,121,187,.5);
}
.hub-door .door-art { width: clamp(110px, 11vw, 150px); height: auto;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.55)); transition: filter .25s ease; }
.hub-door:hover .door-art { filter: drop-shadow(0 0 24px rgba(236,121,187,.8)); }
.hub-name {
  font-family: var(--font-body); font-size: 1.02rem; letter-spacing: .14em;
  color: var(--soft-white);
}
.hub-status {
  font-family: var(--font-ui); font-size: .74rem; letter-spacing: .06em;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid rgba(249,234,243,.25); color: rgba(249,234,243,.65);
}
.hub-status.done {
  color: var(--baby-pink); border-color: rgba(236,121,187,.65);
  background: rgba(236,121,187,.14);
}
.hub-status.locked { color: rgba(249,234,243,.5); }
.hub-door.done { border-color: rgba(236,121,187,.45); }
.hub-door.done .hub-num { color: var(--soft-pink); }
.hub-door.locked { opacity: .75; }
.hub-door.locked .door-art { filter: grayscale(.45) brightness(.7); }
.hub-door.locked:hover .door-art { filter: grayscale(.3) brightness(.85) drop-shadow(0 0 18px rgba(236,121,187,.4)); }
.hub-lock {
  position: absolute; top: 12px; right: 14px;
  width: 30px; height: 30px; display: grid; place-items: center;
  background: rgba(9,7,13,.7); border: 1px solid rgba(236,121,187,.5);
  border-radius: 50%;
}
.hub-lock svg { width: 15px; height: 15px; }
.hub-toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(10px);
  z-index: 50; max-width: min(480px, 88vw);
  background: var(--soft-white); color: var(--dark-plum);
  font-size: .92rem; line-height: 1.5; text-align: center;
  padding: 12px 20px; border-radius: 16px;
  box-shadow: 0 16px 44px rgba(0,0,0,.55);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
.hub-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── PINK — Floating Memories ────────────────────────── */
#scene-pink { overflow: hidden; }
.float-wrap {
  position: relative;
  width: min(1150px, 94vw);
  height: min(680px, 74vh);
  margin: 0 auto;
}
.float-photo {
  appearance: none; position: absolute; padding: 8px 8px 26px;
  background: var(--soft-white); border: none;
  box-shadow: 0 14px 34px rgba(0,0,0,.55), 0 0 24px rgba(236,121,187,.18);
  transform: rotate(var(--rot, 0deg));
  animation: floatDrift var(--dur, 6s) ease-in-out infinite alternate;
  transition: box-shadow .3s ease;
  will-change: transform;
}
.float-photo img {
  display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
}
.float-photo:hover {
  box-shadow: 0 18px 44px rgba(0,0,0,.6), 0 0 44px rgba(236,121,187,.55);
  z-index: 20;
}
@keyframes floatDrift {
  from { transform: rotate(var(--rot, 0deg)) translateY(0); }
  to   { transform: rotate(var(--rot, 0deg)) translateY(-9px); }
}
/* curated coordinates — desktop (verified collision-free, wrap 1150×666) */
.fp1 { left: 3%;  top: 3%;  width: 195px; --rot: -4deg; --dur: 6.2s; }
.fp2 { left: 24%; top: 1%;  width: 170px; --rot: 3deg;  --dur: 7.1s; }
.fp3 { left: 44%; top: 4%;  width: 205px; --rot: -2deg; --dur: 5.6s; }
.fp4 { left: 66%; top: 1%;  width: 180px; --rot: 4deg;  --dur: 6.8s; }
.fp5 { left: 84%; top: 12%; width: 160px; --rot: -3deg; --dur: 5.9s; }
.fp6 { left: 5%;  top: 58%; width: 180px; --rot: 2deg;  --dur: 7.4s; }
.fp7 { left: 28%; top: 56%; width: 205px; --rot: -5deg; --dur: 6.5s; }
.fp8 { left: 54%; top: 60%; width: 175px; --rot: 3deg;  --dur: 5.7s; }
.fp9 { left: 75%; top: 55%; width: 195px; --rot: -2deg; --dur: 6.9s; }

/* enlarged view */
.pink-view {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(9,7,13,.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 4vh 4vw;
}
.pink-view[hidden] { display: none; }
.pv-figure {
  margin: 0; max-width: min(880px, 94vw);
  display: flex; justify-content: center;
}
.pv-figure img {
  max-width: 100%; max-height: 50vh; object-fit: contain;
  border: 6px solid var(--soft-white); border-radius: 4px;
  box-shadow: 0 0 70px rgba(236,121,187,.45);
}
.pv-card {
  max-width: min(560px, 92vw);
  background: var(--soft-white); color: var(--dark-plum);
  border-radius: 16px; padding: 18px 24px; text-align: center;
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
}
.pv-card h3 {
  margin: 0 0 8px; font-family: var(--font-display); font-weight: 400;
  font-size: 1.25rem; color: #b04f86;
}
.pv-card p { margin: 0; font-family: var(--font-body); font-size: 1.04rem; line-height: 1.65; }
.pv-close {
  position: absolute; top: 18px; right: 22px;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(36,16,32,.85); color: var(--soft-white);
  border: 1px solid rgba(236,121,187,.55); font-size: 1.15rem;
}

/* tablet (verified collision-free, wrap 800×600) */
@media (max-width: 1020px) {
  .float-wrap { width: 96vw; height: min(620px, 68vh); }
  .fp1 { left: 2%;    top: 5%;  width: 160px; }
  .fp2 { left: 25%;   top: 1%;  width: 140px; }
  .fp3 { left: 46%;   top: 5%;  width: 165px; }
  .fp4 { left: 68.5%; top: 1%;  width: 145px; }
  .fp5 { left: 84%;   top: 56%; width: 100px; }
  .fp6 { left: 1%;    top: 60%; width: 145px; }
  .fp7 { left: 21.5%; top: 56%; width: 165px; }
  .fp8 { left: 45%;   top: 60%; width: 135px; }
  .fp9 { left: 63.5%; top: 58%; width: 145px; }
}

/* mobile (verified collision-free, wrap 374×523) */
@media (max-width: 600px) {
  .float-wrap { width: 96vw; height: 66vh; min-height: 500px; }
  .fp1 { left: 2%;  top: 1%;  width: 100px; }
  .fp2 { left: 36%; top: 3%;  width: 88px;  }
  .fp3 { left: 67%; top: 1%;  width: 102px; }
  .fp4 { left: 7%;  top: 33%; width: 90px;  }
  .fp5 { left: 37%; top: 35%; width: 106px; }
  .fp6 { left: 70%; top: 33%; width: 90px;  }
  .fp7 { left: 2%;  top: 66%; width: 100px; }
  .fp8 { left: 36%; top: 69%; width: 88px;  }
  .fp9 { left: 67%; top: 66%; width: 100px; }
  .pv-figure img { max-height: 44vh; border-width: 4px; }
  .pv-card { padding: 14px 18px; max-height: 30vh; overflow-y: auto; }
  .back-btn { top: 12px; left: 12px; padding: 9px 14px; font-size: .82rem; }
}

/* mobile hub: compact cards so the whole hub fits without scrolling under fixed UI */
@media (max-width: 600px) {
  #scene-hub { justify-content: flex-start; padding-top: 76px; }
  .hub-doors { gap: 10px; }
  .hub-door { width: min(290px, 84vw); padding: 10px 12px 9px; gap: 5px; }
  .hub-door .door-art { width: 48px; }
  .hub-num { font-size: 1rem; top: 7px; left: 11px; }
  .hub-name { font-size: .8rem; letter-spacing: .09em; }
  .hub-status { font-size: .6rem; padding: 3px 9px; }
  .hub-lock { width: 22px; height: 22px; top: 7px; right: 9px; }
  .hub-lock svg { width: 11px; height: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .float-photo { animation: none; }
}
