:root {
  --bg: #fffafa;
  --ink: #2b2b2b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "PT Sans", sans-serif;
  overflow: hidden;
}

.frame {
  position: fixed;
  inset: 0;
  background: var(--bg);
  overflow: hidden;
}

#field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.marks {
  position: absolute;
  top: 10px;
  left: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
}

.mark {
  height: 30px;
  width: auto;
}

.results-head {
  position: absolute;
  left: 0;
  right: 0;
  top: 36px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.frame.thanks .results-head {
  top: 50%;
  transform: translateY(-50%);
}

.lead {
  margin: 0;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
}

.lead:empty { display: none; }

.demo-marks {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.demo-marks[hidden] { display: none; }

.demo-marks span {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: "PT Sans", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: 72px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  opacity: 0;
  white-space: nowrap;
}

.demo-marks [data-mark="q"] {
  padding: 12px 26px 14px;
  border-radius: 20px;
  background: #2b2b2b;
  color: #f4f1ea;
  font-size: 40px;
}

.prompt {
  margin: 0;
  font-size: 36px;
  font-weight: 700;
  text-align: center;
}

.prompt.boxed {
  max-width: min(1100px, calc(100vw - 120px));
  padding: 18px 40px 22px;
  border-radius: 28px;
  background: #2b2b2b;
  color: #f4f1ea;
  font-size: 72px;
  line-height: 1.12;
}

.prompt.boxed:not(.swap):not(.thanks-line) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.prompt.boxed.swap {
  overflow: hidden;
  white-space: nowrap;
}

.prompt.boxed.thanks-line {
  max-width: 860px;
  font-size: 32px;
  line-height: 1.25;
}

.wait {
  position: absolute;
  font-size: 36px;
  left: 0;
  right: 0;
  bottom: 168px;
  display: flex;
  align-items: stretch;
  padding-bottom: 15px;
}

.blurb {
  width: 75%;
  margin: 0;
  padding: 0 16px 0 16px;
  text-align: left;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink);
}

.blurb[hidden] { display: none; }

.pick {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.share { font-weight: 700; }

.answers {
  position: absolute;
  left: 0;
  right: 0;
  top: calc((100% - 168px) / 2);
  height: 0;
}

.side-label {
  position: absolute;
  top: 0;
  width: 50%;
  text-align: center;
  font-size: 33px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

#labelLeft { left: 0; }
#labelRight { left: 50%; }

.side-name {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  transform: translateY(-50%);
}

.side-count {
  display: none;
  font-size: 59px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.side-count.show {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 50%;
  top: -62px;
  transform: translate(-50%, -50%);
  width: auto;
  height: 1em;
  opacity: 0;
}

.side-count.show.in {
  opacity: 1;
  transition: opacity 0.8s ease;
}

.digit {
  height: 1em;
  overflow: hidden;
  text-align: center;
}

.strip {
  display: flex;
  flex-direction: column;
}

.strip span {
  height: 1em;
  line-height: 1;
}

.countdown {
  width: 50%;
  padding-left: 0%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  z-index: 2;
}

.countdown.countdown-waiting {
  width: auto;
  margin-left: auto;
  margin-right: 20px;
  align-items: flex-end;
  text-align: right;
}

.countdown.countdown-thanks {
  width: 100%;
  align-items: center;
  text-align: center;
}

.countdown.gone { display: none; }

.results-in {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.timer {
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.banner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 168px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  background: #000;
  z-index: 2;
  overflow: hidden;
}

.qr {
  width: 136px;
  height: 136px;
  flex: none;
  box-sizing: border-box;
  background: #fff;
  border: 6px solid #fff;
}

.qr img, .qr canvas, .qr svg {
  width: 100%;
  height: 100%;
  display: block;
  background: #fff;
}

.ticker {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.ticker-track {
  display: flex;
  width: max-content;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  color: #fffafa;
  animation: ticker linear infinite;
  will-change: transform;
}

.ticker-group {
  display: flex;
  flex: none;
}

.ticker-track span { padding-right: 2.5em; }

@keyframes ticker {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

.controls {
  position: absolute;
  right: 16px;
  top: 16px;
  display: flex;
  gap: 10px;
  z-index: 4;
}

.controls button {
  appearance: none;
  border: 0;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  cursor: pointer;
}

.controls button.icon {
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
}

.controls button.icon svg {
  width: 12px;
  height: 12px;
  display: block;
}
