/* Drop-in room extras. Every selector is limited to the injected route or
   room-extra classes so the existing era systems keep control of the site. */

.room-stage > .room-extra-hotspot {
  position: absolute;
  z-index: 4;
  display: block;
  min-width: 0;
  min-height: 0;
  margin: 0 !important;
  padding: 0 !important;
  appearance: none;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: transparent !important;
  font-size: 0;
  line-height: 0;
  text-decoration: none !important;
  cursor: pointer;
  transform: none !important;
  touch-action: manipulation;
}

.room-stage > .room-extra-hotspot::before,
.room-stage > .room-extra-hotspot::after {
  display: none !important;
  content: none !important;
}

.room-stage > .room-extra-hotspot:hover,
.room-stage > .room-extra-hotspot:active {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.room-stage > .room-extra-hotspot:focus-visible {
  outline: 2px dotted #fff !important;
  outline-offset: -3px;
}

.room-stage > .nintendo-door-entry {
  z-index: 4;
  cursor: e-resize;
}

.room-stage > .beast-mommy-trigger,
.room-stage > .mcluhan-book-link {
  z-index: 6;
}

.room-stage > .austin-pet-hotspot,
.room-stage > .austin-tote-link {
  z-index: 4;
}

/* Existing story, map, and Austin secret targets retain priority wherever
   their hit areas touch one of these larger object silhouettes. */
.room-stage > .room-story-secret,
.room-stage > .room-map-gateway {
  z-index: 7;
}

#nintendo.room-extra-page {
  width: min(960px, calc(100% - 1rem));
  max-width: 960px;
}

#nintendo .nintendo-intro {
  max-width: 54ch;
}

#nintendo .nintendo-room-illustration {
  margin-bottom: 1.25rem;
}

#nintendo .nintendo-room-stage {
  overflow: hidden;
}

#nintendo .nintendo-room-stage > img {
  display: block;
  width: 100%;
  height: auto;
}

#nintendo .nintendo-return-door {
  z-index: 5;
  cursor: w-resize;
}

#nintendo .nintendo-seat {
  z-index: 6;
  cursor: pointer;
}

#nintendo .nintendo-player-panel {
  margin: 1.25rem 0 2rem;
  padding: clamp(1rem, 3vw, 1.6rem);
  border: 2px solid currentColor;
  background: rgba(255, 255, 255, .94);
  color: #17131d;
  box-shadow: 7px 7px 0 rgba(0, 0, 0, .28);
}

#nintendo .nintendo-player-panel[hidden] {
  display: none !important;
}

#nintendo .nintendo-player-panel h4,
#nintendo .nintendo-player-panel h5 {
  color: inherit;
}

#nintendo .nintendo-player-panel h4 {
  margin: 0 0 .35rem;
  font-size: clamp(1.25rem, 3vw, 1.8rem);
}

#nintendo .nintendo-player-panel h5 {
  margin: 0 0 .3rem;
  font-size: 1.15rem;
}

#nintendo .nintendo-choice-prompt,
#nintendo .nintendo-game-note,
#nintendo .nintendo-dad-label,
#nintendo .nintendo-dialogue-provenance,
#nintendo .nintendo-footage-note {
  margin: .45rem 0;
}

#nintendo .nintendo-game-choices {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .8rem 0 1rem;
}

#nintendo .nintendo-game-button,
#nintendo .nintendo-watch-button {
  min-height: 2.75rem;
  padding: .58rem .78rem;
  border: 1px solid #17131d;
  border-radius: 0;
  background: #fff;
  color: #17131d;
  box-shadow: 3px 3px 0 #17131d;
  font: 700 .9rem/1.2 Arial, sans-serif;
  text-align: left;
  cursor: pointer;
}

#nintendo .nintendo-game-button:hover,
#nintendo .nintendo-game-button:focus-visible,
#nintendo .nintendo-watch-button:hover,
#nintendo .nintendo-watch-button:focus-visible {
  outline: 2px solid #6b2fa1;
  outline-offset: 2px;
}

#nintendo .nintendo-game-button[aria-pressed="true"] {
  background: #291044;
  color: #fff;
}

