/* Everything here draws from theme tokens. The defaults are Flap board, which matches the app icon, so the page draws in it before any script runs. */
@font-face {
  font-family: "Martian Mono";
  src: url("/fonts/martian-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-display: swap;
}

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --outside: #141413;
  --onOutside: #f4efe1;
  --onOutsideMuted: #b4afa2;
  --outsideAccent: #ffd400;
  --inside: #141413;
  --onInside: #f4efe1;
  --onInsideMuted: #b4afa2;
  --insideAccent: #ffd400;
  --edge: #3a3834;
  --edgeInside: #3a3834;
  --control: #383632;
  --controlShade: #2d2b28;
  --controlBorder: #383632;
  --onControl: #f4efe1;
  --controlLetter: #f4efe1;
  --seam: #050505;
  --pick: #f4efe1;
  --onPick: #141413;
  --action: #ffd400;
  --onAction: #141413;
  --actionInside: #ffd400;
  --onActionInside: #141413;
  --track: #2a2926;
  --bar: #f4efe1;
  --correct: #2fd37a;
  --onCorrect: #0b1a10;
  --wrong: #ff5a47;
  --onWrong: #1a0a08;
  --band: #141413;
  --onBand: #f4efe1;
  --qrPaper: #f4efe1;
  --qrInk: #141413;
  --font-display: "Martian Mono";
  --axes-display: "wght" 700, "wdth" 75;
  --font-strong: "Martian Mono";
  --axes-strong: "wght" 800, "wdth" 75;
  --font-body: "Martian Mono";
  --axes-body: "wght" 600, "wdth" 75;
  --size-question: 33px;
  --size-answer: 88px;
  --size-body: 19px;
  --radius: 0px;
  --strip: 0px;
}

:root[data-edge-strip="true"] {
  /* Matches the column the app draws on a regular iPhone. */
  --strip: 36px;
}

:root[data-control="rounded"] {
  --radius: 14px;
}

:root[data-control="tile"] {
  --radius: 4px;
}

:root[data-control="plaque"] {
  --radius: 3px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--page, var(--outside));
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-variation-settings: var(--axes-body);
  font-size: var(--size-body);
  line-height: 1.22;
}

main {
  --bg: var(--outside);
  --fg: var(--onOutside);
  --muted: var(--onOutsideMuted);
  --accent: var(--outsideAccent);
  --stripe: var(--edge);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 520px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) calc(18px + var(--strip)) max(22px, env(safe-area-inset-bottom)) 18px;
  background: var(--bg);
  color: var(--fg);
  overflow: hidden;
}

main[data-side="inside"] {
  --bg: var(--inside);
  --fg: var(--onInside);
  --muted: var(--onInsideMuted);
  --accent: var(--insideAccent);
  --stripe: var(--edgeInside);
}

/* The card's other side showing along its edge. */
main::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--strip);
  background: var(--stripe);
  content: "";
}

p,
h1,
h2 {
  margin: 0;
}

.display {
  font-family: var(--font-display), Impact, "Arial Narrow", sans-serif;
  font-variation-settings: var(--axes-display);
  font-weight: normal;
}

.strong {
  font-family: var(--font-strong), var(--font-body), sans-serif;
  font-variation-settings: var(--axes-strong);
  font-weight: normal;
}

.grow {
  flex: 1 1 0;
  min-height: 8px;
}

.icon {
  flex: none;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Flap tiles, for themes that use them ---------- */
.tiles {
  display: inline-flex;
  gap: 2px;
  vertical-align: middle;
}

.t {
  --tile-a: var(--control);
  --tile-b: var(--controlShade);
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 1.15em;
  height: 1.5em;
  border-radius: 3px;
  background: linear-gradient(var(--tile-a) calc(50% - 0.75px), var(--seam) calc(50% - 0.75px) calc(50% + 0.75px), var(--tile-b) calc(50% + 0.75px));
  color: var(--onControl);
  line-height: 1;
  font-family: var(--font-strong);
  font-variation-settings: var(--axes-strong);
}

.tiles.accent .t {
  --tile-a: var(--action);
  --tile-b: var(--action);
  color: var(--onAction);
}

.tiles.right .t {
  --tile-a: var(--correct);
  --tile-b: var(--correct);
  color: var(--onCorrect);
}

.tiles.wrong .t {
  --tile-a: var(--wrong);
  --tile-b: var(--wrong);
  color: var(--onWrong);
}

/* ---------- Header ---------- */
.question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 24px;
  font-family: var(--font-strong), sans-serif;
  font-variation-settings: var(--axes-strong);
  font-size: 18px;
  color: var(--muted);
}

