:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  background: #111;
  color: #fff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #111;
}

.deck {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
}

.stage {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}

.stage img {
  width: min(100%, calc((100vh - 86px) * 16 / 9));
  max-height: calc(100vh - 86px);
  aspect-ratio: 16 / 9;
  object-fit: contain;
  display: block;
  background: #000;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.4);
}

.controls {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 16px 18px;
}

button {
  min-width: 96px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

button:hover:not(:disabled),
button:focus-visible:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
}

button:disabled {
  opacity: 0.4;
  cursor: default;
}

#counter {
  min-width: 56px;
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
}

@media (max-width: 640px) {
  .stage {
    padding: 10px;
  }

  .controls {
    gap: 10px;
    padding-bottom: 12px;
  }

  button {
    min-width: 82px;
    padding: 9px 11px;
  }
}
