: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-lantern-day.webp') center / cover;
  transition: opacity 220ms ease;
}
#cover.ready { opacity: 0; pointer-events: none; }
:root[data-time="night"] body { background: #0b1119; }
:root[data-time="night"] #cover {
  background: #0b1119 url('./assets/yard-lantern-preview.webp') center / cover;
}
#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; }
#reset { position: absolute; right: max(1rem, env(safe-area-inset-right)); pointer-events: auto; }
#lamp-switches { display:flex; gap:.35rem; pointer-events:auto; }
#lamp-switches button::before { content:""; display:inline-block; width:.45em; height:.45em; border-radius:50%; margin-right:.45em; background:#777d82; }
#lamp-switches [aria-pressed="true"]::before { background:#f2ba7c; }
#controls { gap:.4rem; }
#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) {
  #controls { padding-top:3rem; }
  #lamp-switches { position:absolute; top:0; }
  #hint { font-size:.85rem; }
}
@media (prefers-reduced-motion: reduce) { #cover, #hint { transition: none; } }