.question-header > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.points {
  color: var(--accent);
}

:root[data-numerals="tiles"] .question-header {
  font-size: 15px;
}

:root[data-verdict="stamp"] .points {
  display: grid;
  place-content: center;
  gap: 0;
  width: 64px;
  height: 64px;
  border: 2.5px solid currentColor;
  border-radius: 50%;
  outline: 1px solid currentColor;
  outline-offset: 2px;
  text-align: center;
  font-size: 11px;
  line-height: 1;
}

:root[data-verdict="stamp"] .points b {
  display: block;
  font-family: var(--font-display);
  font-variation-settings: var(--axes-display);
  font-size: 23px;
  font-weight: normal;
}

.question-text {
  font-family: var(--font-display), Impact, sans-serif;
  font-variation-settings: var(--axes-display);
  font-size: var(--size-question);
  line-height: 1;
  overflow-wrap: anywhere;
}

:root[data-numerals="tiles"] .question-text {
  line-height: 1.14;
}

/* ---------- Answer controls ---------- */
.choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

button {
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 8px 16px 8px 0;
  border: 2px solid var(--controlBorder);
  border-radius: var(--radius);
  background: var(--control);
  color: var(--onControl);
  text-align: left;
  font-family: var(--font-strong), sans-serif;
  font-variation-settings: var(--axes-strong);
  font-size: 28px;
}

.choice > * {
  position: relative;
}

.choice-letter {
  flex: none;
  width: 52px;
  text-align: center;
  color: var(--controlLetter);
  font-family: var(--font-display);
  font-variation-settings: var(--axes-display);
  font-size: 32px;
}

.choice-text {
  flex: 1;
  min-width: 0;
  padding-left: 16px;
}

.choice-letter + .choice-text {
  padding-left: 0;
}

.your-pick {
  flex: none;
  font-family: var(--font-body), sans-serif;
  font-variation-settings: var(--axes-body);
  font-size: 15px;
}

.choice.picked {
  border-color: var(--pick);
  background: var(--pick);
  color: var(--onPick);
}

.choice.picked .choice-letter {
  color: var(--onPick);
}

