@import url('https://fonts.googleapis.com/css2?family=Nothing+You+Could+Do&family=Red+Hat+Display:wght@400;600&display=swap');
@import url('card.css');

*, *::before, *::after { box-sizing: border-box; }

/* The `hidden` attribute comes from the browser's own stylesheet, and any
   author `display` rule outruns it (author origin beats UA origin, whatever
   the specificity). Without this, `main { display: grid }` quietly cancels
   `<main id="editor" hidden>` and the editor shows to signed-out visitors. */
[hidden] { display: none !important; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  overflow-x: hidden;

  background-color: #0b2a0b;
  background-image: url("images/ChicagoBridgeSm.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
  transition: background-image .4s ease-in-out;
}

#countersWrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: scale(var(--scale, 1));
  transform-origin: center center;
}

#status {
  margin: 0;
  padding: 14px 20px;
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 4px #020;
  font-family: 'Nothing You Could Do', cursive;
  font-size: 26px;
  background-color: rgba(5, 60, 5, .8);
  border-radius: 10px;
}

/* Scaling the whole card keeps the layout exactly as designed
   instead of reflowing the digit boxes into each other. */
@media (max-width: 460px) { #countersWrapper { --scale: .84; } }
@media (max-width: 390px) { #countersWrapper { --scale: .74; } }
@media (max-width: 340px) { #countersWrapper { --scale: .64; } }

@media (prefers-reduced-motion: reduce) {
  body { transition: none; }
}
