:root {
  color-scheme: light;
  font-family: Georgia, "Times New Roman", serif;
  background: #fff;
  color: #080808;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: #fff;
}

.reader {
  width: min(94vw, 920px);
  height: 100svh;
  margin: 0 auto;
  padding: clamp(14px, 2.5vh, 28px) 0 max(10px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.page-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  will-change: transform;
}

.intro {
  max-width: 580px;
  margin: 0 auto clamp(10px, 2vh, 22px);
  text-align: center;
}

.intro h1 {
  margin: 0 0 4px;
  font-size: clamp(32px, 5vh, 52px);
  font-weight: 400;
  line-height: 1;
}

.intro p {
  margin: 0;
  font: clamp(11px, 1.6vh, 14px)/1.35 Arial, sans-serif;
}

.digits-panel {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
}

.digits {
  width: max-content;
  height: 100%;
  max-height: 72vh;
  display: grid;
  grid-template-rows: repeat(10, 1fr);
  align-items: center;
  font-family: "Courier New", Courier, monospace;
  font-size: clamp(30px, min(9vw, 7.2vh), 64px);
  line-height: 1;
  letter-spacing: .055em;
  font-variant-numeric: tabular-nums;
}

.digit-row {
  position: relative;
  white-space: nowrap;
}

.digit-row[data-prefix]::before {
  content: attr(data-prefix);
  position: absolute;
  right: 100%;
  margin-right: .12em;
  color: #555;
  font-size: .48em;
  letter-spacing: 0;
}

.navigation {
  min-height: 42px;
  margin-top: clamp(4px, 1vh, 10px);
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  font: 13px/1 Arial, sans-serif;
}

.page-number { text-align: center; }

.arrow {
  border: 0;
  background: transparent;
  color: #080808;
  font-size: 27px;
  cursor: pointer;
  padding: 12px;
}

.arrow:disabled { opacity: 0; pointer-events: none; }
.arrow:focus-visible { outline: 2px solid #080808; outline-offset: 2px; }

@media (max-width: 520px) {
  .reader { width: 92vw; }
  .intro { max-width: 90vw; }
  .digits {
    max-height: none;
    font-size: clamp(34px, min(13.5vw, 7vh), 58px);
    letter-spacing: .035em;
  }
}
