:root {
  --paper: #f3f0e8;   /* the warm white page */
  --ink: #141414;     /* the word, the bar and the rack */
  --soft: #9a958b;    /* the floor, the labels, the empty ticks */
  --accent: #e0451f;  /* vermilion: the last tick and the finished set */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo Variable", "Archivo", system-ui, sans-serif;
  overflow: hidden;
}

.stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  cursor: pointer;
  outline: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.stage:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }

.scene { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.floor { stroke: var(--soft); stroke-width: 1; fill: none; }
.upright { stroke: var(--ink); stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bar { stroke: var(--ink); stroke-width: 2; fill: none; stroke-linecap: round; }
.plate { stroke: var(--ink); stroke-width: 1.25; fill: var(--paper); }
.word {
  fill: var(--ink);
  font-family: "Archivo Variable", "Archivo", system-ui, sans-serif;
  letter-spacing: -0.01em;
}

.brand, .plan {
  position: absolute;
  top: clamp(14px, 4vh, 32px);
  font-size: clamp(11px, 1.6vh, 13px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soft);
  font-variation-settings: "wdth" 110;
}
.brand { left: clamp(16px, 4vw, 40px); color: var(--ink); font-weight: 600; }
.plan { right: clamp(16px, 4vw, 40px); }

.count {
  position: absolute;
  left: 50%;
  bottom: clamp(36px, 11vh, 96px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: baseline;
  column-gap: 10px;
  row-gap: 8px;
  justify-items: start;
}
.count__label {
  grid-column: 1; grid-row: 1;
  font-size: clamp(10px, 1.5vh, 12px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--soft);
}
.count__num {
  grid-column: 2; grid-row: 1;
  font-size: clamp(18px, 3.4vh, 26px);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
}
.count__ticks { grid-column: 1 / -1; grid-row: 2; display: flex; gap: 6px; }
.tick {
  display: block;
  width: clamp(14px, 2.6vw, 22px);
  height: 2px;
  background: var(--soft);
  opacity: 0.35;
  transform-origin: left center;
}
.count__done {
  grid-column: 1; grid-row: 1;
  white-space: nowrap;
  font-size: clamp(10px, 1.5vh, 12px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
}

.hint {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(12px, 3.4vh, 28px);
  text-align: center;
  font-size: clamp(10px, 1.5vh, 12px);
  letter-spacing: 0.08em;
  color: var(--soft);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (max-height: 460px) {
  .plan { display: none; }
}
