:root {
  color-scheme: light;
  --ink: #241914;
  --paper: #fff6dd;
  --grass: #4aa35e;
  --sky: #8ed3f4;
  --accent: #d92f2f;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, #fff9c9 0 9%, transparent 10%),
    linear-gradient(#73c8ef, #d8f2ff 62%, #67b766 63%);
  color: var(--ink);
  font-family: ui-rounded, "Comic Sans MS", "Trebuchet MS", system-ui, sans-serif;
}

.game-shell {
  position: relative;
  width: min(100%, 1100px);
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 36px);
  border: 5px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  background: var(--sky);
  box-shadow: 0 18px 0 #2d7b48, 0 26px 35px rgb(36 25 20 / 0.26);
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: auto;
}

.hud {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  pointer-events: none;
}

.site-logo {
  width: clamp(88px, 13vw, 150px);
  height: auto;
  max-height: 74px;
  object-fit: contain;
  align-self: flex-start;
  filter: drop-shadow(3px 4px 0 rgb(36 25 20 / 0.25));
}

.meter,
.score {
  min-width: 130px;
  padding: 9px 12px;
  border: 4px solid var(--ink);
  border-radius: 8px;
  background: rgb(255 246 221 / 0.92);
  box-shadow: 4px 4px 0 rgb(36 25 20 / 0.22);
}

.meter span,
.score span {
  display: block;
  font-size: clamp(12px, 2vw, 16px);
  font-weight: 800;
}

.meter strong,
.score strong {
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1;
}

.bar {
  width: 150px;
  max-width: 28vw;
  height: 13px;
  margin-top: 7px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  background: #f8c2b5;
}

.bar i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #44b658, #f8d94a);
}

.start-button {
  position: absolute;
  left: 50%;
  bottom: 38px;
  transform: translateX(-50%);
  min-width: 150px;
  padding: 13px 26px;
  border: 4px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 5px 5px 0 rgb(36 25 20 / 0.3);
  font: 900 clamp(18px, 3vw, 28px) / 1 ui-rounded, "Comic Sans MS", system-ui, sans-serif;
  cursor: pointer;
}

.start-button:active {
  transform: translate(calc(-50% + 3px), 3px);
  box-shadow: 2px 2px 0 rgb(36 25 20 / 0.3);
}

.start-button.hidden {
  display: none;
}

@media (max-width: 680px) {
  .hud {
    top: 8px;
    left: 8px;
    right: 8px;
  }

  .site-logo {
    width: 78px;
  }

  .meter,
  .score {
    min-width: 92px;
    padding: 7px 8px;
  }
}
