/* Sol Voyage interface (owner 2026-10-04): the loading screen's progress bar - loaded after the page styles.
 * The logo over the deep navy night sea, a gilded-bronze framed navy-glass track with a gold fill and a moving sheen, a
 * compass rose riding the end of the fill, the step and the percentage under it in Cinzel. ui/sv-loader.js sets --sv-p
 * (0..100) from the real loading work; the screen lifts with a quick fade once everything is ready. */
#loading {
  --sv-p: 0;
  z-index: 18; /* over every window and the HUD (the panel 12, How it works 15), under the rotate gate (20) */
  --sv-cream: #f3e6c8;
  background:
    radial-gradient(ellipse 70% 45% at 50% 42%, rgba(70, 130, 170, .16), transparent 70%),
    radial-gradient(ellipse 80% 55% at 50% 40%, #12304d 0%, #0a1a2d 52%, #03080f 100%);
  transition: opacity .45s cubic-bezier(.4, 0, .2, 1), visibility 0s linear .45s;
}
#loading.done { opacity: 0; visibility: hidden; pointer-events: none; }
#loading .load-inner { transition: transform .45s cubic-bezier(.4, 0, .2, 1), filter .45s ease; }
#loading.done .load-inner { transform: translateY(-10px) scale(1.03); filter: blur(1px); }

#loading .sv-load {
  width: min(480px, 82vw); margin-top: 26px;
  opacity: 0; animation: svLoadIn .6s cubic-bezier(.2, .8, .2, 1) .25s forwards;
}
/* the frame: thin gilded bronze, a dark iron edge outside and in */
#loading .sv-bar {
  position: relative; height: 20px; padding: 3px; border-radius: 11px;
  background: linear-gradient(180deg, #f6dc94 0%, #c9953f 38%, #8a5d22 62%, #5a3a14 100%);
  box-shadow:
    0 0 0 1px #17110b,
    0 0 0 2px rgba(231, 181, 83, .18),
    0 6px 18px rgba(0, 0, 0, .65),
    inset 0 1px 0 rgba(255, 244, 210, .75),
    inset 0 -1px 0 rgba(40, 24, 8, .6);
}
/* the track: navy glass */
#loading .sv-track {
  position: relative; height: 100%; border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(150, 200, 230, .14) 0%, rgba(150, 200, 230, 0) 45%),
    linear-gradient(180deg, #06111f 0%, #0d2440 60%, #0a1c33 100%);
  box-shadow: inset 0 0 0 1px #0b0805, inset 0 2px 5px rgba(0, 0, 0, .75);
}
#loading .sv-clip { position: absolute; inset: 1px; border-radius: 7px; overflow: hidden; }
/* the fill: gold, a top gloss, a soft moving sheen */
#loading .sv-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--sv-p) * 1%); min-width: 0;
  background: linear-gradient(180deg, #fbe7a6 0%, #e7b553 48%, #b37a2a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 252, 235, .8), inset 0 -1px 0 rgba(90, 54, 14, .55), 0 0 12px rgba(231, 181, 83, .45);
  border-radius: 7px 3px 3px 7px;
}
#loading .sv-fill::before { /* glass highlight on the upper half */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 45%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0));
}
#loading .sv-fill::after { /* the sheen sweeping along the gold */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 35%, rgba(255, 250, 225, .6) 50%, rgba(255, 255, 255, 0) 65%);
  background-size: 260px 100%; background-repeat: no-repeat;
  animation: svSheen 2.2s linear infinite;
}
/* the compass rose riding the end of the fill */
#loading .sv-mark {
  position: absolute; top: 50%; left: calc(3px + (100% - 6px) * var(--sv-p) / 100); width: 34px; height: 34px;
  margin: -17px 0 0 -17px; overflow: visible;
  filter: drop-shadow(0 0 6px rgba(251, 231, 166, .55)) drop-shadow(0 2px 3px rgba(0, 0, 0, .7));
  animation: svSpin 9s linear infinite;
}
/* the step and the percentage */
#loading .sv-meta {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 14px; padding: 0 2px;
  font: 700 13px/1.2 "Cinzel", "Trajan Pro", Georgia, serif; letter-spacing: .18em; text-transform: uppercase;
  color: var(--sv-cream); text-shadow: 0 1px 0 #0a0705, 0 2px 8px rgba(0, 0, 0, .8);
}
#loading .sv-step { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#loading .sv-pct { flex: none; min-width: 4ch; text-align: right; font-variant-numeric: tabular-nums; color: #fbe7a6; }

@keyframes svLoadIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes svSheen { from { background-position: -260px 0; } to { background-position: calc(100% + 260px) 0; } }
@keyframes svSpin { to { transform: rotate(360deg); } }

@media (max-width: 560px), (max-height: 460px) {
  #loading .sv-load { margin-top: 16px; }
  #loading .sv-bar { height: 16px; }
  #loading .sv-mark { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
  #loading .sv-meta { font-size: 11px; margin-top: 10px; letter-spacing: .14em; }
}
@media (prefers-reduced-motion: reduce) {
  #loading .sv-fill::after, #loading .sv-mark { animation: none; }
  #loading .sv-load { animation-duration: .01s; animation-delay: 0s; }
  #loading, #loading .load-inner { transition-duration: .15s; }
}
