/* 「协议启动！」 over BATTLE_CHECK (ui/protocolBoot.js), after upstream 0.3.3: the official battleReady/* sprites and
   settle/common_logo on one 1920×1080 stage. --px is one design px, fitted to the viewport (positions, sizes and motion
   read off the event's footage by upstream, video 7:43–7:51; [ASSUMED·화면] the timings, estimated frame by frame).
   From black the ship builds up out of torn blocks, near white (0.1–0.4 s), shrinks into the ring as it darkens (to
   1.2 s); the panel comes with a teal wash over the screen (1.2–1.9 s), the cards open out from their avatars, white
   first, 协议启动！ settles from large, 正在连接… last (in by 2.1 s). It stays at least screens/game.js BOOT_MIN_MS and
   until BATTLE_CHECK ends, then fades (.is-leaving, BOOT_LEAVE_MS 350 ms). */
.pboot {
  --px: min(.01rem, calc(100vw / 1920), calc(100vh / 1080));
  --teal: #3fd6b4;
  --teal-deep: #0c2a25;
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; overflow: hidden; pointer-events: none;
  background: radial-gradient(ellipse at 50% 42%, #0d2621, #040b0a 70%);
}
.pboot.is-leaving { animation: pboot-out 350ms ease-in forwards; }
.pboot__stage { position: relative; width: calc(1920 * var(--px)); height: calc(1080 * var(--px)); }
.pboot__stage > *, .pboot__scene > * { position: absolute; }
.pboot__scene { inset: 0; animation: pboot-in 200ms 1200ms ease-out both; }
.pboot::after { content: ''; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; opacity: 0;
  background: radial-gradient(ellipse at 50% 45%, rgba(150, 255, 225, .7), rgba(63, 214, 180, .45) 70%); animation: pboot-wash 700ms 1200ms ease-out forwards; }
/* behind: the two mountains (top left, bottom right), the contour map and the ring around the ship, the mark above */
.pboot__mtn { opacity: .55; }
.pboot__mtn--1 { left: calc(-60 * var(--px)); top: calc(-40 * var(--px)); width: calc(750 * var(--px)); }
.pboot__mtn--2 { right: calc(-40 * var(--px)); bottom: calc(-60 * var(--px)); width: calc(560 * var(--px)); }
.pboot__terrain, .pboot__logo { display: block; background: var(--teal); -webkit-mask: var(--src) center / 100% 100% no-repeat; mask: var(--src) center / 100% 100% no-repeat; }
.pboot__terrain { left: calc(365 * var(--px)); top: calc(-8 * var(--px)); width: calc(1190 * var(--px)); height: calc(916 * var(--px)); opacity: .3; }
.pboot__ring { left: calc(525 * var(--px)); top: calc(15 * var(--px)); width: calc(870 * var(--px)); height: calc(870 * var(--px)); opacity: .55; }
.pboot__logo { left: calc(705 * var(--px)); top: calc(277 * var(--px)); width: calc(247 * var(--px)); height: calc(125 * var(--px)); opacity: .7; }
.pboot__cross { left: calc((var(--x) - 30) * var(--px)); top: calc((var(--y) - 30) * var(--px)); width: calc(60 * var(--px)); height: calc(60 * var(--px));
  background: linear-gradient(var(--teal), var(--teal)) center / 100% calc(3 * var(--px)) no-repeat,
    linear-gradient(var(--teal), var(--teal)) center / calc(3 * var(--px)) 100% no-repeat; opacity: .8; }
/* the Rhodes Island ship (battleReady/rhodes 299×500, ×1.35, turned 53°): out of the whole screen in bright teal into the middle */
.pboot__ship { left: calc(773 * var(--px)); top: calc(112 * var(--px)); width: calc(404 * var(--px)); height: calc(675 * var(--px));
  transform: rotate(53deg); will-change: transform, opacity; animation: pboot-ship 1100ms 100ms cubic-bezier(.4, 0, .3, 1) both; }
/* transform and opacity only, so it runs on the compositor while the match screen sets up its scene under it (the main
   thread is busy ~0.7 s right then): the near-white build-up is a brightened copy fading out, torn sideways a step at a
   time */
.pboot__shipimg { display: block; width: 100%; height: 100%; }
.pboot__shipimg--hot { position: absolute; inset: 0; filter: brightness(2.6) saturate(.3); will-change: transform, opacity;
  animation: pboot-hot 900ms 100ms linear both, pboot-tear 320ms 100ms steps(1, end) both; }
.pboot__lines { inset: 0; width: 100%; height: 100%; overflow: visible; }
.pboot__lines line { stroke: var(--teal); stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: 1; animation: pboot-draw 300ms calc(1250ms + var(--i) * 60ms) ease-out forwards; }
.pboot__node, .pboot__anchor { fill: var(--teal); opacity: 0; animation: pboot-show 150ms calc(1400ms + var(--i) * 60ms) forwards; }
.pboot__anchor { fill: var(--teal-deep); stroke: var(--teal); stroke-width: 4; }
/* the doctors' cards: a teal bar, the number / COMPLETE / ✓ and the avatar at the inner end (01 / 03 left, 02 / 04 right) */
.pboot__card {
  left: calc(var(--x) * var(--px)); top: calc(var(--y) * var(--px)); width: calc(515 * var(--px)); height: calc(127 * var(--px));
  display: flex; align-items: center; justify-content: flex-end; gap: calc(14 * var(--px)); padding: 0 calc(4 * var(--px));
  background: linear-gradient(90deg, rgba(63, 214, 180, .78), rgba(63, 214, 180, .95)); color: var(--teal-deep);
  transform-origin: 100% 50%; animation: pboot-card 420ms calc(1200ms + var(--i) * 40ms) cubic-bezier(.2, .8, .2, 1) both;
}
.pboot__card--r { flex-direction: row-reverse; background: linear-gradient(270deg, rgba(63, 214, 180, .78), rgba(63, 214, 180, .95)); transform-origin: 0 50%; }
.pboot__card--c { transform-origin: 50% 50%; }
/* a solo run: the one card under the ring, the words lower (the footage, video 7:50) */
.pboot--solo .pboot__title { top: calc(805 * var(--px)); }
.pboot--solo .pboot__sub { top: calc(938 * var(--px)); }
.pboot__txt { display: grid; justify-items: end; line-height: 1; }
.pboot__card--r .pboot__txt { justify-items: start; }
.pboot__num { font-family: var(--font-display); font-size: calc(54 * var(--px)); font-weight: 700; }
.pboot__done { font-family: var(--font-display); font-size: calc(16 * var(--px)); letter-spacing: .06em; margin-top: calc(2 * var(--px)); }
.pboot__check { display: grid; place-items: center; width: calc(26 * var(--px)); height: calc(26 * var(--px)); margin-top: calc(10 * var(--px));
  background: var(--teal-deep); color: #fff; }
.pboot__check .icon { width: 80%; height: 80%; }
.pboot__face { flex: none; width: calc(119 * var(--px)); height: calc(119 * var(--px)); border: calc(2 * var(--px)) solid #e9fffa; background: var(--teal-deep); overflow: hidden; }
.pboot__face .pavatar { --pa: 100%; width: 100%; height: 100%; }
.pboot__face .pavatar__img, .pboot__face img { width: 100%; height: 100%; object-fit: cover; }
/* 协议启动！ / STRONGHOLD PROTOCOL / 正在连接… */
.pboot__title { left: 0; right: 0; top: calc(705 * var(--px)); margin: 0; text-align: center; font-size: calc(66 * var(--px)); font-weight: 900;
  letter-spacing: .04em; color: var(--teal); text-shadow: 0 0 calc(18 * var(--px)) rgba(63, 214, 180, .45); animation: pboot-title 420ms 1200ms cubic-bezier(.2, .8, .2, 1) both; }
.pboot__sub { left: calc(782 * var(--px)); top: calc(838 * var(--px)); width: calc(356 * var(--px)); height: calc(30 * var(--px)); display: grid; place-items: center;
  background: var(--teal); color: var(--teal-deep); font-family: var(--font-display); font-size: calc(20 * var(--px)); letter-spacing: .08em;
  animation: pboot-in 200ms 1300ms both; }
.pboot__conn { right: calc(165 * var(--px)); top: calc(995 * var(--px)); font-size: calc(26 * var(--px)); color: rgba(63, 214, 180, .7); animation: pboot-in 200ms 1900ms both; }
.pboot__dots::after { content: '…'; display: inline-block; width: 1.2em; overflow: hidden; vertical-align: bottom; animation: pboot-dots 1.2s steps(4, end) infinite; }
.pboot__veil { inset: 0; position: absolute; background: #000; animation: pboot-veil 160ms 60ms ease-out both; }
@keyframes pboot-veil { from { opacity: 1; } to { opacity: 0; } }
@keyframes pboot-in { from { opacity: 0; } }
@keyframes pboot-show { to { opacity: 1; } }
@keyframes pboot-out { to { opacity: 0; } }
@keyframes pboot-wash { 0% { opacity: 1; } 30% { opacity: .75; } 100% { opacity: 0; } }
@keyframes pboot-ship {
  0% { transform: rotate(53deg) scale(4.4); opacity: 0; }
  8% { opacity: 1; }
  30% { transform: rotate(53deg) scale(3.5); }
  100% { transform: rotate(53deg) scale(1); opacity: .6; }
}
@keyframes pboot-hot { 0% { opacity: 0; } 10%, 40% { opacity: 1; } 75%, 100% { opacity: 0; } }
@keyframes pboot-tear {
  0% { transform: translateX(-4%); } 20% { transform: translateX(3%); } 40% { transform: translateX(-2%); }
  60% { transform: translateX(1.2%); } 80% { transform: translateX(-.5%); } 100% { transform: none; }
}
@keyframes pboot-draw { to { stroke-dashoffset: 0; } }
@keyframes pboot-card { 0% { opacity: 0; transform: scaleX(.55); filter: brightness(2.4) saturate(.25); } 30% { opacity: 1; } 60% { filter: brightness(1.5) saturate(.6); } 100% { opacity: 1; transform: none; filter: none; } }
@keyframes pboot-title { 0% { opacity: 0; transform: scale(1.3); filter: brightness(2) blur(3px); } 40% { opacity: 1; } 100% { transform: none; filter: none; } }
@keyframes pboot-dots { from { width: 0; } to { width: 1.2em; } }
@media (prefers-reduced-motion: reduce) {
  .pboot, .pboot *, .pboot *::after { animation: none; }
  .pboot::after { display: none; }
  .pboot__ship { opacity: .6; }
  .pboot__shipimg--hot { display: none; }
  .pboot__lines line { stroke-dashoffset: 0; animation: none; }
  .pboot__node, .pboot__anchor { opacity: 1; }
  .pboot__veil { opacity: 0; }
}
/* the 8-player mode: four rows of cards, a little lower each */
.pboot--8 .pboot__card { height: calc(112 * var(--px)); }
.pboot--8 .pboot__face { width: calc(104 * var(--px)); height: calc(104 * var(--px)); }
.pboot--8 .pboot__num { font-size: calc(46 * var(--px)); }