:root[data-control="clipped"] .choice {
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

:root[data-control="tile"] .choice:not(.picked) {
  position: relative;
  background: linear-gradient(var(--control) 50%, var(--controlShade) 50%);
}

/* The hinge shows only at the row's ends, so it never looks like a line through the answer. */
:root[data-control="tile"] .choice:not(.picked)::before,
:root[data-control="tile"] .choice:not(.picked)::after {
  content: "";
  position: absolute;
  top: calc(50% - 0.75px);
  width: 16px;
  height: 1.5px;
  background: var(--seam);
}

:root[data-control="tile"] .choice:not(.picked)::before {
  left: 0;
  width: 10px;
}

:root[data-control="tile"] .choice:not(.picked)::after {
  right: 0;
}

:root[data-control="tile"] .choice {
  border: 0;
  font-size: 22px;
}

:root[data-control="tile"] .choice-letter {
  align-self: stretch;
  display: grid;
  place-items: center;
  margin: -8px 0;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(transparent calc(50% - 0.75px), var(--seam) calc(50% - 0.75px) calc(50% + 0.75px), transparent calc(50% + 0.75px)), rgb(255 255 255 / 0.1);
  font-size: 24px;
}

:root[data-control="plaque"] .choice {
  --r: 9px;
  border: 0;
  background: var(--controlBorder);
  -webkit-mask: radial-gradient(var(--r) at var(--r) var(--r), #0000 97%, #000) calc(var(--r) * -1) calc(var(--r) * -1);
  mask: radial-gradient(var(--r) at var(--r) var(--r), #0000 97%, #000) calc(var(--r) * -1) calc(var(--r) * -1);
  font-size: 25px;
}

:root[data-control="plaque"] .choice::before {
  --r: 7.5px;
  position: absolute;
  inset: 2.5px;
  background: var(--control);
  -webkit-mask: radial-gradient(var(--r) at var(--r) var(--r), #0000 97%, #000) calc(var(--r) * -1) calc(var(--r) * -1);
  mask: radial-gradient(var(--r) at var(--r) var(--r), #0000 97%, #000) calc(var(--r) * -1) calc(var(--r) * -1);
  content: "";
}

:root[data-control="plaque"] .choice.picked {
  background: var(--pick);
}

:root[data-control="plaque"] .choice.picked::before {
  display: none;
}

:root[data-control="plaque"] .choice-letter {
  font-style: italic;
}

button:focus-visible {
  outline: 3px solid var(--fg);
  outline-offset: -5px;
}

.primary {
  width: 100%;
  min-height: 60px;
  padding: 10px 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--action);
  color: var(--onAction);
  font-family: var(--font-strong), sans-serif;
  font-variation-settings: var(--axes-strong);
  font-size: 26px;
}

:root[data-control="clipped"] .primary {
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

/* ---------- Status line and band ---------- */
.status-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  font-family: var(--font-strong), sans-serif;
  font-variation-settings: var(--axes-strong);
  font-size: 24px;
}

:root[data-numerals="tiles"] .status-line {
  font-size: 18px;
}

.is-hidden {
  visibility: hidden;
}

:root[data-band="strike"] .status-line,
:root[data-band="strike"] .score-row {
  margin: 0 -18px calc(max(22px, env(safe-area-inset-bottom)) * -1);
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  background-color: var(--band);
  background-image: radial-gradient(rgb(255 255 255 / 0.14) 1px, transparent 1.4px);
  background-size: 5px 5px;
  color: var(--onBand);
  box-shadow: 0 -3px 0 rgb(0 0 0 / 0.28);
}

:root[data-band="strike"] .status-line.is-hidden {
  visibility: visible;
}

:root[data-band="strike"] .status-line.is-hidden > * {
  visibility: hidden;
}

.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--font-display), sans-serif;
  font-variation-settings: var(--axes-display);
  font-size: 32px;
  font-variant-numeric: tabular-nums;
}

:root[data-numerals="tiles"] .score-row {
  background: transparent;
  color: var(--fg);
  padding: 0;
  font-size: 15px;
}

/* ---------- Verdicts ---------- */
.verdict {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px 10px;
  font-family: var(--font-display), Impact, sans-serif;
  font-variation-settings: var(--axes-display);
  font-size: 68px;
  line-height: 1;
}

.verdict.right {
  background: var(--correct);
  color: var(--onCorrect);
}

.verdict.wrong {
  background: var(--wrong);
  color: var(--onWrong);
}

.verdict.none {
  padding-left: 0;
  color: var(--muted);
}

:root[data-verdict="tiles"] .verdict {
  padding: 0;
  background: none;
  font-size: 26px;
}

:root[data-verdict="stamp"] .verdict {
  justify-content: flex-start;
  padding: 0;
  background: none;
  color: var(--fg);
  font-size: 50px;
}

:root[data-verdict="stamp"] .verdict .stamp-text {
  display: inline-block;
  padding: 2px 12px 5px;
  border: 3px solid currentColor;
  border-radius: 6px;
  transform: rotate(-4deg);
  font-family: var(--font-strong);
  font-variation-settings: var(--axes-strong);
  font-size: 30px;
}

:root[data-verdict="stamp"] .verdict.right .stamp-text {
  color: var(--correct);
}

:root[data-verdict="stamp"] .verdict.wrong .stamp-text {
  color: var(--wrong);
}

.answer-word {
  font-family: var(--font-display), Impact, sans-serif;
  font-variation-settings: var(--axes-display);
  font-size: 76px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.small-question {
  color: var(--muted);
  font-family: var(--font-strong), sans-serif;
  font-variation-settings: var(--axes-strong);
  font-size: 24px;
  line-height: 1.12;
}

/* ---------- Vote rows ---------- */
.tally {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.row {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 2px;
  min-height: 54px;
  padding: 0 12px;
  border-radius: var(--radius);
  background: var(--track);
  color: var(--onInside);
  overflow: hidden;
  font-family: var(--font-strong), sans-serif;
  font-variation-settings: var(--axes-strong);
  font-size: 26px;
}

.row b {
  color: var(--onInsideMuted);
  font-family: var(--font-display), sans-serif;
  font-variation-settings: var(--axes-display);
  font-weight: normal;
}

.row .count {
  font-family: var(--font-display), sans-serif;
  font-variation-settings: var(--axes-display);
  font-size: 32px;
}

.row .bar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: calc(var(--share, 0) * 100%);
  height: 5px;
  background: var(--bar);
}

/* On a filled row the bar sits inside the color, so it doesn't look like a bite out of the edge. */
.row.right .bar,
.row.mine-wrong .bar {
  left: 12px;
  bottom: 4px;
  width: calc(var(--share, 0) * (100% - 24px));
  height: 4px;
}

.row .mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.row.right {
  background: var(--correct);
  color: var(--onCorrect);
}

.row.right b {
  color: var(--onCorrect);
}

.row.right .bar {
  background: var(--onCorrect);
}

.row.mine-wrong {
  background: var(--wrong);
  color: var(--onWrong);
}

.row.mine-wrong b {
  color: var(--onWrong);
}

.row.mine-wrong .bar {
  background: var(--onWrong);
}

/* A printed menu line, with dots leading to the number. */
:root[data-results="leader"] .row {
  grid-template-columns: 26px auto 1fr auto;
  min-height: 44px;
  padding: 0 8px;
  background: transparent;
}

:root[data-results="leader"] .row.right,
:root[data-results="leader"] .row.mine-wrong {
  background: var(--correct);
}

:root[data-results="leader"] .row.mine-wrong {
  background: var(--wrong);
}

:root[data-results="leader"] .row b {
  font-style: italic;
}

:root[data-results="leader"] .row .bar {
  display: none;
}

.row .leader {
  display: none;
}

:root[data-results="leader"] .row .leader {
  display: block;
  height: 0;
  margin: 0 8px;
  border-bottom: 2.5px dotted currentColor;
  opacity: 0.45;
  transform: translateY(5px);
}

/* ---------- Screens ---------- */
.wordmark {
  font-family: var(--font-display), Impact, sans-serif;
  font-variation-settings: var(--axes-display);
  font-size: 88px;
  line-height: 0.95;
  white-space: nowrap;
}

h1.title {
  font-family: var(--font-display), Impact, sans-serif;
  font-variation-settings: var(--axes-display);
  font-size: 60px;
  font-weight: normal;
  line-height: 1;
  overflow-wrap: anywhere;
}

.eyebrow {
  color: var(--muted);
  font-family: var(--font-strong), sans-serif;
  font-variation-settings: var(--axes-strong);
  font-size: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-strong), sans-serif;
  font-variation-settings: var(--axes-strong);
  font-size: 20px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.text-field {
  width: 100%;
  min-height: 64px;
  padding: 0 16px;
  border: 2px solid var(--controlBorder);
  border-radius: var(--radius);
  background: var(--control);
  color: var(--onControl);
  font-family: var(--font-strong), sans-serif;
  font-variation-settings: var(--axes-strong);
  font-size: 28px;
}

.text-field:focus {
  outline: 3px solid var(--fg);
  outline-offset: 2px;
}

/* Six slots in two groups, matching how the MC reads the code out. */
.code-slots {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr) 14px repeat(3, 1fr);
  gap: 6px;
}

.code-slots .slot {
  display: grid;
  place-items: center;
  height: 76px;
  border: 2px solid var(--controlBorder);
  border-radius: var(--radius);
  background: var(--control);
  color: var(--onControl);
  font-family: var(--font-display), sans-serif;
  font-variation-settings: var(--axes-display);
  font-size: 44px;
}

.code-slots .slot.active {
  border-color: var(--onControl);
}

.code-slots .slot.active::after {
  content: "";
  width: 3px;
  height: 44px;
  background: var(--onControl);
  animation: caret-blink 1.1s steps(1) infinite;
}

@keyframes caret-blink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .code-slots .slot.active::after {
    animation: none;
  }
}

.code-slots .gap {
  grid-column: 4;
}

.code-slots input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-size: 16px;
  outline: none;
}

