.platform-launch,
.platform-launch *,
.platform-launch *::before,
.platform-launch *::after { box-sizing: border-box; }

#app-loading {
  --launch-blue: #1769e8;
  --launch-ink: #173653;
  display: flex;
  flex-direction: column;
  min-width: 280px;
  overflow: hidden;
  color: var(--launch-ink);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: radial-gradient(ellipse at 50% 42%, #fff 0%, #f7faff 50%, #edf5fa 100%);
  isolation: isolate;
  opacity: 1;
  transition: opacity 360ms cubic-bezier(.22, 1, .36, 1), transform 360ms cubic-bezier(.22, 1, .36, 1);
}

#app-loading.is-leaving { pointer-events: none; opacity: 0; transform: scale(1.008); }
.platform-launch__grid, .platform-launch__ambient { position: absolute; z-index: -1; pointer-events: none; }
.platform-launch__grid { inset: 0; background-image: linear-gradient(#b4cae226 1px, transparent 1px), linear-gradient(90deg, #b4cae226 1px, transparent 1px); background-size: 54px 54px; mask-image: radial-gradient(ellipse 74% 75% at 50% 45%, #000, transparent 85%); }
.platform-launch__ambient { width: 46vw; aspect-ratio: 1; border-radius: 50%; filter: blur(65px); opacity: .4; }
.platform-launch__ambient--blue { top: -29vw; left: -12vw; background: #b5d7ff; }
.platform-launch__ambient--teal { right: -25vw; bottom: -28vw; background: #bdebe6; }
.platform-launch__header { position: absolute; top: max(28px, env(safe-area-inset-top)); left: clamp(24px, 4.2vw, 80px); right: clamp(24px, 4.2vw, 80px); display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.platform-launch__brand { display: flex; align-items: center; gap: 11px; }
.platform-launch__brand > img { width: 44px; height: 44px; object-fit: contain; border-radius: 13px; }
.platform-launch__brand > span { display: grid; gap: 5px; }
.platform-launch__brand strong { font-size: 19px; font-weight: 650; letter-spacing: .14em; }
.platform-launch__brand small { color: #8396ac; font-size: 8px; letter-spacing: .16em; }
.platform-launch__session { display: flex; align-items: center; gap: 9px; color: #6d8197; padding: 9px 13px; border: 1px solid #d8e5ed; border-radius: 24px; background: #ffffff90; font-size: 11px; letter-spacing: .04em; }
.platform-launch__session i { width: 5px; height: 5px; border-radius: 50%; background: #149d8a; box-shadow: 0 0 0 4px #149d8a0d; }
.platform-launch__composition { display: grid; grid-template-columns: minmax(150px, 190px) minmax(340px, 560px) minmax(150px, 190px); justify-content: center; align-items: center; gap: clamp(26px, 4vw, 76px); width: 100%; flex: 1; padding: 110px 40px 94px; }
.platform-launch__context { position: relative; color: #7b8da5; animation: launch-rise 600ms 100ms ease-out both; }
.platform-launch__context--right { animation-delay: 160ms; }
.platform-launch__context::before { position: absolute; top: -18px; bottom: -20px; left: -22px; width: 1px; content: ""; background: linear-gradient(transparent, #c7d9ee 20%, #c7d9ee 80%, transparent); }
.platform-launch__context-title { display: flex; align-items: center; gap: 11px; color: #486786; font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.platform-launch__context-title span { color: #8aa6c5; font-family: Consolas, monospace; font-size: 10px; font-weight: 400; }
.platform-launch__context p { margin: 16px 0 20px; color: #8394a8; font-size: 11px; line-height: 2; letter-spacing: .04em; }
.platform-launch__context small { display: block; margin-top: 13px; color: #91a5b9; font-family: Consolas, monospace; font-size: 7px; letter-spacing: .1em; }
.platform-launch__signal { position: relative; height: 1px; width: 144px; overflow: hidden; background: #d9e4f1; }
.platform-launch__signal i { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, #4a9eff, transparent); transform: translateX(-100%); animation: launch-signal 2.6s ease-in-out infinite; }
.platform-launch__context--right .platform-launch__signal i { animation-delay: -.9s; background: linear-gradient(90deg, transparent, #28b4a6, transparent); }
.platform-launch__stage { text-align: center; animation: launch-rise 600ms ease-out both; }
.platform-launch__core { position: relative; width: clamp(204px, 26vh, 248px); height: clamp(204px, 26vh, 248px); margin: 0 auto 29px; }
.platform-launch__halo { position: absolute; inset: 10%; border-radius: 50%; background: radial-gradient(circle, #dbeaff80, #ebf4ff52 45%, transparent 70%); box-shadow: 0 0 0 26px #bfd9ff0c, 0 0 0 60px #bfd9ff08; }
.platform-launch__orbit { position: absolute; inset: 1px; border: 1px solid #3b86ec2c; border-radius: 50%; animation: launch-orbit 22s linear infinite; }
.platform-launch__orbit--inner { inset: 24px; border-style: dashed; border-color: #3b86ec30; animation-direction: reverse; animation-duration: 30s; }
.platform-launch__orbit i { position: absolute; top: 16%; right: 13%; width: 6px; height: 6px; background: #69aaff; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 4px #3a8aff09; }
.platform-launch__orbit i + i { top: auto; right: auto; bottom: 16%; left: 13%; background: #54bbaf; }
.platform-launch__orbit--inner i { top: 42%; right: -3px; width: 5px; height: 5px; }
.platform-launch__scan { position: absolute; inset: 38px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 80%, #5ba4fa36 96%, transparent); mask-image: radial-gradient(circle, transparent 60%, #000 62% 64%, transparent 66%); animation: launch-orbit 7s linear infinite; }
.platform-launch__logo { position: absolute; top: 50%; left: 50%; width: 144px; height: 144px; transform: translate(-50%, -50%); }
.platform-launch__logo img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: contain; }
.platform-launch__eyebrow { margin-bottom: 13px; color: #7f98b3; font-size: 8px; letter-spacing: .22em; }
.platform-launch h1 { margin: 0; color: #183b58; font-size: clamp(26px, 2.5vw, 36px); font-weight: 650; line-height: 1.4; letter-spacing: .055em; }
.platform-launch__subtitle { margin: 14px 0 0; color: #7a8da3; font-size: 12px; line-height: 1.8; letter-spacing: .14em; }
.platform-launch__progress { position: relative; width: min(236px, 65vw); height: 2px; margin: 32px auto 0; overflow: hidden; background: #dce7f5; border-radius: 4px; }
.platform-launch__progress > span { position: absolute; inset: 0 auto 0 0; width: 42%; background: linear-gradient(90deg, #3279f700, #3279f7, #4ab8bd); border-radius: 4px; transform: translateX(-110%); animation: launch-progress 1.8s cubic-bezier(.65, 0, .35, 1) infinite; }
.platform-launch__status { min-height: 20px; max-width: 420px; margin: 14px auto 0; color: #7389a1; font-size: 11px; line-height: 1.8; letter-spacing: .04em; }
.platform-launch[data-state="ready"] .platform-launch__progress > span { width: 100%; background: linear-gradient(90deg, #1769e8, #36b5aa); transform: none; animation: none; }
.platform-launch__footer { position: absolute; right: clamp(24px, 4.2vw, 80px); bottom: max(28px, env(safe-area-inset-bottom)); left: clamp(24px, 4.2vw, 80px); display: flex; justify-content: space-between; gap: 20px; color: #8ba0b4; font-size: 9px; letter-spacing: .14em; }
.platform-launch__footer > span:first-child { display: flex; align-items: center; gap: 10px; }
.platform-launch__footer > span:first-child::before { content: ""; width: 22px; height: 1px; background: #a3c0df; }
.platform-launch__footer > span:last-child { font-family: Consolas, monospace; font-size: 8px; }
#app-loading-actions { margin-top: 18px; }
#app-loading-retry { min-height: 42px; padding: 0 22px; color: #fff; background: var(--launch-blue); border: 0; border-radius: 10px; font: inherit; font-size: 12px; cursor: pointer; box-shadow: 0 5px 14px #1768f11c; }
#app-loading-retry:hover { background: #0a59da; }
#app-loading-retry:focus-visible { outline: 3px solid #94bcff; outline-offset: 4px; }
.platform-launch[data-state="error"] .platform-launch__status, .platform-launch[data-state="slow"] .platform-launch__status { color: #936529; }
.platform-launch[data-state="error"] .platform-launch__progress > span { width: 100%; background: #d6a85a; transform: none; animation: none; }
.platform-launch[data-state="error"] .platform-launch__orbit, .platform-launch[data-state="error"] .platform-launch__scan, .platform-launch[data-state="error"] .platform-launch__signal i { animation-play-state: paused; }

@keyframes launch-orbit { to { transform: rotate(360deg); } }
@keyframes launch-progress { to { transform: translateX(350%); } }
@keyframes launch-signal { 0% { transform: translateX(-110%); } 70%, 100% { transform: translateX(110%); } }
@keyframes launch-rise { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 1020px) {
  .platform-launch__composition { grid-template-columns: minmax(0, 560px); }
  .platform-launch__context { display: none; }
}

@media (max-width: 600px) {
  .platform-launch__header { top: max(26px, env(safe-area-inset-top)); left: 24px; right: 24px; }
  .platform-launch__brand { gap: 8px; }
  .platform-launch__brand > img { width: 38px; height: 38px; border-radius: 11px; }
  .platform-launch__brand strong { font-size: 17px; }
  .platform-launch__brand small { font-size: 6px; letter-spacing: .09em; }
  .platform-launch__session { gap: 6px; padding: 7px 9px; font-size: 8px; letter-spacing: 0; }
  .platform-launch__composition { padding: 104px 20px 86px; }
  .platform-launch__core { width: 204px; height: 204px; margin-bottom: 27px; }
  .platform-launch__logo { width: 130px; height: 130px; }
  .platform-launch__eyebrow { font-size: 7px; letter-spacing: .15em; }
  .platform-launch h1 { font-size: clamp(22px, 6.1vw, 30px); letter-spacing: .02em; }
  .platform-launch__subtitle { margin-top: 12px; font-size: 11px; letter-spacing: .07em; }
  .platform-launch__progress { margin-top: 28px; width: 208px; }
  .platform-launch__status { font-size: 10px; }
  .platform-launch__footer { left: 24px; right: 24px; bottom: max(26px, env(safe-area-inset-bottom)); justify-content: center; font-size: 8px; }
  .platform-launch__footer > span:last-child { display: none; }
  .platform-launch__ambient { width: 85vw; }
  .platform-launch__ambient--blue { top: -30vw; left: -38vw; }
  .platform-launch__ambient--teal { right: -47vw; bottom: -12vw; }
}

@media (max-width: 360px) { .platform-launch__session { display: none; } }

@media (max-height: 620px) {
  .platform-launch__header { top: max(16px, env(safe-area-inset-top)); }
  .platform-launch__composition { padding-top: 82px; padding-bottom: 64px; }
  .platform-launch__core { width: 156px; height: 156px; margin-bottom: 15px; }
  .platform-launch__logo { width: 104px; height: 104px; }
  .platform-launch__orbit--inner { inset: 18px; }
  .platform-launch__eyebrow { margin-bottom: 9px; }
  .platform-launch h1 { font-size: 24px; }
  .platform-launch__subtitle { margin-top: 8px; }
  .platform-launch__progress { margin-top: 20px; }
  .platform-launch__footer { bottom: max(18px, env(safe-area-inset-bottom)); }
}

@media (max-height: 460px) {
  .platform-launch__composition { padding-top: 78px; padding-bottom: 45px; }
  .platform-launch__core { width: 88px; height: 88px; margin-bottom: 8px; }
  .platform-launch__logo { width: 68px; height: 68px; }
  .platform-launch__orbit--inner, .platform-launch__scan, .platform-launch__eyebrow, .platform-launch__subtitle { display: none; }
  .platform-launch h1 { font-size: 22px; }
  .platform-launch__progress { margin-top: 14px; }
  .platform-launch__status { margin-top: 9px; }
  #app-loading-actions { margin-top: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  #app-loading { transition-duration: 80ms; }
  .platform-launch *, .platform-launch *::before, .platform-launch *::after { animation: none !important; }
  .platform-launch__progress > span { transform: none; opacity: .65; }
  #app-loading.is-leaving { transform: none; }
}
