:root { color-scheme: dark; font-family: Georgia, 'Times New Roman', serif; }
* { box-sizing: border-box; }
body { margin: 0; background: #182019; color: #fff8eb; }
main, #yard, #cover { position: fixed; inset: 0; width: 100%; height: 100%; }
#yard { display: block; touch-action: none; cursor: grab; outline: none; }
#yard:active { cursor: grabbing; }
#fps {
  position: fixed; top: max(.6rem, env(safe-area-inset-top)); left: max(.6rem, env(safe-area-inset-left));
  padding: .25rem .5rem; border-radius: .3rem; background: #191916d9; color: #fff8eb;
  font: .8rem system-ui, sans-serif; font-variant-numeric: tabular-nums; pointer-events: none;
}
#yard:focus-visible { outline: 2px solid #fff8eb; outline-offset: -4px; }
#cover {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(#131a1655, #131a1688), url('./assets/yard-preview.webp') center / cover;
  transition: opacity 220ms ease;
}
#cover.ready { opacity: 0; pointer-events: none; }
#status, #hint, button {
  background: rgba(25, 29, 22, .83); color: #fff8eb;
  border: 1px solid rgba(255, 248, 230, .25); border-radius: 2rem;
  padding: .65rem 1.1rem; font: 1rem/1.3 Georgia, 'Times New Roman', serif;
}
#status { text-align: center; max-width: min(32rem, 90vw); }
#controls { position: fixed; inset: auto 0 max(1.25rem, env(safe-area-inset-bottom)) 0; display: flex; justify-content: center; align-items: center; pointer-events: none; }
#hint { letter-spacing: .025em; transition: opacity 300ms ease; }
#hint.used { opacity: 0; }
button { cursor: pointer; }
#log-actions { position: absolute; right: max(1rem, env(safe-area-inset-right)); display: flex; gap: .4rem; pointer-events: auto; }
#sound { position: absolute; left: max(1rem, env(safe-area-inset-left)); pointer-events: auto; }
button:hover, button:focus-visible { background: #253024; border-color: #eee4cd; }
button:focus-visible { outline: 2px solid white; outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 46rem) { #hint { transform: translateY(-3.1rem); } }
@media (prefers-reduced-motion: reduce) { #cover, #hint { transition: none; } }
