:root {
  color-scheme: light;
  --canvas: #f0eee7;
  --ink: #2d2c21;
  --olive: #716a36;
  --line: #d2cdbd;
  --spread-width: min(calc(100vw - 2rem), 1080px, max(320px, (100dvh - 5rem) * 1.4095));
  color: var(--ink);
  background: var(--canvas);
  font-family: system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; }
main {
  flex: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
}
.stage {
  width: var(--spread-width);
  position: relative;
  background: white;
  box-shadow: 0 0 0 1px #28251515, 0 9px 24px #28251517;
  touch-action: pan-y pinch-zoom;
}
.stage img { display: block; width: 100%; height: auto; aspect-ratio: 839.055 / 595.276; }
#message {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  margin: 0;
  padding: .7rem;
  background: var(--canvas);
  text-align: center;
}
.controls {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: min(var(--spread-width), 34rem);
}
.controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.controls button:disabled { color: #8b8675; opacity: .55; cursor: default; }
@media (hover: hover) {
  .controls button:hover:not(:disabled) { background: var(--ink); color: white; }
}
.controls svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.progress { display: flex; align-items: center; flex: 1; gap: .65rem; min-width: 0; }
.progress input { accent-color: var(--olive); flex: 1; min-width: 0; height: 36px; margin: 0; cursor: pointer; }
output { color: var(--olive); font: .75rem ui-monospace, monospace; white-space: nowrap; }
:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }
