html, body, #game-root {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #0d1822;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

html, body { min-height: 100dvh; }
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
canvas { display: block; width: 100% !important; height: 100% !important; }

#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #102631 0%, #0d1822 58%, #091117 100%);
  color: #eef7fa;
  transition: opacity 180ms ease, visibility 180ms ease;
}

#loading-screen.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-card {
  width: min(440px, calc(100vw - 36px));
  box-sizing: border-box;
  padding: 24px;
  border: 1px solid rgba(138, 184, 201, 0.45);
  border-radius: 16px;
  background: rgba(10, 22, 29, 0.94);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
}
.loading-kicker { font-size: 12px; letter-spacing: 0.16em; color: #82c7de; font-weight: 800; }
.loading-title { margin-top: 8px; font-size: 22px; font-weight: 800; }
.loading-track { height: 10px; margin-top: 20px; overflow: hidden; border-radius: 999px; background: #23343d; }
.loading-progress { width: 4%; height: 100%; border-radius: inherit; background: #d39a42; transition: width 120ms linear; }
.loading-status { margin-top: 12px; min-height: 20px; font-size: 14px; color: #b9cbd2; }
.loading-retry {
  margin-top: 18px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: #5d9149;
  color: white;
  font: inherit;
  font-weight: 800;
}

@media (max-width: 600px) {
  .loading-card { padding: 20px; }
  .loading-title { font-size: 20px; }
}
