/* Shared by the live WebApp loading screen and rendered Apple startup images. */
html, body { height: 100%; }
body { margin: 0; overflow: hidden; background: #fcfaf6; }
#root { display: flex; height: 100%; flex: 1; }
.webapp-launch {
  position: fixed; inset: 0; display: flex; justify-content: center;
  background: #fcfaf6; pointer-events: none;
}
#root:not(:empty) + .webapp-launch { display: none; }
.xs-screen {
  --xs-gold: #bc852b; --xs-ink: #312b24; --xs-muted: #7b7060;
  width: 100%; max-width: 480px; height: 100%; position: relative;
  isolation: isolate; overflow: hidden; background: #fcfaf6; color: var(--xs-ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.xs-screen::before {
  content: ""; position: absolute; inset: 0; z-index: -3;
  background: linear-gradient(135deg, #fff9 0%, #fff0 46%, #d5aa4115 100%),
    url("/webapp/brand-background.png") center / cover;
  opacity: .55;
}
.xs-screen::after {
  content: ""; position: absolute; z-index: -2; width: 138%; aspect-ratio: 1;
  top: 3%; left: -19%; background: radial-gradient(ellipse, #fff 0%, #fff9 35%, #fff0 68%);
}
.xs-light {
  position: absolute; width: 170%; height: 47%; bottom: -14%; left: -52%;
  transform: rotate(-26deg); border-radius: 50%; z-index: -1;
  background: linear-gradient(175deg, #fff0 1%, #e9ce8f1a 22%, #f2e1b77a 46%, #fffc 47%, #e9ce8f29 54%, #fcfaf6 81%);
  box-shadow: 0 -1px 0 #c08a2430;
  animation: xs-ribbon-drift 9s ease-in-out infinite alternate;
}
.xs-light.second {
  left: 7%; bottom: -19%; transform: rotate(-27deg); animation-delay: -5s;
  background: linear-gradient(170deg, #fff0 2%, #dec69026 30%, #ffffffe0 49%, #d0a35b24 50%, #fff0 83%);
  box-shadow: 0 -1px 0 #c08a241f;
}
.xs-hairline {
  position: absolute; z-index: -1; width: 160%; height: 35%; left: -72%; bottom: 5%;
  border: 1px solid #bb8c2d29; border-radius: 50%; transform: rotate(-32deg);
}
.xs-brand { position: absolute; inset: 27% 0 auto; display: flex; align-items: center; flex-direction: column; }
.xs-crest { width: 29%; aspect-ratio: 1; border-radius: 25%; box-shadow: 0 9px 26px #8a641425; display: block; }
.xs-orbit {
  position: absolute; top: -19px; width: calc(29% + 38px); aspect-ratio: 1;
  border: 1px solid #c6993336; border-radius: 50%; box-sizing: border-box;
  animation: xs-connect-spin 6s linear infinite;
}
.xs-orbit::before {
  content: ""; position: absolute; width: 5px; height: 5px; top: -3px; left: calc(50% - 2.5px);
  border-radius: 50%; background: #c29438; box-shadow: 0 0 10px 3px #dab05f55;
}
.xs-orbit::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; border-top: 1px solid #d8b86855; transform: rotate(40deg); }
.xs-wordmark { width: 64%; max-width: 246px; height: auto; display: block; margin-top: 32px; }
.xs-divider { width: 25px; height: 1px; background: #c29b4e80; margin-top: 25px; }
.xs-welcome { margin: 17px 0 0; font-size: 12px; font-weight: 400; letter-spacing: 4px; color: #8c7853; line-height: 1.5; padding-left: 4px; }
.xs-connection { position: absolute; top: 70%; left: 22px; right: 22px; text-align: center; }
.xs-indicator {
  margin: 0 auto 17px; width: 24px; height: 24px; box-sizing: border-box;
  border: 2px solid #bf902b25; border-top-color: var(--xs-gold); border-right-color: var(--xs-gold);
  border-radius: 50%; animation: xs-connect-spin 1.3s linear infinite;
}
.xs-status { margin: 0; font-size: 15px; line-height: 1.6; font-weight: 500; letter-spacing: 1px; }
.xs-detail { margin: 7px 0 0; color: var(--xs-muted); font-size: 12px; line-height: 1.6; }
@keyframes xs-connect-spin { to { transform: rotate(360deg); } }
@keyframes xs-ribbon-drift { from { transform: translateY(-5px) rotate(-26deg); } to { transform: translateY(6px) rotate(-23deg); } }
@media (prefers-reduced-motion: reduce) { .xs-screen * { animation: none !important; } }
@media (max-width: 360px) {
  .xs-wordmark { margin-top: 28px; }
  .xs-divider { margin-top: 20px; }
  .xs-brand { top: 25%; }
}
@media (orientation: landscape) and (max-height: 540px) {
  .xs-screen { max-width: none; }
  .xs-brand { top: 50%; left: 6%; width: 46%; transform: translateY(-50%); }
  .xs-crest { width: 80px; }
  .xs-orbit { top: -15px; width: 110px; }
  .xs-wordmark { width: 80%; max-width: 210px; margin-top: 22px; }
  .xs-divider { margin-top: 14px; }
  .xs-welcome { font-size: 10px; letter-spacing: 2px; margin-top: 12px; }
  .xs-connection { top: 50%; left: 56%; right: 4%; transform: translateY(-50%); }
}
