.level-wall-poster[data-poster-src] {
  transition:
    filter 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
}

.level-wall-poster[data-poster-src]::selection {
  background: transparent;
}

.level-wall-poster.is-nearby {
  filter:
    drop-shadow(0 0 10px rgba(123, 223, 242, 0.54))
    drop-shadow(0 0 18px rgba(255, 209, 102, 0.32));
  box-shadow:
    0 0 0 5px rgba(123, 223, 242, 0.52),
    9px 11px 0 rgba(0, 0, 0, 0.27),
    inset -6px -6px rgba(0, 0, 0, 0.05);
}

.poster-viewer-prompt {
  position: absolute;
  z-index: 42;
  min-width: 178px;
  max-width: 245px;
  padding: 8px 11px;
  border: 3px solid #10151a;
  border-radius: 8px;
  color: #10151a;
  background: #fffefd;
  box-shadow: 5px 7px 0 rgba(0, 0, 0, 0.28);
  font-size: 0.78rem;
  font-weight: 1000;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
  transform: translateX(-50%);
}

.poster-viewer-prompt[hidden] {
  display: none;
}

.poster-viewer-prompt::after {
  content: "";
  position: absolute;
  left: calc(50% - 8px);
  bottom: -10px;
  width: 16px;
  height: 16px;
  border-right: 3px solid #10151a;
  border-bottom: 3px solid #10151a;
  background: #fffefd;
  transform: rotate(45deg);
}

.poster-viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 84;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(7, 11, 18, 0.82);
}

.poster-viewer-overlay[hidden] {
  display: none;
}

.poster-viewer-modal {
  width: min(1180px, 100%);
  height: min(780px, calc(100dvh - 36px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 3px solid #7bdff2;
  border-radius: 8px;
  background: #08111d;
  box-shadow:
    0 0 0 5px rgba(15, 28, 42, 0.88),
    0 24px 80px rgba(0, 0, 0, 0.58);
}

.poster-viewer-head,
.poster-viewer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background:
    linear-gradient(180deg, rgba(123, 223, 242, 0.16), transparent),
    #0c1927;
}

.poster-viewer-kicker {
  margin: 0 0 2px;
  color: #ffd166;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.poster-viewer-title,
.poster-viewer-description {
  margin: 0;
}

.poster-viewer-title {
  color: #f4f7ec;
  font-size: 1.1rem;
}

.poster-viewer-frame {
  min-height: 0;
  display: grid;
  align-items: start;
  justify-items: center;
  overflow: auto;
  padding: 14px;
  background:
    radial-gradient(ellipse at 50% 24%, rgba(123, 223, 242, 0.12), transparent 38%),
    #050a11;
}

.poster-viewer-image {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  border: 4px solid #f4f7ec;
  background: #f4f7ec;
  box-shadow: 10px 12px 0 rgba(0, 0, 0, 0.32);
}

.poster-viewer-description {
  min-width: 0;
  color: #c4f4ea;
  font-weight: 800;
}

.poster-viewer-close {
  width: 44px;
  min-height: 40px;
  border: 2px solid #7bdff2;
  border-radius: 0;
  color: #ffffff;
  background: #102238;
  font-size: 1.55rem;
  font-weight: 1000;
  cursor: pointer;
}

.poster-viewer-open {
  overflow: hidden;
}

@media (orientation: landscape) and (max-height: 560px) {
  .poster-viewer-overlay {
    padding: 6px;
    place-items: stretch;
  }

  .poster-viewer-modal {
    width: min(100%, 1120px);
    height: calc(100dvh - 12px);
    justify-self: center;
  }

  .poster-viewer-head,
  .poster-viewer-actions {
    min-height: 0;
    padding: 7px 12px;
  }

  .poster-viewer-title {
    font-size: 0.98rem;
  }

  .poster-viewer-close {
    width: 38px;
    min-height: 34px;
    font-size: 1.28rem;
  }

  .poster-viewer-description {
    font-size: 0.84rem;
    line-height: 1.2;
  }

  .poster-viewer-frame {
    padding: 8px;
  }
}

@media (max-width: 768px) and (orientation: portrait) {
  .poster-viewer-overlay {
    padding: 6px;
    place-items: stretch;
  }

  .poster-viewer-modal {
    width: 100%;
    height: calc(100dvh - 12px);
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .poster-viewer-head,
  .poster-viewer-actions {
    padding: 9px 10px;
  }

  .poster-viewer-title {
    font-size: 1rem;
  }

  .poster-viewer-close {
    width: 38px;
    min-height: 36px;
    font-size: 1.35rem;
  }

  .poster-viewer-frame {
    justify-items: start;
    padding: 10px;
    background: #f4f7ec;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .poster-viewer-image {
    width: max(100%, 860px);
    max-width: none;
    border-width: 3px;
    box-shadow: 7px 8px 0 rgba(0, 0, 0, 0.24);
  }

  .poster-viewer-description {
    font-size: 0.9rem;
    line-height: 1.25;
  }
}