#nintendo .nintendo-game-card {
  padding: 1rem;
  border: 1px solid rgba(23, 19, 29, .35);
  background: #fff;
}

#nintendo .nintendo-dad-label {
  font-weight: 700;
}

#nintendo .nintendo-dad-lines {
  margin: .55rem 0 .75rem;
  padding-left: 1.35rem;
}

#nintendo .nintendo-dad-lines li + li {
  margin-top: .45rem;
}

#nintendo .nintendo-dialogue-provenance,
#nintendo .nintendo-footage-note,
#nintendo .nintendo-video-placeholder {
  font-size: .78rem;
  line-height: 1.45;
  opacity: .78;
}

#nintendo .nintendo-watch-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem 1rem;
  margin: 1rem 0;
}

#nintendo .nintendo-video-fallback {
  color: #381064 !important;
}

#nintendo .nintendo-video-shell {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 4.5rem;
  margin-top: .75rem;
  border: 1px solid rgba(23, 19, 29, .35);
  background: #100d15;
  color: #fff;
}

#nintendo .nintendo-video-shell iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

#nintendo .nintendo-video-placeholder {
  margin: 0;
  padding: 1rem;
  text-align: center;
}

#nintendo .nintendo-bottom-back {
  margin: 1.25rem 0 0;
}

.beast-mommy-dialog {
  width: min(92vw, 570px);
  max-height: 92vh;
  padding: 0;
  border: 2px solid #211528;
  background: #fff9ed;
  color: #211528;
  box-shadow: 12px 12px 0 rgba(16, 0, 38, .48);
}

.beast-mommy-dialog::backdrop {
  background: rgba(16, 0, 38, .72);
  backdrop-filter: blur(2px);
}

.beast-mommy-dialog.is-fallback-open {
  position: fixed;
  z-index: 1000;
  inset: 4vh auto auto 50%;
  display: block;
  transform: translateX(-50%);
}

.beast-mommy-figure {
  margin: 0;
  padding: 1rem 1rem .5rem;
}

.beast-mommy-figure img {
  display: block;
  width: 100%;
  max-height: 74vh;
  object-fit: contain;
}

.beast-mommy-figure figcaption {
  padding: .75rem .25rem .35rem;
  font: 700 1rem/1.35 Georgia, serif;
  text-align: center;
  text-transform: lowercase;
}

.beast-mommy-close {
  display: block;
  min-width: 6rem;
  min-height: 2.75rem;
  margin: 0 auto 1rem;
  padding: .5rem .9rem;
  border: 1px solid #211528;
  border-radius: 0;
  background: #fff;
  color: #211528;
  font: 700 .9rem/1 Arial, sans-serif;
  cursor: pointer;
}

.beast-mommy-close:focus-visible {
  outline: 3px solid #713aa1;
  outline-offset: 2px;
}

.room-extra-status {
  position: absolute;
  z-index: 9;
  left: 50%;
  bottom: 2.5%;
  width: min(76%, 34rem);
  margin: 0;
  padding: .65rem .85rem;
  border: 2px solid #2b2420;
  border-radius: 999px;
  background: #fff8dc;
  color: #2b2420;
  box-shadow: 4px 4px 0 rgba(43, 36, 32, .32);
  font: 700 clamp(.72rem, 2vw, .92rem)/1.35 Arial, sans-serif;
  text-align: center;
  pointer-events: none;
  transform: translateX(-50%);
}

.room-extra-status[hidden] {
  display: none !important;
}

.room-extra-status.is-speaking {
  animation: room-extra-status-in .2s ease-out;
}

@keyframes room-extra-status-in {
  from { opacity: 0; transform: translate(-50%, .4rem); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 620px) {
  #nintendo.room-extra-page {
    width: calc(100% - .5rem);
  }

  #nintendo .nintendo-game-choices,
  #nintendo .nintendo-watch-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  #nintendo .nintendo-game-button,
  #nintendo .nintendo-watch-button {
    width: 100%;
  }

  .room-extra-status {
    bottom: 1.5%;
    width: 84%;
    padding: .45rem .6rem;
    border-radius: .5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .room-extra-status.is-speaking {
    animation: none;
  }
}
