/* Shared by Telegram entry and authenticated shell, before game readiness. */
/* The card has a fixed size: status, retry and labels reserve their own space. */

/* Screen: light sky-to-peach backdrop with soft cloud shapes (pure CSS, no image files). */
html .splash-screen.fd-boot {
  position: fixed; inset: 0; z-index: 10000; display: grid; grid-template-columns: minmax(0, 1fr);
  place-items: center; justify-content: center; padding: 24px 16px; box-sizing: border-box; overflow: auto; color: #352719;
  background:
    radial-gradient(ellipse 120px 34px at 16% 18%, #ffffffc0 70%, #fff0 72%),
    radial-gradient(ellipse 160px 44px at 86% 30%, #ffffff99 70%, #fff0 72%),
    radial-gradient(ellipse 140px 38px at 22% 84%, #ffffff8c 70%, #fff0 72%),
    radial-gradient(circle at 50% 40%, #fff7e0 0, #fff7e000 60%),
    linear-gradient(#bfe6ff, #dff1ff 45%, #ffe9d6);
  font-family: Nunito, system-ui, sans-serif; text-align: center;
  backdrop-filter: none; transform: none; transition: opacity 250ms ease;
}
html .fd-boot::before, html .fd-boot::after { display: none; }

/* Card: fixed 340px height so no state (step text, error, retry, progress) changes its size. */
.fd-boot-card {
  position: relative; display: flex; flex-direction: column; align-items: center;
  width: min(100%, 320px); height: 340px; margin-top: 64px; padding: 76px 22px 20px; box-sizing: border-box;
  border: 2px solid #edcba6; border-radius: 28px; background: linear-gradient(#fffdf8, #fff3e3);
  box-shadow: inset 0 1px 0 #fff, 0 16px 36px #8856272e, 0 3px 8px #8856271a; overflow: visible;
}
.fd-boot-card::before {
  content: ""; position: absolute; top: -58px; left: 50%; width: 132px; height: 132px; margin-left: -66px;
  border-radius: 50%; background: radial-gradient(circle, #ffe39a 0, #ffe39a80 45%, #ffe39a00 70%); pointer-events: none;
}

/* Doge: centred with margin, so transform stays free for the float animation. */
.fd-boot-doge {
  position: absolute; top: -64px; left: 50%; width: 128px; height: 128px; margin: 0 0 0 -64px; object-fit: contain;
  filter: drop-shadow(0 8px 10px #8856273d); animation: fd-boot-float 3.2s ease-in-out infinite; z-index: 1;
}
@keyframes fd-boot-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}
@media (prefers-reduced-motion: reduce) {
  .fd-boot-doge { animation: none; }
}

html .fd-boot .splash-title {
  margin: 0; max-width: 100%; font-size: 32px; line-height: 38px; height: 38px; font-weight: 900; letter-spacing: 0;
  text-transform: none; color: #352719; background: none; -webkit-text-fill-color: currentColor; text-shadow: 0 2px 0 #ffe2b0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html .fd-boot .splash-tagline {
  margin: 2px 0 0; max-width: 100%; height: 20px; font-size: 13px; line-height: 20px; font-weight: 800; letter-spacing: .04em;
  color: #b07a3a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html .fd-boot .splash-tip { margin: 10px 0; color: #785b44; font-size: 14px; line-height: 1.5; }

/* Status: always two lines of reserved height; longer text is clamped, never resizes the card. */
html .fd-boot .splash-subtitle {
  margin: 16px 0 0; width: 100%; height: 40px; font-size: 14px; line-height: 20px; font-weight: 600; color: #785b44;
  letter-spacing: 0; overflow: hidden; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}

html .fd-boot .splash-progress {
  width: 100%; height: 12px; margin: 14px 0 6px; padding: 2px; box-sizing: border-box; overflow: hidden; flex: none;
  border: 1px solid #edcba6; border-radius: 999px; background: #fff1dc; box-shadow: inset 0 1px 2px #8856271f;
}
/* No CSS width transition: the script animates the width itself. */
html .fd-boot .splash-progress-bar {
  height: 100%; width: 5%; max-width: 100%; border-radius: inherit; background: linear-gradient(90deg, #f9d77a, #f2a93b);
  box-shadow: inset 0 1px 0 #ffffff80; transition: none;
}
html .fd-boot .splash-progress-label {
  margin: 0; width: 100%; height: 18px; font-size: 13px; line-height: 18px; font-weight: 700; letter-spacing: 0;
  color: #785b44; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Retry: hidden state keeps its box (visibility, not display) so revealing it does not resize the card. */
.fd-boot button {
  min-height: 44px; height: 44px; flex: none; margin-top: auto; padding: 0 24px; border: 1px solid #a87939; border-radius: 16px;
  background: #f6c453; color: #352719; font: inherit; font-weight: 800; box-shadow: 0 3px 0 #a87939; cursor: pointer;
}
html .fd-boot #splash-retry[hidden] { display: block; visibility: hidden; }

/* Error state: selectors beat the generic .splash-screen.splash-error rules in style.css. */
html .splash-screen.fd-boot.splash-error .splash-subtitle { color: #b3261e; font-weight: 700; }
html .splash-screen.fd-boot.splash-error .splash-progress-bar { background: #e8836f; }
html .splash-screen.fd-boot.splash-error .splash-progress-label { color: #b3261e; }

html .fd-boot.splash-hidden { opacity: 0; pointer-events: none; }
