/* One loading material, shared by initial art preparation and realm entry.
   Progress is reported work; animation never stands in for readiness. */
#boot-overlay {
  position:fixed;inset:0;z-index:99999;display:grid;grid-template-rows:1fr auto;
  padding:clamp(24px,5vw,72px);box-sizing:border-box;overflow:auto;
  background:radial-gradient(ellipse at 50% 38%,#2d2216 0,#18120d 54%,#100d09 100%);
  color:var(--parch,#e8dcc0);font-family:var(--font-body,'Source Sans 3',Arial,sans-serif);
  transition:opacity .2s ease;outline:none;isolation:isolate;
}
#boot-overlay::before {content:'';position:absolute;inset:16px;border:1px solid #b5964b24;pointer-events:none;z-index:-1}
#boot-overlay.boot-done {opacity:0;pointer-events:none}
#boot-crown {align-self:center;justify-self:center;text-align:center;padding:28px 0 54px;max-width:100%;}
#boot-crown svg {display:block;width:clamp(128px,16vw,180px);height:auto;margin:0 auto 22px;color:#d4b56b;}
#boot-title {font:700 clamp(28px,4.3vw,48px)/1.3 var(--font-head,Cinzel,Georgia,serif);letter-spacing:.1em;text-indent:.1em;color:var(--gold,#f2c94c);margin:0;}
#boot-tag {font:400 clamp(14px,2vw,17px)/1.5 var(--font-body,Arial,sans-serif);color:#c6b899;margin:10px 0 0;letter-spacing:.025em;}
.loading-footer {display:grid;grid-template-columns:minmax(0,540px) minmax(180px,280px);justify-content:space-between;align-items:end;gap:36px;border-top:1px solid #b5964b55;padding-top:22px;max-width:1120px;width:100%;justify-self:center;}
.loading-note {max-width:50ch;}
#boot-tip-title {display:block;font:700 14px/1.5 var(--font-head,Cinzel,Georgia,serif);letter-spacing:.045em;color:#dfc17a;margin:0 0 7px;}
#boot-tip {font-size:16px;line-height:1.5;margin:0;min-height:3em;color:#e2d6ba;text-wrap:pretty;}
.loading-reading {align-self:end;min-width:0;}
.loading-stage {position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:14px;padding-left:16px;}
.loading-stage::before {content:'';position:absolute;left:1px;bottom:.46em;width:5px;height:5px;background:#d5b766;transform:rotate(45deg);animation:loading-ember 1.8s ease-in-out infinite;}
#boot-status {font-size:15px;line-height:1.45;color:#dfd0ac;margin:0;min-height:2.9em;display:flex;align-items:flex-end;}
#boot-count {font:400 12px/1.45 var(--font-body,Arial,sans-serif);color:#b59b67;white-space:nowrap;font-variant-numeric:tabular-nums;}
#boot-progress {display:block;width:100%;height:4px;margin:12px 0 7px;border:0;background:#6b543244;color:#c9a84c;accent-color:#c9a84c;}
#boot-progress::-webkit-progress-bar {background:#6b543244}
#boot-progress::-webkit-progress-value {background:#d5b766}
#boot-progress::-moz-progress-bar {background:#d5b766}
#boot-progress:indeterminate {opacity:.55}
#boot-overlay[data-loading-mode="world"] #boot-progress {visibility:hidden}
#boot-overlay[data-loading-error] .loading-stage::before {animation:none;background:#dbaf83;}
#boot-overlay[data-loading-error] #boot-progress {visibility:hidden}
@keyframes loading-ember {50%{opacity:.35}}
#boot-retry {display:block;margin:14px 0 0;padding:9px 15px;border:1px solid #8a6f42;background:#342719;color:#e8dcc0;font:600 14px/1.4 var(--font-body,Arial,sans-serif);cursor:pointer;border-radius:3px;}
#boot-retry[hidden] {display:none}
#boot-retry:focus-visible {outline:2px solid #f2c94c;outline-offset:3px}
@media(max-width:620px) {
  #boot-overlay {padding:30px 28px;}
  #boot-crown {padding:24px 0 44px;}
  .loading-footer {grid-template-columns:minmax(0,1fr);gap:22px;padding-top:18px;}
  #boot-tip {font-size:15px;}
  .loading-reading {width:100%;}
}
@media(max-height:480px) {
  #boot-overlay {padding:22px 30px;}
  #boot-crown {padding:5px 0 18px;}
  #boot-crown svg {width:70px;margin-bottom:8px;}
  #boot-title {font-size:24px;}
  #boot-tag {font-size:13px;margin-top:4px;}
  .loading-footer {gap:16px;padding-top:12px;}
  #boot-tip {font-size:13px;min-height:0;}
}
@media(prefers-reduced-motion:reduce) {#boot-overlay {transition:none}.loading-stage::before {animation:none}}
body.reduce-motion #boot-overlay {transition:none}
body.reduce-motion .loading-stage::before {animation:none}
