:root {
  --paper: #f3f1ec;
  --ink: #1f1c18;
  --muted: #8a847a;
  --line: #dcd7cd;
  --brass: #c79a3c;
  --brass-hi: #f2d68c;
  --brass-lo: #8f6a22;
  --brass-deep: #6e4f16;
  --coin: clamp(72px, min(30vw, 20vh), 160px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 3vh 16px;
}

.app {
  width: min(420px, 100%);
  display: grid;
  justify-items: center;
  text-align: center;
  gap: clamp(6px, 1.6vh, 14px);
}

.brand {
  font-family: "JetBrains Mono Variable", ui-monospace, monospace;
  font-size: clamp(10px, 1.5vh, 12px);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.question {
  margin-top: 4px;
  font-size: clamp(17px, 3.4vh, 26px);
  font-weight: 560;
  font-stretch: 92%;
  letter-spacing: -.01em;
  line-height: 1.15;
}

.arena {
  position: relative;
  width: 100%;
  height: calc(var(--coin) * 2.3);
  display: grid;
  justify-items: center;
  align-items: end;
  cursor: pointer;
  touch-action: manipulation;
}

.shadow {
  position: absolute;
  left: 50%;
  bottom: calc(var(--coin) * -.02);
  width: calc(var(--coin) * .86);
  height: calc(var(--coin) * .12);
  margin-left: calc(var(--coin) * -.43);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(31, 28, 24, .32), rgba(31, 28, 24, 0));
  pointer-events: none;
}

.tilt, .lift { width: var(--coin); height: var(--coin); }
.tilt { position: relative; }

.coin {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}
.coin:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }

.coin__rim, .coin__face {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 50%;
}
.coin__rim { background: var(--brass-deep); }
.coin__face svg { display: block; width: 100%; height: 100%; overflow: visible; }

.coin__word {
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  font-size: 19px;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: .16em;
  fill: var(--brass-deep);
}

.result { display: grid; justify-items: center; gap: 2px; min-height: calc(clamp(20px, 4vh, 30px) + 22px); }

.result__word {
  font-size: clamp(20px, 4vh, 30px);
  font-weight: 640;
  font-stretch: 100%;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.result__note { font-size: clamp(12px, 1.9vh, 14px); color: var(--muted); white-space: nowrap; }

.tally {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: "JetBrains Mono Variable", ui-monospace, monospace;
  font-size: clamp(11px, 1.7vh, 13px);
  color: var(--muted);
}
.tally__sep { width: 1px; height: 12px; background: var(--line); }

.num {
  display: inline-flex;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  vertical-align: bottom;
}
.reel { display: inline-block; height: 1.25em; line-height: 1.25em; overflow: hidden; }
.reel.is-off { display: none; }
.reel__strip { display: block; }
.reel__strip span { display: block; height: 1.25em; }

@media (hover: hover) {
  .arena:hover .shadow { opacity: .9; }
}