.error {
  font-family: var(--font-strong), sans-serif;
  font-variation-settings: var(--axes-strong);
}

.nickname-hero {
  font-family: var(--font-display), Impact, sans-serif;
  font-variation-settings: var(--axes-display);
  font-size: 84px;
  line-height: 1;
  overflow-wrap: anywhere;
}

main.centered {
  justify-content: center;
}

.winner-label {
  color: var(--muted);
  font-family: var(--font-strong), sans-serif;
  font-variation-settings: var(--axes-strong);
  font-size: 22px;
}

.winner-name {
  font-family: var(--font-display), Impact, sans-serif;
  font-variation-settings: var(--axes-display);
  font-size: 84px;
  line-height: 0.98;
  color: var(--accent);
  overflow-wrap: anywhere;
}

.winner-score {
  font-family: var(--font-strong), sans-serif;
  font-variation-settings: var(--axes-strong);
  font-size: 28px;
}

.leaderboard {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard li {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  min-height: 46px;
  border-top: 2px solid var(--track);
  font-family: var(--font-strong), sans-serif;
  font-variation-settings: var(--axes-strong);
  font-size: 24px;
}

.leaderboard li:first-child {
  border-top: 0;
}

.leaderboard .rank {
  color: var(--muted);
}

.leaderboard .name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.leaderboard .you {
  color: var(--muted);
  font-family: var(--font-body), sans-serif;
  font-variation-settings: var(--axes-body);
  font-size: 15px;
}

.leaderboard .mine {
  margin: 0 -8px;
  padding: 0 8px;
  background: var(--track);
}

.leaderboard .first .rank,
.leaderboard .first .points-value {
  color: var(--accent);
}

/* ---------- The moment the card opens ---------- */
@keyframes reveal-turn {
  from {
    transform: perspective(1200px) rotateY(82deg);
  }
}

@keyframes reveal-lift {
  from {
    transform: perspective(1200px) rotateX(70deg);
  }
}

@keyframes reveal-fade {
  from {
    opacity: 0;
  }
}

@keyframes reveal-tile {
  from {
    transform: perspective(400px) rotateX(-90deg);
  }
}

:root[data-reveal="turn"] main.opening {
  animation: reveal-turn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

:root[data-reveal="lift"] main.opening {
  transform-origin: 50% 100%;
  animation: reveal-lift 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

:root[data-reveal="fade"] main.opening {
  animation: reveal-fade 0.35s ease-out;
}

:root[data-reveal="tiles"] main.opening .t {
  animation: reveal-tile 0.28s cubic-bezier(0.3, 1.4, 0.5, 1) backwards;
  animation-delay: calc(var(--i, 0) * 35ms);
}

@media (prefers-reduced-motion: reduce) {
  main.opening,
  main.opening .t {
    animation: none !important;
  }
}

.connection {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: calc(env(safe-area-inset-top) + 8px) 16px 8px;
  background: var(--action);
  color: var(--onAction);
  font-family: var(--font-strong), sans-serif;
  font-variation-settings: var(--axes-strong);
  font-size: 18px;
  text-align: center;
}

.connection[hidden] {
  display: none;
}

/* ---------- Home page, below the room code ---------- */
.host-link {
  position: absolute;
  left: 18px;
  bottom: max(22px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--fg);
  font-family: var(--font-strong), sans-serif;
  font-variation-settings: var(--axes-strong);
  font-size: 20px;
  text-decoration: none;
}

.host-link .icon {
  width: 22px;
  height: 22px;
}

.about {
  position: relative;
  background: var(--inside);
  color: var(--onInside);
  font-family: var(--font-body), sans-serif;
  font-variation-settings: var(--axes-body);
}

.about[hidden] {
  display: none;
}

/* The card's other side showing along its edge, as on the screen above. */
.about::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--strip);
  background: var(--edgeInside);
  content: "";
}

/* The content sits above the edge strip, so the rows that scroll into the strip stay visible. */
.about-inner {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 56px calc(18px + var(--strip)) max(40px, env(safe-area-inset-bottom)) 18px;
}

.about-block {
  margin-bottom: 64px;
}

/* Text lines up with the room code column above. Pictures can run wider on large screens. */
.about-block > :not(.shots, .duo-pair),
.about-footer {
  max-width: calc(520px - 36px - var(--strip));
  margin-left: auto;
  margin-right: auto;
}

.about h2 {
  margin-bottom: 14px;
  font-family: var(--font-display), Impact, sans-serif;
  font-variation-settings: var(--axes-display);
  font-size: calc(var(--size-question) * 0.86);
  line-height: 0.95;
}

.about p {
  margin: 0 0 14px;
  font-size: 19px;
  line-height: 1.4;
}

.about .about-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  background: var(--actionInside, var(--outside));
  color: var(--onActionInside, var(--onOutside));
  text-align: center;
  text-decoration: none;
}

