/* Shared by the HTML boot screen, React loader and offline fallback. */
@font-face { font-family: CitadelLaunch; src: url('/fonts/YekanBakh-Regular.woff2') format('woff2'); font-display: swap; }
.citadel-splash-screen *, .citadel-connection * { box-sizing: border-box; }
.citadel-splash-screen, .citadel-connection {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  direction: rtl;
  background: #05080b;
  color: #f8e5a6;
  font-family: YekanBakh, CitadelLaunch, Tahoma, sans-serif;
  box-sizing: border-box;
}
.citadel-splash-screen { z-index: 9999; transition: opacity .4s ease; }
.citadel-splash-stage { position: absolute; inset: 0; overflow: hidden; }
.citadel-splash-art { position: absolute; inset: 0; display: block; overflow: hidden; pointer-events: none; }
.citadel-splash-art img { display: block; width: 100%; height: 122%; object-fit: cover; object-position: center top; }
/* Hide the old loading frames painted into the portrait image. Controls are
   viewport-anchored, so cropping the artwork never crops the progress bar. */
.citadel-splash-stage::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(transparent 58%, #05080b33 75%, #05080bdb);
}
.citadel-splash-controls {
  position: absolute; z-index: 1;
  left: max(24px, env(safe-area-inset-left, 0px));
  right: max(24px, env(safe-area-inset-right, 0px));
  bottom: max(7%, calc(24px + env(safe-area-inset-bottom, 0px)));
  width: auto; max-width: 560px; margin-inline: auto;
  display: grid; gap: 16px; text-align: center;
}
.citadel-splash-loading-text { font-size: clamp(13px, 2.8vmin, 18px); line-height: 1.7; text-shadow: 0 2px 4px #000; }
.citadel-splash-progress-track {
  height: 16px; box-sizing: border-box; padding: 3px; overflow: hidden;
  border: 1px solid #d7ad59; border-radius: 999px; background: #090b0ee6;
  box-shadow: 0 0 0 3px #21190b, inset 0 2px 6px #000;
}
.citadel-splash-progress-fill {
  position: relative; height: 100%; border-radius: inherit; overflow: hidden;
  background: linear-gradient(#fff2a8, #f0c450 30%, #c18420 65%, #76420b);
  box-shadow: 0 0 12px #ffcd4f99; transition: width .35s ease;
}
.citadel-splash-progress-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, #ffffff88 48%, transparent 66%);
  transform: translateX(-120%); animation: citadel-loading-shine 1.4s ease-in-out infinite;
}
.citadel-splash-progress-fill.is-indeterminate { width: 45%; animation: citadel-loading-travel 1.5s ease-in-out infinite alternate; }
@keyframes citadel-loading-shine { to { transform: translateX(120%); } }
@keyframes citadel-loading-travel { to { transform: translateX(-120%); } }
@media (min-aspect-ratio: 1/1) {
  .citadel-splash-art img { height: 100%; }
  .citadel-splash-stage::after { background: linear-gradient(transparent 55%, #05080b55 76%, #05080be6); }
  .citadel-splash-controls { bottom: max(6%, calc(20px + env(safe-area-inset-bottom, 0px))); }
}
.citadel-connection {
  z-index: 2147483000;
  display: grid; place-items: center;
  padding: max(24px, env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
  overflow: auto;
  background: radial-gradient(ellipse at 50% 25%, #50391e77, transparent 65%), #05080b;
}
.citadel-connection[hidden] { display: none; }
.citadel-connection__panel { width: 100%; max-width: 380px; text-align: center; }
.citadel-connection__brand { font: 700 clamp(30px, 9vw, 46px)/1.2 Georgia, serif; letter-spacing: .08em; color: #e3bf72; }
.citadel-connection h1 { margin: 28px 0 12px; font-size: 22px; color: #f4e3ba; }
.citadel-connection p { margin: 0 0 24px; font-size: 16px; line-height: 1.9; color: #d5ccba; }
.citadel-connection button {
  width: 100%; min-height: 48px; padding: 12px 20px;
  border: 1px solid #e9c67a; border-radius: 6px;
  background: linear-gradient(#f5da94, #bb8639); color: #24190b;
  font: 700 16px/1.5 YekanBakh, CitadelLaunch, Tahoma, sans-serif; cursor: pointer;
  box-shadow: inset 0 1px #fff5d2;
}
.citadel-connection button:focus-visible { outline: 3px solid #fff2be; outline-offset: 5px; }
.citadel-connection button:active { filter: brightness(.88); }
.citadel-connection button:disabled { opacity: .65; cursor: wait; }
@media (prefers-reduced-motion: reduce) {
  .citadel-splash-screen, .citadel-splash-progress-fill { transition: none; }
  .citadel-splash-progress-fill, .citadel-splash-progress-fill::after { animation: none; }
}
