/* ============================================================
   Apartment presence + room gating — js/apartment-presence.js
   Sealed rooms on the floor plan, portrait chips for who's home,
   NOT YET drawer buttons. Lives on top of the viewer styles that
   property-system.js injects inline (#apartmentViewerModal).
   ============================================================ */

/* ── Sealed rooms ─────────────────────────────────────────── */
#apartmentViewerModal .apt-svg-pane svg g.apt-room-locked {
  cursor: not-allowed !important;
}
#apartmentViewerModal .apt-svg-pane svg g.apt-room-locked > rect {
  fill: rgba(58, 50, 56, 0.06);
}
#apartmentViewerModal .apt-lock-veil-rect {
  fill: url(#aptLockHatch);
  stroke: none;
}
#apartmentViewerModal .apt-lock-stamp-bg {
  fill: rgba(235, 230, 216, 0.92);
  stroke: rgba(139, 0, 0, 0.55);
  stroke-width: 1;
}
#apartmentViewerModal .apt-lock-veil-txt {
  font-family: 'Courier New', Courier, monospace;
  font-size: 10px;
  letter-spacing: 2.5px;
  fill: #8B0000;
  opacity: 0.85;
}

/* ── Who's home: portrait chips ───────────────────────────── */
#apartmentViewerModal .apt-npc-ring {
  fill: rgba(235, 230, 216, 0.92);
  stroke: #c4a87a;
  stroke-width: 2.5;
  animation: aptChipBreath 2.6s ease-in-out infinite;
}
@keyframes aptChipBreath {
  0%, 100% { stroke-width: 2.5; }
  50%      { stroke-width: 4; }
}
#apartmentViewerModal .apt-npc-name {
  font-family: 'Courier New', Courier, monospace;
  font-size: 9px;
  letter-spacing: 1.5px;
  fill: #3A3238;
  paint-order: stroke;
  stroke: rgba(235, 230, 216, 0.85);
  stroke-width: 3px;
  stroke-linejoin: round;
}
#apartmentViewerModal .apt-npc-chip.out .apt-npc-ring {
  stroke: #8E7F7F;
  stroke-dasharray: 3 3;
  animation: none;
}
#apartmentViewerModal .apt-npc-chip.out .apt-npc-face {
  opacity: 0.45;
  filter: grayscale(1);
}
#apartmentViewerModal .apt-npc-chip.out .apt-npc-name {
  fill: #8E7F7F;
}

/* ── Drawer: buttons the story hasn't opened ──────────────── */
#apartmentViewerModal .apt-action-btn.apt-action-later {
  opacity: 0.55;
  cursor: not-allowed;
}
#apartmentViewerModal .apt-action-later-tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0 0.3rem;
  font-size: 0.58rem;
  letter-spacing: 2px;
  color: #8B0000;
  border: 1px solid rgba(139, 0, 0, 0.5);
  vertical-align: middle;
}
#apartmentViewerModal .apt-later-note {
  margin: 0.6rem 0 0;
  font-size: 0.72rem;
  font-style: italic;
  color: #8E7F7F;
  text-align: center;
}

/* ── Drawer: a sealed room's card ─────────────────────────── */
#apartmentViewerModal .apt-locked-pane h3 {
  color: #8B0000;
}
#apartmentViewerModal .apt-locked-note {
  margin: 0.8rem 0 1rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #5F5449;
}
#apartmentViewerModal .apt-locked-stamp {
  display: inline-block;
  margin: 0.2rem 0 0.8rem;
  padding: 0.15rem 0.6rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.7rem;
  letter-spacing: 3px;
  color: #8B0000;
  border: 2px solid rgba(139, 0, 0, 0.6);
  transform: rotate(-3deg);
}