.about .about-note {
  margin-top: 10px;
  color: var(--onInsideMuted);
  font-size: 17px;
}

.steps {
  display: grid;
  gap: 18px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: baseline;
}

.step-number {
  color: var(--insideAccent);
  font-family: var(--font-display), Impact, sans-serif;
  font-variation-settings: var(--axes-display);
  font-size: 44px;
  line-height: 1;
}

.steps p {
  margin: 0;
}

/* The closed phone sits beside the open one, at the same height. On a phone the pair scrolls through the edge strip, like the theme shots. */
.duo-pair {
  display: flex;
  gap: 14px;
  margin: 18px calc(-18px - var(--strip)) 0 -18px;
  padding: 0 calc(18px + var(--strip)) 8px 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 18px;
  scrollbar-width: none;
}

.duo-pair::-webkit-scrollbar {
  display: none;
}

/* Both phones share one height, so the open phone is the wider image. */
.duo-pair img {
  flex: none;
  display: block;
  width: auto;
  height: 300px;
  scroll-snap-align: start;
  filter: drop-shadow(0 18px 24px rgb(0 0 0 / 0.35));
}

.shots img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 24px rgb(0 0 0 / 0.35));
}

.about-closing {
  margin-bottom: 48px;
}

.about-closing .about-cta {
  margin-top: 0;
}

