.crew-entry-popup {
  --crew-popup-width: min(520px, calc(100vw - 32px), calc((100vh - 168px) * 860 / 1216));
  box-sizing: border-box;
  width: calc(var(--crew-popup-width) + 16px);
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  margin: auto;
  padding: 8px;
  border: 0;
  border-radius: 16px;
  background: #ffffff;
  color: #181818;
  overflow: auto;
  box-shadow: 0 20px 64px rgba(0, 0, 0, 0.3);
}

.crew-entry-popup::backdrop {
  background: rgba(0, 0, 0, 0.62);
}

.crew-popup-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 860 / 1216;
}

.crew-popup-poster iframe {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 860 / 1216;
  border: 0;
  pointer-events: none;
}

.crew-popup-poster-link {
  position: absolute;
  inset: 0;
  border-radius: 8px;
}

.crew-popup-close {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #dddddd;
  border-radius: 50%;
  background: #ffffff;
  color: #202020;
  font: 30px/1 sans-serif;
  cursor: pointer;
}

.crew-popup-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #d91f2b;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}

.crew-popup-cta:hover {
  background: #b91621;
  color: #ffffff;
}

.crew-popup-preference {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 44px;
  margin-top: 4px;
  padding: 4px;
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
}

.crew-popup-preference input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #d91f2b;
  cursor: pointer;
}

.crew-entry-popup :focus-visible {
  outline: 3px solid #123d7c;
  outline-offset: -3px;
}

@supports (height: 100dvh) {
  .crew-entry-popup {
    --crew-popup-width: min(520px, calc(100vw - 32px), calc((100dvh - 168px) * 860 / 1216));
    max-height: calc(100dvh - 16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .crew-entry-popup,
  .crew-entry-popup * { scroll-behavior: auto; transition: none; animation: none; }
}
