/* Update #208 §1 — the start loader "Hrací pole" (Langi, docs/design/update_208_04_11/loader/usm-loading.html).
   Plain CSS outside the bundle: index.html links it so the loader paints before the app's JavaScript arrives.
   Only the production variant 3 is here — the demo controls, variant 1 and the placeholder app are left out. */
#usm-boot{--bg0:#2B0B17;--bg1:#12050A;--gold2:#FFD966;--cream:#F7EEDC;--mute:#C9A9AE;--line:rgba(255,255,255,.22);
  position:fixed;inset:0;z-index:2147483000;display:grid;place-items:center;overflow:hidden;color:var(--cream);
  font-family:"Saira Condensed","Arial Narrow",sans-serif;
  background:radial-gradient(120% 90% at 50% 38%,#4A1326 0%,var(--bg0) 38%,var(--bg1) 100%);
  transition:opacity .35s ease}
#usm-boot::after{content:"";position:absolute;inset:0;background:radial-gradient(60% 40% at 50% 0%,rgba(255,220,150,.10),transparent 70%);pointer-events:none}
#usm-boot.is-gone{opacity:0;pointer-events:none}
#usm-boot *{box-sizing:border-box}
#usm-boot .box{position:relative;width:min(62vw,420px);aspect-ratio:1255/967;z-index:2}
#usm-boot .box img,#usm-boot .box svg.orbit{position:absolute;inset:0;width:100%;height:100%}
#usm-boot .emblem{transform-origin:53% 34%;opacity:0}
/* the wordmark lights up at the end: a light sweep masked to the wordmark */
#usm-boot .sheen{position:absolute;inset:0;opacity:0;
  -webkit-mask:url(./usm-logo-wordmark.webp) center/100% 100% no-repeat;mask:url(./usm-logo-wordmark.webp) center/100% 100% no-repeat;
  background:linear-gradient(105deg,transparent 0 42%,rgba(255,248,220,.95) 50%,transparent 58% 100%);background-size:300% 100%;background-position:100% 0;mix-blend-mode:screen}
#usm-boot .prog{position:absolute;left:50%;bottom:max(9vh,64px);transform:translateX(-50%);width:min(64vw,300px);text-align:center;z-index:3}
#usm-boot .prog__bar{height:3px;border-radius:2px;background:rgba(255,255,255,.12);overflow:hidden}
/* the app reports progress in steps (bundle, account, world) — the line glides between them */
#usm-boot .prog__bar i{display:block;height:100%;width:0;background:linear-gradient(90deg,#B8860B,var(--gold2));box-shadow:0 0 10px rgba(255,200,60,.7);transition:width .45s ease-out}
#usm-boot .prog__msg{margin-top:12px;font-family:"IBM Plex Mono",monospace;font-size:12px;letter-spacing:.08em;color:var(--mute);min-height:1.4em;transition:opacity .25s}
#usm-boot svg.field{position:absolute;left:50%;top:50%;width:min(112vw,960px);height:auto;transform:translate(-50%,-50%);z-index:1;overflow:visible}
#usm-boot svg.field g.sport{opacity:0}
#usm-boot svg.field path,#usm-boot svg.field rect,#usm-boot svg.field circle,#usm-boot svg.field line,#usm-boot svg.field ellipse{fill:none;stroke:var(--line);stroke-width:2;vector-effect:non-scaling-stroke;stroke-linecap:round}
#usm-boot .sportlbl{position:absolute;left:50%;top:max(7vh,40px);transform:translateX(-50%);font-family:"IBM Plex Mono",monospace;font-size:11px;letter-spacing:.3em;color:rgba(255,255,255,.4);z-index:3;transition:opacity .2s}
/* phone held upright: the fields are landscape, so they turn 90° and run top to bottom, sized to fit the screen */
@media (orientation:portrait){
  #usm-boot svg.field{width:min(86vh,calc(96vw / .589));transform:translate(-50%,-50%) rotate(90deg)}
  #usm-boot svg.field path,#usm-boot svg.field rect,#usm-boot svg.field circle,#usm-boot svg.field line,#usm-boot svg.field ellipse{stroke:rgba(255,255,255,.28)}
  #usm-boot .box{width:min(80vw,420px)}
  /* Langi (5. 11.): on a phone the bar sat over the bottom of the field. The bar goes to the bottom edge (clear of the
     home indicator), the field and the logo fit in the band between the sport label and the bar. Sized by the
     loader's own box (cqh), which on iOS Safari is the visible area above the toolbar — vh would be the larger one. */
  #usm-boot{container-type:size;--top:calc(max(7vh,40px) + 28px);--bot:calc(88px + env(safe-area-inset-bottom,0px))}
  #usm-boot .prog{bottom:calc(24px + env(safe-area-inset-bottom,0px))}
  #usm-boot svg.field{top:calc(50% + (var(--top) - var(--bot)) / 2);
    width:min(calc(100vh - var(--top) - var(--bot)),calc(96vw / .589));
    width:min(calc(100cqh - var(--top) - var(--bot)),calc(96cqw / .589))}
  #usm-boot .box{top:calc((var(--top) - var(--bot)) / 2)}
}
@media (prefers-reduced-motion:reduce){#usm-boot .emblem{animation:none!important}}
