/* Static, unbundled shell: no game JavaScript or game stylesheet is needed. */
@font-face { font-family: "Patrick Hand"; src: url("/fonts/rabisco-patrick-hand.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Caveat"; src: url("/fonts/rabisco-caveat.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
html { background: #f6f3e6; }
#loading[hidden] { display: none; }
#loading {
  --paper: #f6f3e6;
  --ink: #263e8e;
  --muted: #586581;
  --condensed: "Patrick Hand", "Segoe Print", cursive;
  --rules: repeating-linear-gradient(0deg, transparent 0 29px, #496abb12 29px 30px);
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 40px 24px;
  color: var(--ink);
  background: linear-gradient(90deg, transparent calc(5% - 1px), #be3a3c65 5%, transparent calc(5% + 1px)), var(--rules), var(--paper);
}
.loading-sheet { width: min(520px, 100%); text-align: center; }
#loading .loading-note { margin: 0 0 16px; color: var(--muted); font: 25px/1.2 "Caveat", cursive; transform: rotate(-3deg); }
.loading-logo { width: min(460px, 100%); margin: 0 auto; }
.loading-logo img { display: block; width: 100%; height: auto; }
.loading-drive { position: relative; width: min(360px, 100%); height: 210px; margin: 18px auto 22px; }
.loading-car { position: absolute; width: 290px; height: 218px; left: 50%; bottom: 3px; margin-left: -145px; object-fit: contain; animation: loading-bounce 900ms ease-in-out infinite; }
.loading-track { position: absolute; inset: auto 0 0; height: 9px; border-top: 2px solid var(--ink); border-bottom: 1px solid #263e8e65; border-radius: 45% 12% 20% 25%; background: repeating-linear-gradient(115deg, transparent 0 12px, #263e8e50 13px 14px, transparent 15px 22px); background-size: 22px 100%; animation: loading-road 700ms linear infinite; }
#loading-status { min-height: 1.3em; margin: 0; color: var(--ink); font: 25px/1.3 var(--condensed); letter-spacing: .01em; }
#loading-retry { margin-top: 20px; padding: 10px 20px; border: 1.5px solid var(--ink); border-radius: 3px 6px 4px 2px; background: #f2ce65; color: var(--ink); font-size: 18px; }
#loading-retry[hidden] { display: none; }
#loading.has-error :is(.loading-car, .loading-track) { animation-play-state: paused; }
#loading.has-error #loading-status { color: #be3a3c; }
.loading-margin { position: absolute; bottom: 24px; left: 8px; transform: rotate(-9deg); color: var(--ink); font: 15px/1 "Patrick Hand", cursive; }
@keyframes loading-bounce { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-3px) rotate(.5deg); } }
@keyframes loading-road { to { background-position: -22px 0; } }
@media (max-height: 580px) {
  #loading { padding: 24px; }
  .loading-logo { width: min(330px, 100%); }
  #loading .loading-note { margin-bottom: 14px; font-size: 21px; }
  #loading .loading-drive { margin-top: 12px; margin-bottom: 16px; height: 150px; }
  #loading .loading-car { width: 210px; height: 158px; margin-left: -105px; }
}
@media (prefers-reduced-motion: reduce) {
  .loading-car, .loading-track { animation: none; }
}
