:root {
  --client-arrive: cubic-bezier(.22, 1, .36, 1);
  --client-press: cubic-bezier(.2, .72, .25, 1);
}

.client-shell .illustration {
  background: radial-gradient(ellipse at 65% 13%, #eff7fc 0%, transparent 58%),
    linear-gradient(158deg, #dcecf7 9%, #bcd6ea 100%);
}

.client-content .button.primary {
  background: linear-gradient(107deg, #214473, #2a669d);
}

.client-content .button.primary:hover:not(:disabled) {
  background: linear-gradient(107deg, #19375f, #225788);
}

.client-content .button {
  transition: transform 145ms var(--client-press);
}

.client-content .button:active:not(:disabled, :focus-visible) {
  transform: scale(.982);
}

.client-launch {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  pointer-events: none;
  color: #fff;
  background: radial-gradient(ellipse at 50% 51%, #345884 0%, transparent 49%),
    linear-gradient(155deg, #101b39 14%, #1f3f73 100%);
  animation: client-launch-exit 680ms var(--client-arrive) both;
}

.client-launch-brand {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
  animation: client-mark-arrive 360ms var(--client-arrive) both;
}

.client-launch-brand img {
  width: 65px;
  height: 65px;
  border-radius: 19px;
  box-shadow: 0 4px 20px #08152540;
}

.client-launch-brand strong {
  font-size: clamp(28px, 8vw, 40px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.055em;
}

.client-launch-trail {
  position: absolute;
  z-index: -1;
  inset: -47px auto auto 50%;
  width: 222px;
  height: auto;
  overflow: visible;
  transform: translateX(-50%);
}

.client-opening .client-content {
  animation: client-sheet-arrive 440ms var(--client-arrive) 215ms both;
}

.client-opening .illustration > img {
  animation: client-art-arrive 410ms var(--client-arrive) 190ms both;
}

#sign-in-panel[aria-busy="true"] ~ #auth-status:not(:empty),
#booking-panel [aria-busy="true"] [role="status"]:not(:empty) {
  display: flex;
  align-items: center;
  gap: 8px;
}

#sign-in-panel[aria-busy="true"] ~ #auth-status:not(:empty)::before,
#booking-panel [aria-busy="true"] [role="status"]:not(:empty)::before {
  content: "";
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  border: 1.5px solid #b9d0e2;
  border-right-color: #28649b;
  border-radius: 50%;
  animation: client-activity 700ms linear infinite;
}

@keyframes client-launch-exit {
  0%, 43% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes client-mark-arrive {
  from { opacity: 0; transform: translateY(9px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes client-sheet-arrive {
  from { opacity: 0; transform: translateY(17px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes client-art-arrive {
  from { opacity: .56; translate: 0 7px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes client-activity {
  to { transform: rotate(1turn); }
}

@media (max-width: 700px) {
  body {
    min-height: 100svh;
    padding: 0;
    background: #fff;
  }

  .masthead {
    padding: max(12px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right))
      10px max(18px, env(safe-area-inset-left));
    background: #eaf4fb;
  }

  .client-shell {
    grid-template-columns: minmax(0, 1fr);
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .client-shell .illustration {
    min-height: 0;
    height: clamp(158px, 26svh, 250px);
    padding: 0;
    background: radial-gradient(ellipse at 70% 18%, #f1f8fc 0%, transparent 42%),
      linear-gradient(#eaf4fb, #c5dced 84%);
  }

  .illustration-copy { display: none; }

  .client-shell .illustration::before,
  .client-shell .illustration::after {
    position: absolute;
    z-index: -1;
    width: 88%;
    height: 86%;
    aspect-ratio: auto;
    border: 0;
    border-radius: 50%;
    box-shadow: none;
    content: "";
  }

  .client-shell .illustration::before {
    left: -22%;
    bottom: -47%;
    transform: rotate(-11deg);
    background: #b5cfe3;
  }

  .client-shell .illustration::after {
    right: -23%;
    bottom: -40%;
    transform: rotate(12deg);
    background: #afcbe0;
  }

  .client-shell .illustration > img {
    left: 50%;
    right: auto;
    bottom: 10px;
    width: min(125%, 570px);
    max-width: none;
    max-height: 112%;
    height: auto;
    margin: 0;
    object-fit: contain;
    object-position: center bottom;
    transform: translateX(-50%);
  }

  .client-content {
    position: relative;
    z-index: 1;
    align-content: start;
    margin-top: -22px;
    padding: 28px max(20px, env(safe-area-inset-right)) 18px max(20px, env(safe-area-inset-left));
    border-radius: 28px 28px 0 0;
    background: #fff;
    box-shadow: 0 -6px 26px #34536a12;
  }

  #install-screen,
  #sign-in-panel {
    width: min(100%, 385px);
    margin-inline: auto;
    text-align: center;
  }

  #install-screen .app-icon { margin-inline: auto; }
  #sign-in-panel .app-icon { display: none; }

  #install-screen .intro,
  #sign-in-panel .intro { margin-inline: auto; }

  #auth-status { justify-content: center; text-align: center; }
  .page-footer { padding: 12px 0 max(20px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .client-launch { display: none; }
  .client-opening .client-content,
  .client-opening .illustration > img,
  #sign-in-panel[aria-busy="true"] ~ #auth-status:not(:empty)::before,
  #booking-panel [aria-busy="true"] [role="status"]:not(:empty)::before { animation: none; }
  .client-content .button { transition: none; }
  .client-content .button:active { transform: none; }
}
