/* Porthole opening (see intro.js). Always black, as on the 2003 original, in light or dark theme. */
html.ph-lock, html.ph-lock body { overflow: hidden; }
.ph-intro {
  position: fixed; inset: 0; z-index: 9999; background: #000; color: #C0C0C0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2.2vmin; padding: 16px; box-sizing: border-box;
  transition: opacity .6s ease;
}
.ph-intro.ph-out { opacity: 0; pointer-events: none; }
.ph-title {
  margin: 0; font: 600 clamp(20px, 4.2vmin, 38px)/1.15 Georgia, "Times New Roman", serif;
  color: #fff; letter-spacing: .02em; text-align: center;
  opacity: 0; animation: ph-fade .9s ease 2.3s forwards;
}
.ph-by {
  margin: 0; font: clamp(14px, 2.4vmin, 20px)/1.3 Verdana, Arial, sans-serif; color: #C0C0C0;
  opacity: 0; animation: ph-fade .9s ease 2.6s forwards;
}
.ph-stage {
  position: relative; aspect-ratio: 417 / 414;
  width: min(86vw, 62vh, 560px);
}
.ph-piece, .ph-win, .ph-enter {
  position: absolute; display: block; background-image: var(--ph-img); background-repeat: no-repeat;
}
.ph-piece {
  transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0;
  animation: ph-in .85s cubic-bezier(.2, .9, .25, 1.08) var(--dl) forwards;
}
.ph-win {
  border: 0; padding: 0; margin: 0; cursor: pointer; background-color: transparent;
  opacity: 0; animation: ph-fade .5s ease .95s forwards;
}
/* The glass: a black disc, then the blast opening out from the centre like an iris.
   The steel ring inside the window stays solid the whole time. */
.ph-disc, .ph-glass { position: absolute; inset: 0; display: block; }
.ph-disc { background: #000; clip-path: circle(49.2% at 50.9% 53.7%); }
.ph-glass {
  background-image: var(--ph-img); background-repeat: no-repeat;
  clip-path: circle(0% at 50.9% 53.7%);
  animation: ph-open 1.2s cubic-bezier(.6, 0, .25, 1) 1.35s forwards;
}
.ph-win:focus { outline: none; }
.ph-win:focus-visible { outline: 3px solid #D9B45C; outline-offset: -6px; }
.ph-enter {
  inset: 0; background-image: var(--ph-enter); opacity: 0; transition: opacity .25s ease;
}
.ph-win:hover .ph-enter, .ph-win:focus-visible .ph-enter { opacity: 1; }
.ph-skip {
  position: absolute; top: 14px; right: 16px; background: none; color: #8a8a8a;
  border: 1px solid #444; border-radius: 6px; padding: 6px 12px; font: 13px/1 Verdana, Arial, sans-serif;
  cursor: pointer;
}
.ph-skip:hover, .ph-skip:focus-visible { color: #fff; border-color: #888; }
@keyframes ph-in { to { transform: none; opacity: 1; } }
@keyframes ph-open {
  0%   { clip-path: circle(0% at 50.9% 53.7%); filter: brightness(2.4); }
  60%  { filter: brightness(1.5); }
  100% { clip-path: circle(49.5% at 50.9% 53.7%); filter: none; }
}
@keyframes ph-fade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .ph-piece, .ph-win, .ph-glass, .ph-title, .ph-by { animation: none; transform: none; opacity: 1; }
  .ph-glass { clip-path: circle(49.5% at 50.9% 53.7%); }
}
@media print { .ph-intro { display: none; } }
