:root {
  --ink: #18232c;
  --paper: #f5efe2;
  --panel: #f5efe2;
  --button: #f5c842;
  --button-shadow: #9f6f24;
  --danger: #d94b3d;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  background: #67c8ee;
  color: var(--ink);
  font-family: "Courier New", ui-monospace, Menlo, Monaco, Consolas, monospace;
  image-rendering: pixelated;
}

button {
  font: inherit;
}

.shell {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #67c8ee;
}

#game {
  width: 100vw;
  height: 100dvh;
  display: block;
  image-rendering: pixelated;
}

.hud {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left));
  right: max(14px, env(safe-area-inset-right));
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  color: var(--ink);
  text-shadow: 2px 2px 0 #f5efe2;
}

.hud div {
  min-width: 76px;
  padding: 8px 10px;
  border: 4px solid #18232c;
  border-radius: 0;
  background: var(--panel);
  box-shadow: 4px 4px 0 rgba(24, 35, 44, 0.35);
}

.label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  opacity: 0.72;
}

.hud strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background:
    repeating-linear-gradient(0deg, rgba(24, 35, 44, 0.08) 0 2px, transparent 2px 6px),
    linear-gradient(rgba(103, 200, 238, 0.05), rgba(24, 35, 44, 0.18));
}

.overlay.hidden {
  display: none;
}

.brand {
  color: var(--paper);
  max-width: 420px;
  font-size: clamp(52px, 16vw, 86px);
  font-weight: 950;
  line-height: 0.86;
  letter-spacing: 0;
  text-shadow:
    4px 0 0 #18232c,
    0 4px 0 #18232c,
    4px 4px 0 #18232c,
    8px 8px 0 rgba(24, 35, 44, 0.42);
}

.overlay p {
  max-width: 280px;
  margin: 0;
  padding: 10px 12px;
  border: 4px solid #18232c;
  border-radius: 0;
  background: var(--panel);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

#playButton {
  min-width: 150px;
  min-height: 52px;
  border: 0;
  border-radius: 0;
  background: var(--button);
  box-shadow: 0 6px 0 var(--button-shadow), 0 13px 26px rgba(24, 48, 68, 0.22);
  color: var(--ink);
  font-size: 22px;
  font-weight: 950;
  cursor: pointer;
  transform: translateY(0);
}

#playButton:active {
  box-shadow: 0 2px 0 var(--button-shadow), 0 8px 16px rgba(24, 48, 68, 0.2);
  transform: translateY(4px);
}

.drop-button {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  width: 76px;
  height: 76px;
  border: 3px solid rgba(24, 35, 44, 0.82);
  border-radius: 0;
  background: var(--danger);
  box-shadow: 0 7px 0 #8b2a23, 0 15px 28px rgba(24, 35, 44, 0.26);
  cursor: pointer;
}

.drop-button span {
  position: absolute;
  inset: 17px 21px 15px;
  display: block;
  border-radius: 0;
  background: var(--paper);
  box-shadow:
    -12px 22px 0 -11px var(--paper),
    12px 22px 0 -11px var(--paper),
    0 3px 0 rgba(24, 35, 44, 0.25);
}

.drop-button:active {
  box-shadow: 0 3px 0 #8b2a23, 0 10px 18px rgba(24, 35, 44, 0.22);
  transform: translateY(4px);
}

.drop-button:disabled {
  opacity: 0.45;
  filter: grayscale(0.55);
}

@media (min-width: 720px) {
  #game {
    width: min(100vw, 520px);
    height: 100dvh;
    border-inline: 4px solid rgba(24, 48, 68, 0.18);
  }

  .hud {
    left: calc(50vw - 244px);
    right: calc(50vw - 244px);
  }

  .drop-button {
    right: calc(50vw - 244px);
  }
}