.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(62%, 240px);
  gap: 14px;
  margin: 18px calc(-18px - var(--strip)) 0 -18px;
  padding: 0 calc(18px + var(--strip)) 8px 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 18px;
  scrollbar-width: none;
}

.shots::-webkit-scrollbar {
  display: none;
}

/* Each screenshot is a button that puts the page in its theme. The chosen theme's name is underlined. */
.shot {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--onInsideMuted);
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
}

.shot:focus-visible {
  outline: 3px solid var(--insideAccent);
  outline-offset: 4px;
}

.shot-name {
  display: inline-block;
  margin-top: 12px;
  padding-bottom: 4px;
  border-bottom: 3px solid transparent;
  font-family: var(--font-strong), sans-serif;
  font-variation-settings: var(--axes-strong);
  font-size: 20px;
  transition: border-color 0.15s, color 0.15s;
}

.shot:hover .shot-name,
.shot[aria-checked="true"] .shot-name {
  color: var(--onInside);
}

.shot[aria-checked="true"] .shot-name {
  border-bottom-color: var(--insideAccent);
}

/* The rule takes the theme's text color, so it shows on dark and light themes alike. */
.about-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 22px;
  border-top: 1px solid color-mix(in srgb, var(--onInside) 22%, transparent);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--onInside);
  font-family: var(--font-strong), sans-serif;
  font-variation-settings: var(--axes-strong);
  font-size: 16px;
  text-decoration: none;
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
  white-space: nowrap;
}

.footer-links a:hover {
  text-decoration-line: underline;
  text-decoration-color: var(--insideAccent);
}

.footer-links a:focus-visible {
  outline: 2px solid var(--insideAccent);
  outline-offset: 4px;
}

.about .footer-credit {
  margin: 0;
  color: var(--onInsideMuted);
  font-size: 14px;
}

.about-block a:not(.primary) {
  color: var(--onInside);
}

@media (min-width: 760px) {
  /* On a wide window the edge strip follows the window's edge, not the narrow column. */
  main::after {
    position: fixed;
  }

  .shots {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    margin: 18px 0 0;
    padding: 0;
    overflow: visible;
  }

  .about h2 {
    font-size: calc(var(--size-question) * 1.15);
  }

  .about p {
    font-size: 21px;
    line-height: 1.35;
  }

  .duo-pair {
    display: grid;
    grid-template-columns: 760fr 1440fr;
    align-items: end;
    gap: 4%;
    max-width: 860px;
    margin: 18px auto 0;
    padding: 0;
    overflow: visible;
  }

  .duo-pair img {
    width: 100%;
    height: auto;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ---------- Rating after the game ---------- */
.rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 24px;
}

.rating p {
  flex: 1 0 100%;
  margin: 0;
  font-family: var(--font-strong), sans-serif;
  font-variation-settings: var(--axes-strong);
  font-size: 20px;
  line-height: 1.15;
}

.rate {
  display: grid;
  place-items: center;
  width: 72px;
  height: 52px;
  border: 2.5px solid var(--fg);
  border-radius: var(--radius);
  background: transparent;
  color: var(--fg);
}

.rate .icon {
  width: 34px;
  height: 34px;
  fill: currentColor;
  stroke: none;
}

.rate.chosen {
  background: var(--fg);
  color: var(--bg);
}
