/* lifesimulator.app/play/: the browser game, in the life pages' look (night navy, warm paper cards, gold, the three
 * vitals, Nunito). Written for a phone first; a phone and a tablet keep one column, and from 1024 px the page has its
 * own wide layout (the end of this file). Nothing moves under prefers-reduced-motion. */
@font-face {
  font-family: Nunito;
  src: url('/lives/nunito.ttf') format('truetype');
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --navy: #0c1a2c;
  --navy-2: #16304c;
  --paper: #f5f2ec;
  --card: #ffffff;
  --ink: #1b2232;
  --ink-2: #566074;
  --dim: #aab3c4;
  --gold: #ffc53d;
  --coral: #ff5e57;
  --rose: #ff4f7b;
  --amber: #ffb627;
  --mint: #2ed39a;
  --sky: #5fb2ff;
  --spring: cubic-bezier(0.2, 1.4, 0.4, 1);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--navy);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: linear-gradient(180deg, var(--navy), var(--navy-2) 60%, #20264a);
  background-attachment: fixed;
  color: #fff;
  font: 700 17px/1.45 Nunito, ui-rounded, system-ui, sans-serif;
}

button {
  font-family: inherit;
}

[hidden] {
  display: none !important;
}

/* Words for a screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The ring shows for keyboard players (html.keys, set by play.js on Tab, Enter, Space and the arrows): after a tap
   or a click, the focus the page moves for them stays quiet */
:focus-visible {
  outline: none;
}
.keys :focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.play {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px;
}

.kicker {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lead {
  max-width: 30em;
  margin: 12px auto 22px;
  color: #d7dce6;
}

.note {
  margin: 12px 0 0;
  color: var(--dim);
  font-size: 15px;
}

.start {
  display: block;
  width: 100%;
  min-height: 58px;
  padding: 0 24px;
  border: 0;
  border-radius: 29px;
  background: var(--gold);
  color: var(--navy);
  font: 900 20px/1.1 Nunito, system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 16px 30px -16px #ffc53daa;
  transition: transform 0.18s var(--ease);
}
.start:active,
.next:active,
.option:active,
.end-actions button:active {
  transform: scale(0.97);
}
.start-small {
  width: auto;
  min-height: 50px;
  margin: 0 auto;
  font-size: 18px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.badge {
  display: block;
  min-height: 44px;
}
.badge img {
  display: block;
  height: 44px;
  width: auto;
}
@media (min-width: 420px) {
  .badge img {
    height: 54px;
  }
  .badges-small .badge img {
    height: 44px;
  }
}

/* ---- the first screen ---- */
.intro {
  padding: max(26px, env(safe-area-inset-top)) 0 36px;
  text-align: center;
}
.intro h1 {
  margin: 0;
  font-size: clamp(34px, 9.4vw, 48px);
  font-weight: 900;
  line-height: 1.04;
}
.strip {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 24px;
}
.strip-card {
  width: 31%;
  max-width: 168px;
  margin: 0;
  padding: 6px 6px 3px;
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 16px 30px -18px #000;
  transform: rotate(-3deg);
  animation: rise-in 0.6s var(--spring) both;
}
.strip-card:nth-child(2) {
  transform: translateY(-10px) rotate(1.5deg);
  animation-delay: 0.08s;
}
.strip-card:nth-child(3) {
  transform: rotate(3deg);
  animation-delay: 0.16s;
}
.strip-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 13px;
}
.strip-card figcaption {
  padding: 3px 0 1px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}
.intro-call {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid #ffffff1a;
}
.call-free {
  margin: 10px 0 0;
  color: var(--dim);
  font-size: 14px;
}

/* ---- the top bar of a life ---- */
.life {
  padding-bottom: 128px;
}
.hud {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 -16px;
  padding: max(10px, env(safe-area-inset-top)) 16px 12px;
  background: #0c1a2cf2;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px -14px #000;
}
.hud-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hud-face {
  flex: none;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--paper);
}
.hud-face img,
.end-face img,
.board-face img {
  display: block;
  width: 100%;
  height: 100%;
}
.hud-who {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.hud-who b {
  overflow: hidden;
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.hud-who small {
  overflow: hidden;
  color: var(--dim);
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.hud-age {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
  padding: 5px 12px 6px;
  border-radius: 16px;
  background: var(--navy-2);
}
.hud-age small {
  color: var(--dim);
  font-size: 12px;
  line-height: 1.1;
}
.hud-age b {
  color: var(--gold);
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hud-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 16px;
  margin-top: 10px;
}
.meter {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.meter-name {
  color: #c4cbd8;
  font-size: 12px;
  line-height: 1.1;
}
.meter.low .meter-name {
  color: var(--coral);
}
.meter-bar {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: #ffffff1f;
}
.meter-bar i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  transform-origin: left;
  transform: scaleX(max(0.02, var(--v, 0.5)));
  transition: transform 0.5s var(--ease);
}
.meter-health i {
  background: linear-gradient(90deg, #ff7a93, var(--rose));
}
.meter-happy i {
  background: linear-gradient(90deg, #ffe07a, var(--amber));
}
.meter-smarts i {
  background: linear-gradient(90deg, #9fd3ff, var(--sky));
}
.meter-money i {
  background: linear-gradient(90deg, #7df0c4, #22c98c);
}

/* ---- the diary ---- */
.diary {
  margin: 0;
  padding: 16px 0 8px;
  list-style: none;
}
.row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 12px 28px -18px #000;
  scroll-margin: 210px 0 130px;
}
.row.new {
  animation: row-in 0.4s var(--spring) both;
}
.row p {
  margin: 0;
  font-weight: 800;
}
.row-age {
  flex: none;
  min-width: 38px;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--navy);
  color: var(--gold);
  font-size: 15px;
  font-weight: 900;
  text-align: center;
}
.row-body {
  min-width: 0;
}
.tone-funny {
  background: #fff8e4;
}
.tone-sad {
  background: #e6e8ee;
}
.tone-shame {
  background: #ffe9e6;
}
.tone-proud {
  background: #e4f8ef;
}
.row-quiet {
  padding: 2px 14px;
  background: none;
  box-shadow: none;
  color: var(--dim);
}
.row-quiet p {
  font-weight: 700;
}
.row-quiet .row-age {
  background: #ffffff14;
  color: #c4cbd8;
}
.row-birth p {
  font-size: 19px;
  font-weight: 900;
}
.row-death {
  background: #2c3a56;
  color: #fff;
}
.row-death .row-age {
  background: #fff;
  color: var(--navy);
}
.row-stage {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  scroll-margin: 210px 0 130px;
}
.row-stage::before,
.row-stage::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #ffc53d55;
}
.fx {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.fx i {
  padding: 1px 8px;
  border-radius: 10px;
  background: #1b22320f;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}
.fx .up {
  color: #0d6e49;
}
.fx .down {
  color: #b2302a;
}

/* ---- the town on the life's card: things, quests, achievements (a phone: the things and the achievements in a row
   under the bars, the quests in a row of their own below, side by side when they fit) ---- */
.hud-town {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    'bag medals'
    'quests quests';
  align-items: center;
  gap: 6px 10px;
  margin-top: 10px;
}
.hud-label {
  display: none;
}
.hud-bag {
  grid-area: bag;
  min-width: 0;
}
.bag {
  display: flex;
  gap: 3px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
  -webkit-mask-image: linear-gradient(90deg, #000 78%, transparent);
  mask-image: linear-gradient(90deg, #000 78%, transparent);
}
.bag-thing {
  flex: none;
  width: 28px;
  height: 28px;
}
.bag-thing .thing-pic {
  display: block;
  width: 100%;
  height: 100%;
}
.bag-thing.new {
  animation: pop-in 0.55s var(--spring) both;
}
.bag-name {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.bag-empty,
.quest-none {
  color: var(--dim);
  font-size: 12px;
  line-height: 28px;
}
.hud-quests {
  grid-area: quests;
  min-width: 0;
}
.quest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.quest {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  color: #eef2f8;
  font-size: 13px;
  font-weight: 800;
  line-height: 24px;
}
.quest .thing-pic {
  flex: none;
  width: 18px;
  height: 18px;
}
.quest-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.quest-place {
  flex: none;
  padding: 0 7px;
  border-radius: 8px;
  background: #ffc53d26;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  line-height: 18px;
}
.hud-medals {
  grid-area: medals;
  display: flex;
  flex: none;
  align-items: center;
  gap: 4px;
  margin: 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}
.hud-medals .thing-pic {
  width: 20px;
  height: 20px;
}
.hud-medals span {
  display: none;
}
@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.3) rotate(-12deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---- an achievement's moment ---- */
.toasts {
  position: fixed;
  z-index: 40;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  display: grid;
  gap: 8px;
  width: min(92vw, 380px);
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 10px 10px;
  border: 1.5px solid #ffc53d80;
  border-radius: 22px;
  background: linear-gradient(135deg, #263a62, #1a2846);
  box-shadow: 0 18px 40px -14px #000;
  color: #fff;
  animation: toast-in 0.5s var(--spring) both;
}
.toast .thing-pic {
  flex: none;
  width: 46px;
  height: 46px;
}
.toast-words {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.toast-words small {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.toast-words b {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
}
.toast.leaving {
  animation: toast-out 0.45s var(--ease) both;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-18px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
  }
}

/* ---- a day in town: four places (two by two on a phone), then what to do at the one picked ---- */
.sheet-town {
  padding-top: 20px;
}
.sheet-town .sheet-kicker {
  margin-top: 0;
}
.sheet-town .sheet-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.place-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  padding: 6px 6px 10px;
  border: 0;
  border-radius: 20px;
  background: var(--navy);
  color: #fff;
  font: 900 15px/1.15 Nunito, system-ui, sans-serif;
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.2s;
}
.place-card:hover {
  background: var(--navy-2);
}
.place-card:active {
  transform: scale(0.97);
}
.place-art {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 15px;
  background: var(--navy-2);
}
.place-pic {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.place-name {
  padding: 0 2px;
}
.place-quest {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 5px;
  border-radius: 10px;
  background: #ffc53d2b;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
}
.place-quest .thing-pic {
  flex: none;
  width: 16px;
  height: 16px;
}
.option-deed {
  display: flex;
  align-items: center;
  gap: 12px;
}
.option-ware {
  padding-left: 10px;
}
.option-ware > .thing-pic {
  flex: none;
  width: 40px;
  height: 40px;
}
.deed-label {
  flex: 1;
  min-width: 0;
}
.deed-tags {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
}
.deed-tags .thing-pic {
  width: 28px;
  height: 28px;
}
.deed-price,
.deed-gain {
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}
.deed-price {
  background: #ff5e5730;
  color: #ffb9b4;
}
.deed-gain {
  background: #2ed39a2b;
  color: #8ff0c9;
}

/* ---- the town in the diary: where a day was, a thing that came or went, a quest done, an achievement ---- */
.row-place {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  padding: 2px 10px 2px 2px;
  border-radius: 12px;
  background: #1b223212;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.row-place-pic {
  width: 34px;
  height: 22px;
  border-radius: 9px;
  object-fit: cover;
}
.fx .fx-thing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-left: 3px;
}
.fx-thing .thing-pic {
  width: 18px;
  height: 18px;
}
.fx .fx-thing.got {
  background: #ffc53d45;
  color: #5e4300;
}
.fx .fx-thing.gone {
  color: #6a7385;
}
.fx-thing.gone span {
  text-decoration: line-through;
}
.row-quest,
.row-achievement {
  align-items: center;
  margin-left: 50px;
  padding: 8px 14px 8px 8px;
  border: 1.5px solid #ffc53d70;
  background: linear-gradient(135deg, #263a62, #1a2846);
  color: #fff;
}
.row-quest > .thing-pic,
.row-achievement > .thing-pic {
  flex: none;
  width: 36px;
  height: 36px;
}
.row-quest p,
.row-achievement p {
  font-size: 15px;
}
.row-note {
  display: block;
  color: #c4cbd8;
  font-size: 12px;
  font-weight: 700;
}
.row-quest .fx i,
.row-achievement .fx i {
  background: #ffffff1a;
}
.row-quest .fx .up {
  color: #8ff0c9;
}

/* ---- the ending: what the life left behind, where it went, what it earned ---- */
.end-town {
  margin-top: 26px;
  padding: 22px 20px 20px;
  border-radius: 30px;
  background: var(--paper);
  color: var(--ink);
}
.end-town h2 {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.end-town ul + h2 {
  margin-top: 22px;
}
.end-things,
.end-places,
.end-medals,
.end-quests {
  margin: 0;
  padding: 0;
  list-style: none;
}
.end-things {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 8px;
}
.end-things li {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 5px;
  padding: 10px 4px;
  border-radius: 16px;
  background: #1b22320b;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}
.end-things .thing-pic {
  width: 44px;
  height: 44px;
}
.end-things .end-none {
  grid-column: 1 / -1;
  justify-items: start;
  padding: 0;
  background: none;
  color: var(--ink-2);
}
.end-places {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
  gap: 8px;
}
.end-places li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 16px;
  background: #1b22320b;
}
.end-place-pic {
  flex: none;
  width: 54px;
  height: 40px;
  border-radius: 11px;
  object-fit: cover;
}
.end-places span,
.end-medals span {
  display: grid;
  min-width: 0;
}
.end-places b {
  font-size: 15px;
  line-height: 1.15;
}
.end-places small {
  color: var(--ink-2);
  font-weight: 800;
}
.end-medals {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  gap: 8px;
}
.end-medals li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 6px;
  border-radius: 16px;
  background: #ffc53d33;
}
.end-medals li.not {
  background: #1b22320b;
}
.end-medals li.not .thing-pic {
  opacity: 0.32;
  filter: grayscale(1);
}
.end-medals li.not b {
  color: var(--ink-2);
}
.end-medals .thing-pic {
  flex: none;
  width: 32px;
  height: 32px;
}
.end-medals b {
  font-size: 14px;
  line-height: 1.15;
}
.end-medals small {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}
.end-quests {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.end-quests li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px 4px 5px;
  border-radius: 12px;
  background: #2ed39a2e;
  font-size: 13px;
  font-weight: 800;
}
.end-quests .thing-pic {
  width: 20px;
  height: 20px;
}

/* ---- the year button ---- */
/* The dock spans the window and fades into the page's own bottom colour (the body's fixed gradient ends in #20264a),
   so it never shows as a box on a wide screen; the buttons keep to the column */
.controls {
  position: fixed;
  z-index: 6;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 34px 16px max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #20264a00, #20264ad9 42%, #20264a);
  pointer-events: none;
}
.controls-in {
  display: flex;
  gap: 10px;
  max-width: 528px;
  margin: 0 auto;
  pointer-events: auto;
}
.next {
  position: relative;
  overflow: hidden;
  flex: 1;
  min-height: 56px;
  border: 0;
  border-radius: 28px;
  background: var(--gold);
  color: var(--navy);
  font: 900 19px/1.1 Nunito, system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 14px 30px -16px #ffc53daa;
  transition: transform 0.18s var(--ease);
}
/* While the years pass by themselves, a thin line fills along the button until the next one */
.next::after {
  content: '';
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 9px;
  height: 3px;
  border-radius: 2px;
  background: #0c1a2c40;
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
}
.next.ticking::after {
  opacity: 1;
  animation: tick var(--wait, 1500ms) linear forwards;
}
@keyframes tick {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
/* Resting (Auto on, or a question open): a quiet glass pill whose gold line shows the next year coming */
.next:disabled {
  background: #ffffff14;
  color: #ffffff8c;
  box-shadow: none;
  cursor: default;
}
.next:disabled::after {
  background: var(--gold);
}
.next:disabled:active {
  transform: none;
}
.next.ended {
  background: #fff;
  animation: breathe 2.4s ease-in-out infinite;
}
.auto {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 100px;
  min-height: 56px;
  padding: 0 16px;
  border: 0;
  border-radius: 28px;
  background: #ffffff1f;
  color: #fff;
  font: 900 16px/1 Nunito, system-ui, sans-serif;
  cursor: pointer;
}
/* The mark is a round tick, like a checkbox: an empty ring when off, a navy ring with a mint tick when on */
.auto-mark {
  flex: none;
  width: 22px;
  height: 22px;
  overflow: visible;
}
.auto-mark circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  opacity: 0.7;
  transition: fill 0.2s var(--ease), stroke 0.2s var(--ease), opacity 0.2s var(--ease);
}
.auto-mark path {
  fill: none;
  stroke: var(--mint);
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.auto[aria-pressed='true'] {
  background: var(--mint);
  color: var(--navy);
}
.auto[aria-pressed='true'] .auto-mark circle {
  fill: var(--navy);
  stroke: var(--navy);
  opacity: 1;
}
.auto[aria-pressed='true'] .auto-mark path {
  stroke-dashoffset: 0;
  animation: tick-draw 0.34s 0.06s var(--ease) both;
}
@keyframes tick-draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

/* ---- a question ---- */
.sheet-back {
  position: fixed;
  z-index: 20;
  inset: 0;
  background: #050b14b8;
  animation: fade-in 0.25s both;
}
.sheet {
  position: fixed;
  z-index: 21;
  inset: auto 0 0;
  width: min(100%, 560px);
  max-height: 94dvh;
  margin: 0 auto;
  overflow: auto;
  padding: 14px 14px max(16px, env(safe-area-inset-bottom));
  border-radius: 30px 30px 0 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 -20px 50px -20px #000;
  animation: sheet-in 0.45s var(--spring) both;
}
.sheet-art {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(180deg, var(--navy), var(--navy-2) 70%, #20264a);
}
.sheet-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sheet-kicker {
  margin: 14px 4px 2px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sheet h2 {
  margin: 0 4px 14px;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.15;
}
.sheet-options {
  display: grid;
  gap: 10px;
}
.option {
  min-height: 56px;
  padding: 12px 18px;
  border: 0;
  border-radius: 18px;
  background: var(--navy);
  color: #fff;
  font: 900 18px/1.2 Nunito, system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.2s;
}
.option:hover {
  background: var(--navy-2);
}
/* A party on a ballot (src/play/politics.ts): its colour in the box beside its name, every party alike */
.option-party {
  display: flex;
  align-items: center;
  gap: 14px;
}
.option-party::before {
  content: '';
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--party);
  box-shadow: 0 0 0 3px #ffffff30;
}

/* ---- the ending ---- */
.ending {
  padding: max(18px, env(safe-area-inset-top)) 0 120px;
}
.banner {
  margin-bottom: 16px;
  text-align: center;
}
.banner-lead {
  margin: 0 0 14px;
  color: #d7dce6;
}
.stone-card {
  text-align: center;
}
.end-face {
  display: block;
  width: 112px;
  height: 112px;
  margin: 4px auto 12px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 6px var(--gold), 0 20px 44px -16px #000;
}
.stone-card h1 {
  margin: 4px 0 2px;
  font-size: clamp(30px, 8.4vw, 42px);
  font-weight: 900;
  line-height: 1.05;
}
.end-meta {
  margin: 0;
  color: var(--gold);
  font-weight: 900;
}
.end-cause,
.end-last {
  margin: 12px 0 0;
  color: #e3e7ef;
}
.end-cause small,
.end-last small {
  display: block;
  color: var(--dim);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.end-last span {
  font-size: 20px;
}
.stone {
  width: min(86%, 360px);
  margin: 22px auto 0;
  padding: 42px 22px 36px;
  border-radius: 180px 180px 18px 18px;
  background: linear-gradient(150deg, #b4bac6, #8d95a4 55%, #666e7e);
  box-shadow: 0 0 0 5px #ffffff22 inset, 0 24px 50px -18px #000;
  color: var(--ink);
  animation: rise-in 0.8s 0.15s var(--spring) both;
}
.stone p {
  margin: 0;
  font-size: 27px;
  font-weight: 900;
  line-height: 1.15;
}

.score {
  margin-top: 26px;
  padding: 22px 20px 20px;
  border-radius: 30px;
  background: var(--paper);
  color: var(--ink);
}
.score h2,
.score h3 {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.score h3 {
  margin: 18px 0 8px;
}
.score-total {
  display: block;
  font-size: 78px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.score-parts {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.score-parts li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0 12px;
  padding: 8px 0;
  border-top: 1px solid #1b22321a;
}
.part-name {
  font-weight: 800;
}
.part-value {
  font-size: 22px;
  font-weight: 900;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.part-sum {
  grid-column: 1 / -1;
  color: var(--ink-2);
  font-size: 14px;
  font-style: normal;
  font-weight: 800;
}
.score-rule {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 14px;
}
.milestones {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.milestones li {
  padding: 4px 10px;
  border-radius: 12px;
  background: #1b22320d;
  color: #6b7486;
  font-size: 14px;
  font-weight: 800;
}
.milestones li.got {
  background: #dff5ea;
  color: #0b6644;
}
.milestones li.got::before {
  content: '✓ ';
}
.score-better {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--navy);
  color: var(--gold);
  font-weight: 900;
  text-align: center;
}

/* ---- the film, as a life's page plays it ---- */
.film {
  margin-top: 26px;
}
.film-frame {
  position: relative;
  aspect-ratio: 9 / 16;
  max-height: calc(100dvh - 110px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 28px;
  background: var(--navy);
  box-shadow: 0 30px 70px -24px #000c, 0 0 0 1px #ffffff14;
}
.film-frame canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.film-progress {
  position: absolute;
  inset: 10px 14px auto;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: #ffffff33;
}
.film-progress i {
  display: block;
  width: calc(var(--done, 0) * 100%);
  height: 100%;
  background: var(--gold);
}
.film-button {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #0c1a2ccc;
  color: #fff;
  font: 900 20px/1 Nunito, system-ui, sans-serif;
  cursor: pointer;
}
.film-sound {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-width: 44px;
  padding: 0 16px 0 12px;
  border-radius: 22px;
  background: #fff;
  color: var(--navy);
  font-size: 15px;
  box-shadow: 0 10px 24px -10px #000;
  animation: sound-call 2s ease-in-out 1s infinite;
}
.film-sound svg {
  flex: none;
}
.film-sound .sound-on {
  display: none;
}
.film-sound.on {
  width: 44px;
  padding: 0;
  background: var(--gold);
  animation: none;
}
.film-sound.on .sound-on {
  display: block;
}
.film-sound.on .sound-off,
.film-sound.on .film-sound-word,
.ended .film-sound-word {
  display: none;
}
.ended .film-sound {
  padding: 0;
  animation: none;
}
.film-replay {
  right: 66px;
  display: none;
}
.film-replay::before {
  content: '↻';
}
.ended .film-replay {
  display: block;
}

/* ---- the door to the game ---- */
.call {
  margin-top: 26px;
  padding: 30px 16px 22px;
  border-radius: 30px;
  background: linear-gradient(160deg, var(--navy-2), #2a2460);
  box-shadow: 0 0 0 1px #ffffff14;
  text-align: center;
}
.call-icon {
  display: block;
  margin: 0 auto;
  border-radius: 18px;
  box-shadow: 0 14px 30px -14px #000;
}
.call h2 {
  margin: 14px 0 8px;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.05;
}
.call-text {
  margin: 0 0 20px;
  color: #d7dce6;
}
.call-tm {
  margin: 16px 0 0;
  color: #8c94a3;
  font-size: 12px;
  line-height: 1.4;
}

.end-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.end-actions button {
  flex: 1;
  min-height: 56px;
  padding: 0 14px;
  border: 0;
  border-radius: 28px;
  font: 900 17px/1.15 Nunito, system-ui, sans-serif;
  cursor: pointer;
  transition: transform 0.18s var(--ease);
}
.share {
  background: var(--paper);
  color: var(--ink);
}
.again {
  background: #ffffff1f;
  color: #fff;
}

/* ---- the board (ranks.ts): before a life, beside it and at its end ----
   A phone: one card, its words and the two periods, the podium of three (the first in the middle, raised), the rest of
   the ten under it, and on the first screen the score to beat with the start. A wide screen has its own (the end of
   this file). */
.ranks {
  position: relative;
  margin: 8px 0 26px;
  padding: 22px 14px 18px;
  border: 1px solid #ffc53d2e;
  border-radius: 30px;
  background: radial-gradient(120% 60% at 50% 0%, #2b3f72, #16253f 74%);
  box-shadow: 0 30px 60px -40px #000;
  text-align: center;
}
.ranks-end {
  margin: 26px 0 0;
}
.ranks-kicker {
  margin-bottom: 2px;
}
.ranks h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.15;
}
.ranks-note {
  max-width: 26em;
  margin: 6px auto 14px;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.35;
}
/* The two periods: one control of two halves, the chosen one gold */
.ranks-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: #0c1a2cb3;
  box-shadow: inset 0 0 0 1px #ffffff17;
}
.ranks-tab {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #c4cbd8;
  font: 800 15px/1 Nunito, system-ui, sans-serif;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.ranks-tab[aria-selected='true'] {
  background: var(--gold);
  color: var(--navy);
}
.ranks-body {
  margin-top: 18px;
}

/* The podium: three cards on three steps, the second at the left, the first in the middle, the third at the right */
.ranks-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.podium {
  --ring: #e0975a;
  --step: linear-gradient(180deg, #e0975a59, #e0975a12);
  grid-row: 1;
  min-width: 0;
}
.podium-1 {
  --ring: var(--gold);
  --step: linear-gradient(180deg, #ffc53d73, #ffc53d14);
  grid-column: 2;
}
.podium-2 {
  --ring: #cfd6e4;
  --step: linear-gradient(180deg, #cfd6e463, #cfd6e412);
  grid-column: 1;
}
.podium-3 {
  grid-column: 3;
}
.podium-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}
.podium-face {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 3px var(--ring), 0 14px 26px -12px #000;
  transition: transform 0.25s var(--spring);
}
.podium-1 .podium-face {
  width: 76px;
  height: 76px;
  box-shadow: 0 0 0 4px var(--ring), 0 0 26px -2px #ffc53d80, 0 16px 30px -12px #000;
}
.podium-face img {
  display: block;
  width: 100%;
  height: 100%;
}
a.podium-card:hover .podium-face {
  transform: translateY(-3px) scale(1.04);
}
.podium-name {
  display: -webkit-box;
  max-width: 100%;
  margin-top: 9px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.podium-meta {
  max-width: 100%;
  overflow: hidden;
  color: var(--dim);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.podium-score {
  margin-top: 1px;
  color: var(--gold);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.podium-1 .podium-score {
  font-size: 24px;
}
/* The step itself, its place on it */
.podium-step {
  display: grid;
  place-items: start center;
  width: 100%;
  height: 34px;
  margin-top: 8px;
  padding-top: 4px;
  border-radius: 14px 14px 4px 4px;
  background: var(--step);
  color: var(--ring);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}
.podium-1 .podium-step {
  height: 52px;
  font-size: 26px;
}
.podium-3 .podium-step {
  height: 24px;
  font-size: 17px;
}
/* A free place: a question mark where a face would be, asking for the visitor's life */
.podium-free .podium-face {
  background: #ffffff0d;
  box-shadow: inset 0 0 0 2px #ffffff2e;
  color: #ffffff59;
  font-size: 26px;
  font-weight: 900;
}
.podium-free .podium-name {
  color: var(--dim);
  font-weight: 800;
}
.podium-free .podium-step {
  opacity: 0.55;
}
.podium.mine .podium-name {
  color: var(--gold);
}

/* The rest of the ten: rows */
.board-list {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}
.ranks-list {
  margin-top: 14px;
}
.board-life {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  margin-bottom: 8px;
  padding: 8px 14px 8px 10px;
  border-radius: 20px;
  background: #ffffff10;
  color: #fff;
  text-decoration: none;
}
a.board-life:hover {
  background: #ffffff1f;
}
.mine .board-life {
  background: #ffc53d22;
  box-shadow: 0 0 0 2px var(--gold) inset;
}
.board-rank {
  flex: none;
  min-width: 26px;
  color: var(--gold);
  font-size: 18px;
  font-weight: 900;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.board-face {
  flex: none;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--paper);
}
.board-who {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.board-who b {
  min-width: 0;
  overflow: hidden;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}
/* The name, and "you" beside it (never cut off with a long name) */
.board-name {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.board-who small {
  color: var(--dim);
  font-size: 13px;
}
.board-you,
.podium-you {
  flex: none;
  padding: 0 7px;
  border-radius: 8px;
  background: #ffc53d2e;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  line-height: 18px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.podium-you {
  margin: 4px 0 1px;
}
.board-score {
  flex: none;
  color: var(--gold);
  font-size: 19px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.board-empty {
  margin: 14px 0 0;
  color: #d7dce6;
  font-size: 15px;
}
/* A phone's first screen keeps three of the rest until "show all" (a wide screen shows the ten) */
@media (max-width: 1023px) {
  .ranks-list.short li:nth-child(n + 4) {
    display: none;
  }
}
.ranks-more {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 22px;
  background: #ffffff14;
  color: #fff;
  font: 800 15px/1 Nunito, system-ui, sans-serif;
  cursor: pointer;
}
/* A life just lived that is not among the ten, under them */
.ranks-own {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 2px dotted #ffffff2e;
}
.ranks-own .board-life {
  min-height: 52px;
}
.ranks-own .board-who b {
  color: var(--gold);
}
.ranks-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #ffffff17;
}
.ranks-beat {
  margin: 0;
  color: #e3e7ef;
  font-size: 16px;
}
.ranks-beat b {
  color: var(--gold);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.ranks-go {
  min-height: 54px;
  font-size: 18px;
}

/* ---- a life's place on the board if it ended now: a phone's line under the name (ranks.ts lifeRace) ---- */
.hud-rank {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  margin: 1px 0 0;
  overflow: hidden;
  color: var(--gold);
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;
}
.hud-rank .thing-pic {
  flex: none;
  width: 16px;
  height: 16px;
}
.hud-who .hud-rank b {
  font-size: inherit;
  font-weight: 900;
}
.hud-rank span:last-child {
  color: #c4cbd8;
  font-weight: 800;
}
/* A wide screen's section of the card (the end of this file) */
.hud-race {
  display: none;
}

.whole {
  margin-top: 26px;
}
.whole summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
  color: var(--dim);
  font-size: 14px;
}
.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
}

/* ---- the bar that is always there at the end ---- */
.dock {
  position: fixed;
  z-index: 10;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px max(10px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #0c1a2c00, #0c1a2cf5 34%);
  animation: dock-in 0.6s 0.4s var(--ease) both;
}
.dock-go {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 540px;
  margin: 0 auto;
  padding: 8px 10px;
  border-radius: 24px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 14px 34px -14px #000;
}
.dock-go img {
  border-radius: 10px;
}
.dock-go span {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.dock-go b {
  font-weight: 900;
}
.dock-go small {
  color: var(--ink-2);
  font-size: 13px;
}
.dock-go em {
  padding: 10px 16px;
  border-radius: 18px;
  background: var(--gold);
  color: var(--navy);
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.notice {
  padding-top: max(48px, env(safe-area-inset-top));
}
.notice + .call {
  margin-bottom: 40px;
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(40%);
  }
}
@keyframes dock-in {
  from {
    transform: translateY(110%);
  }
}
@keyframes breathe {
  50% {
    transform: scale(1.03);
  }
}
@keyframes sound-call {
  0%,
  100% {
    box-shadow: 0 0 0 0 #ffffff80, 0 10px 24px -10px #000;
  }
  60% {
    box-shadow: 0 0 0 11px #ffffff00, 0 10px 24px -10px #000;
  }
}

/* ---- the mini version and the real game (main.ts: the strip, the stage teasers, the screens and numbers) ---- */
.mini-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px -16px -12px;
  padding: 8px 16px;
  border-top: 1px solid #ffc53d33;
  background: linear-gradient(90deg, #ffc53d24, #ffc53d08);
  color: #f1e6c7;
  font-size: 13px;
  line-height: 1.25;
  text-decoration: none;
}
.mini-strip b,
.full-kicker {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.mini-strip span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-strip span::after {
  content: ' \2192';
  color: var(--gold);
}
/* A phone: the tag and the line only (the whole strip is the link to the store) */
@media (max-width: 459px) {
  .mini-strip em {
    display: none;
  }
}
@media (min-width: 460px) {
  .mini-strip span::after {
    content: none;
  }
}
.mini-strip em,
.teaser-text em {
  flex: none;
  color: var(--gold);
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}
.mini-strip em::after,
.teaser-text em::after {
  content: ' \2192';
}
.diary .row-teaser {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
.teaser {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1.5px solid #ffc53d70;
  border-radius: 22px;
  background: linear-gradient(135deg, #263a62, #1a2846);
  box-shadow: 0 12px 26px -18px #000;
  color: #fff;
  text-decoration: none;
}
.teaser-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
}
.teaser-text {
  display: grid;
  gap: 3px;
}
.teaser-text small {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.teaser-text span {
  color: #eef2f8;
  font-size: 15px;
  line-height: 1.35;
}
.teaser-text em {
  font-size: 13px;
}
.full {
  margin: 26px 0 8px;
  padding: 24px 18px 20px;
  overflow: hidden;
  border: 1px solid #ffffff14;
  border-radius: 30px;
  background: radial-gradient(120% 90% at 50% 0%, #22406b, #13233c 70%);
  text-align: center;
}
.full-kicker {
  display: inline-block;
  margin: 0 0 8px;
}
.full h2 {
  margin: 4px 0 6px;
  font-size: 26px;
  line-height: 1.15;
}
.full-text {
  max-width: 26em;
  margin: 0 auto 16px;
  color: #d7dce6;
}
.full-proof {
  margin: 6px 0 16px;
}
.full-phones {
  position: relative;
  height: clamp(250px, 72vw, 340px);
  margin: 0 auto 14px;
  max-width: 420px;
}
.full-phone {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(34%, 148px);
  margin: 0;
  overflow: hidden;
  border: 4px solid #0b1424;
  border-radius: 24px;
  background: #0b1424;
  box-shadow: 0 22px 40px -18px #000;
}
.full-phone img {
  display: block;
  width: 100%;
  height: auto;
}
.full-phone-0 {
  transform: translate(-128%, 22px) rotate(-7deg);
}
.full-phone-1 {
  z-index: 1;
  width: min(38%, 162px);
  transform: translateX(-50%);
}
.full-phone-2 {
  transform: translate(28%, 22px) rotate(7deg);
}
.full-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.full-facts li {
  padding: 10px 4px;
  border-radius: 16px;
  background: #ffffff10;
}
.full-facts b {
  display: block;
  color: var(--gold);
  font-size: 21px;
  font-weight: 900;
  line-height: 1.1;
}
.full-facts span {
  color: #c4cbd8;
  font-size: 12.5px;
}
.call .full-kicker {
  margin-top: 4px;
}

/* ---- the moment a life begins (birth.ts) ----
   0 to 2 s the camera comes down from the region onto the country while its outline draws itself; from 1.2 s the
   land lights up from the birth city outwards; at 1.95 s the pin drops there with two heartbeats; then the newborn's
   face, name and birthplace. A tap anywhere jumps to the end and begins the life. */
.birth {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: max(22px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom));
  overflow: hidden;
  background: radial-gradient(120% 75% at 50% 40%, #1b3860 0%, var(--navy) 60%, #060d18 100%);
  color: #fff;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: fade-in 0.35s ease both;
}
.birth-kicker {
  margin: 0;
  opacity: 0;
  animation: birth-rise 0.6s 0.15s var(--ease) forwards;
}
.birth-stage {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 560px;
}
.birth-map {
  position: relative;
  width: min(100%, calc(44dvh * var(--ratio, 1)));
}
.birth-map svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.birth-camera {
  transform-box: view-box;
  transform-origin: 50% 50%;
  animation: birth-camera 2s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.birth-land {
  fill: #fff;
  opacity: 0;
  animation: birth-land 1.4s 0.1s ease forwards;
}
.birth-halo {
  fill: var(--gold);
  opacity: 0;
  animation: birth-halo 1.6s 1.25s ease forwards;
}
.birth-reveal {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0);
  animation: birth-reveal 1.15s 1.2s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}
.birth-line {
  fill: none;
  stroke: #ffd166;
  stroke-width: 5.5;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: birth-draw 1.5s 0.3s cubic-bezier(0.65, 0, 0.35, 1) forwards, birth-line-rest 0.8s 2.1s ease forwards;
}
.birth-drop {
  opacity: 0;
  animation: birth-drop 0.6s 1.95s cubic-bezier(0.3, 1.5, 0.5, 1) forwards;
}
.birth-dot-ring {
  fill: #fff;
}
.birth-dot {
  fill: var(--coral);
}
.birth-ripple {
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: birth-ripple 1.5s 2.3s cubic-bezier(0.2, 0.6, 0.3, 1) 2 both;
}
.birth-ripple-late {
  animation-delay: 2.75s;
}
.birth-city {
  position: absolute;
  padding: 5px 11px;
  border-radius: 999px;
  background: #0c1a2ce0;
  box-shadow: 0 6px 16px -8px #000;
  color: #fff;
  font: 900 14px/1.2 Nunito, system-ui, sans-serif;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 22px));
  animation: birth-label 0.5s 2.25s var(--ease) forwards;
}
.birth-card {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 520px;
  text-align: left;
}
.birth-face {
  flex: none;
  width: 84px;
  height: 84px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 4px #ffffff24, 0 18px 40px -16px #000;
  opacity: 0;
  animation: birth-pop 0.7s 2.45s var(--spring) forwards;
}
.birth-face img {
  display: block;
  width: 100%;
  height: 100%;
}
.birth-said {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}
.birth-name {
  color: #fff;
  font: 900 clamp(26px, 7vw, 38px)/1.08 Nunito, system-ui, sans-serif;
  opacity: 0;
  animation: birth-rise 0.6s 2.6s var(--ease) forwards;
}
.birth-where {
  color: #d7dce6;
  font-size: 17px;
  opacity: 0;
  animation: birth-rise 0.6s 2.78s var(--ease) forwards;
}
.birth-go {
  min-height: 48px;
  margin-top: 4px;
  padding: 0 24px;
  border: 0;
  border-radius: 24px;
  background: #ffffff1c;
  color: #fff;
  font: 800 15px/1 Nunito, system-ui, sans-serif;
  cursor: pointer;
  opacity: 0;
  animation: birth-rise 0.5s 3.3s var(--ease) forwards;
}
.birth.no-map .birth-card {
  flex-direction: column;
  text-align: center;
}
/* A tap before the end: the rest of the moment plays at once */
.birth.shown *,
.birth.shown *::after {
  animation-delay: 0s !important;
  animation-duration: 0.18s !important;
  animation-iteration-count: 1 !important;
}
.birth.leaving {
  pointer-events: none;
}
.birth-flying {
  position: fixed;
  z-index: 60;
  margin: 0;
  pointer-events: none;
  opacity: 1 !important;
  animation: none !important;
}
/* Reduced motion: the moment as its last frame, nothing moves */
.birth.still .birth-camera,
.birth.still .birth-reveal,
.birth.still .birth-drop,
.birth.still .birth-face {
  transform: none;
}
.birth.still .birth-land {
  opacity: 0.13;
}
.birth.still .birth-halo {
  opacity: 0.42;
}
.birth.still .birth-line {
  stroke-dashoffset: 0;
}
.birth.still .birth-kicker,
.birth.still .birth-drop,
.birth.still .birth-face,
.birth.still .birth-name,
.birth.still .birth-where,
.birth.still .birth-go {
  opacity: 1;
}
.birth.still .birth-city {
  opacity: 1;
  transform: translate(-50%, calc(-100% - 22px));
}
@keyframes birth-camera {
  from {
    transform: scale(0.42) rotate(-5deg);
  }
}
@keyframes birth-land {
  to {
    opacity: 0.13;
  }
}
@keyframes birth-halo {
  to {
    opacity: 0.42;
  }
}
@keyframes birth-reveal {
  to {
    transform: scale(1);
  }
}
@keyframes birth-draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes birth-line-rest {
  to {
    stroke: #fff4d6;
  }
}
@keyframes birth-drop {
  from {
    opacity: 0;
    transform: translateY(-90px) scale(0.5);
  }
  35% {
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes birth-ripple {
  from {
    opacity: 0.9;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(6);
  }
}
@keyframes birth-label {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-100% - 10px));
  }
  to {
    opacity: 1;
    transform: translate(-50%, calc(-100% - 22px));
  }
}
@keyframes birth-pop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes birth-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* A tablet: the same column, a question in the middle of the screen */
@media (min-width: 640px) {
  .sheet {
    inset: 0;
    height: fit-content;
    margin: auto;
    border-radius: 30px;
  }
  .intro {
    padding-top: 56px;
  }
}

/* ---- a wide screen (owner, 7 Nov 2026: "mobile is mobile, the web gets its own look") ----
   From 1024 px the page stops being a phone's column: the first screen is a hero beside the life's photos, a life is a
   card at the left with the diary beside it (from 1280 px the real game in a third column), a question is a landscape
   card, and the ending puts its film beside the life. Below that, nothing here applies. */
.hud-where,
.life-side,
.end-go {
  display: none;
}

@media (min-width: 1024px) {
  .play {
    max-width: 1160px;
    padding: 0 32px;
  }

  /* The first screen: the words and the start at the left, a life in three photos falling down the right half */
  .intro:has(> .strip) {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: min(calc(100dvh - 24px), 760px);
    padding: 48px calc(50% + 32px) 40px 0;
    text-align: left;
  }
  .intro > .strip {
    position: absolute;
    top: 50%;
    right: 0;
    width: calc(50% - 32px);
    height: 500px;
    margin: 0;
    transform: translateY(-50%);
  }
  .intro > .strip .strip-card {
    position: absolute;
    width: 58%;
    max-width: 300px;
    padding: 8px 8px 4px;
    border-radius: 22px;
  }
  .intro > .strip .strip-card img {
    border-radius: 16px;
  }
  .intro > .strip .strip-card figcaption {
    padding: 6px 0 3px;
    font-size: 15px;
    text-align: center;
  }
  .intro > .strip .strip-card:nth-child(1) {
    left: 0;
    top: 0;
    transform: rotate(-6deg);
  }
  .intro > .strip .strip-card:nth-child(2) {
    z-index: 1;
    left: 21%;
    top: 132px;
    transform: rotate(3deg);
  }
  .intro > .strip .strip-card:nth-child(3) {
    z-index: 2;
    right: 0;
    top: 262px;
    transform: rotate(-2deg);
  }
  .intro h1 {
    max-width: 11em;
    font-size: clamp(48px, 5vw, 66px);
  }
  .intro .lead {
    max-width: 30em;
    margin: 18px 0 30px;
    font-size: 19px;
  }
  .intro .start {
    width: auto;
    min-width: 320px;
    min-height: 62px;
    padding: 0 40px;
    font-size: 21px;
  }
  .intro .note {
    margin-top: 14px;
  }
  .intro-call {
    align-self: stretch;
    margin-top: 32px;
    padding-top: 24px;
  }
  .intro-call .badges {
    justify-content: flex-start;
  }

  /* The real game (below the first screen, and the ending's call): its words at the left, its screens at the right */
  .play > .full,
  .call {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 560px;
    padding: 48px calc(50% + 24px) 48px 56px;
    text-align: left;
  }
  .play > .full {
    margin: 24px 0 64px;
  }
  .play > .full .full-proof,
  .call .full-proof {
    align-self: stretch;
    margin: 0;
  }
  .play > .full .full-phones,
  .call .full-phones {
    position: absolute;
    top: 50%;
    right: 40px;
    width: calc(50% - 64px);
    height: 470px;
    max-width: none;
    margin: 0;
    transform: translateY(-50%);
  }
  .play > .full .full-phone,
  .call .full-phone {
    width: 41%;
  }
  .play > .full .full-phone-1,
  .call .full-phone-1 {
    width: 45%;
  }
  .play > .full h2,
  .call h2 {
    font-size: 40px;
  }
  .play > .full .full-text,
  .call .call-text {
    margin: 0 0 26px;
  }
  .call-icon {
    margin: 0 0 6px;
  }
  .call .badges {
    justify-content: flex-start;
    margin-top: 24px;
  }

  /* A life: its card at the left, the diary in the middle with the year buttons kept at the bottom of the window */
  .life {
    display: grid;
    grid-template-columns: 296px minmax(0, 1fr);
    grid-template-areas: 'hud main';
    column-gap: 32px;
    align-items: start;
    padding: 28px 0 0;
  }
  .hud {
    grid-area: hud;
    position: sticky;
    top: 28px;
    margin: 0;
    padding: 26px 20px 20px;
    border-radius: 30px;
    background: #ffffff0c;
    box-shadow: 0 0 0 1px #ffffff17, 0 30px 60px -36px #000;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .hud-top {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  .hud-face {
    width: 112px;
    height: 112px;
    box-shadow: 0 0 0 5px #ffffff1c, 0 20px 40px -18px #000;
  }
  .hud-who {
    align-items: center;
    max-width: 100%;
  }
  .hud-who b {
    font-size: 24px;
    line-height: 1.15;
    white-space: normal;
  }
  .hud-who small {
    font-size: 15px;
  }
  .hud-age {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    padding: 6px 20px 7px;
    border-radius: 18px;
  }
  .hud-age small {
    font-size: 14px;
  }
  .hud-age b {
    font-size: 30px;
  }
  .hud-stats {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 22px;
  }
  .meter-name {
    font-size: 13px;
  }
  .meter-bar {
    height: 10px;
    border-radius: 5px;
  }
  .hud-where {
    display: block;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #ffffff14;
    text-align: center;
  }
  .mini-map {
    display: block;
    width: 100%;
    height: 128px;
  }
  .mini-country {
    fill: #ffd166;
  }
  .mini-pin-ring {
    fill: #fff;
  }
  .mini-pin {
    fill: var(--coral);
  }
  .hud-where small {
    display: block;
    margin-top: 8px;
    color: #c4cbd8;
    font-size: 14px;
    line-height: 1.3;
  }
  .hud .mini-strip {
    flex-wrap: wrap;
    margin: 18px 0 0;
    padding: 12px 14px;
    border: 1px solid #ffc53d40;
    border-radius: 18px;
  }
  .hud .mini-strip span {
    white-space: normal;
  }
  .hud .mini-strip span::after {
    content: none;
  }
  .life-main {
    grid-area: main;
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - 28px);
  }
  .diary {
    flex: 1;
    padding: 0 0 8px;
  }
  .row {
    padding: 14px 18px;
  }
  .row p {
    font-size: 18px;
  }
  .row,
  .row-stage {
    scroll-margin: 28px 0 150px;
  }
  .teaser:hover {
    border-color: var(--gold);
  }
  .controls {
    position: sticky;
    left: auto;
    right: auto;
    bottom: 0;
    padding: 34px 0 24px;
    background: linear-gradient(180deg, #20264a00, #20264ae0 45%, #20264a);
  }
  .controls-in {
    max-width: none;
  }

  /* A question: a landscape card, the picture at the left and the answers beside it */
  .sheet {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-rows: 1fr auto auto auto 1fr;
    column-gap: 30px;
    width: min(92vw, 980px);
    max-height: 92dvh;
    padding: 18px 30px 18px 18px;
  }
  .sheet-art {
    grid-column: 1;
    grid-row: 1 / -1;
    aspect-ratio: auto;
    min-height: 380px;
  }
  .sheet-kicker {
    grid-column: 2;
    grid-row: 2;
    margin: 0 0 6px;
  }
  .sheet h2 {
    grid-column: 2;
    grid-row: 3;
    margin: 0 0 22px;
    font-size: 29px;
  }
  .sheet-options {
    grid-column: 2;
    grid-row: 4;
  }


  /* The town on the card: its things, its quests, its achievements, each under its label */
  .hud {
    max-height: calc(100dvh - 56px);
    overflow-y: auto;
    scrollbar-width: none;
  }
  .hud::-webkit-scrollbar {
    display: none;
  }
  .hud-town {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'bag'
      'quests'
      'medals';
    gap: 16px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #ffffff14;
  }
  .hud-label {
    display: block;
    margin-bottom: 8px;
    color: var(--dim);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .bag {
    flex-wrap: wrap;
    gap: 6px;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .bag-thing {
    width: 42px;
    height: 42px;
    padding: 5px;
    border-radius: 13px;
    background: #ffffff10;
  }
  .quest-list {
    display: grid;
    gap: 8px;
  }
  .quest {
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 15px;
    line-height: 1.25;
  }
  .quest .thing-pic {
    width: 20px;
    height: 20px;
  }
  .quest-title {
    flex: 1;
    white-space: normal;
  }
  .quest-place {
    font-size: 12px;
    line-height: 20px;
  }
  .hud-medals {
    gap: 8px;
    font-size: 16px;
  }
  .hud-medals .thing-pic {
    width: 26px;
    height: 26px;
  }
  .hud-medals span {
    display: inline;
    color: #c4cbd8;
    font-size: 14px;
    font-weight: 800;
  }
  .row-quest,
  .row-achievement {
    margin-left: 56px;
  }
  .end-medals {
    grid-template-columns: repeat(auto-fill, minmax(184px, 1fr));
  }

  /* A day in town: the four places side by side, big */
  .sheet-town {
    display: block;
    width: min(92vw, 1080px);
    padding: 26px 28px 28px;
  }
  .sheet-town .sheet-kicker {
    margin: 0 0 6px;
  }
  .sheet-town h2 {
    margin: 0 0 20px;
  }
  .sheet-town .sheet-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
  .place-card {
    gap: 10px;
    padding: 8px 8px 16px;
    border-radius: 26px;
    font-size: 20px;
  }
  .place-art {
    aspect-ratio: 4 / 3;
    border-radius: 19px;
  }
  .place-quest {
    margin: 0 8px;
    font-size: 13px;
  }
  .place-quest .thing-pic {
    width: 18px;
    height: 18px;
  }

  /* The birth: a bigger map */
  .birth-stage {
    max-width: 820px;
  }
  .birth-map {
    width: min(100%, calc(54dvh * var(--ratio, 1)));
  }
  .birth-face {
    width: 100px;
    height: 100px;
  }
  .birth-name {
    font-size: 44px;
  }

  /* The board under the first screen: a band of its own, its words, the score to beat and the start at the left, the
     podium and the rest of the ten beside them (the rest in two columns, read down) */
  .ranks-intro {
    display: grid;
    grid-template-columns: minmax(0, 330px) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      'head body'
      'foot body';
    column-gap: 64px;
    margin: 8px 0 40px;
    padding: 46px 52px 44px;
    border-radius: 36px;
    background: radial-gradient(70% 120% at 72% 0%, #2f4479, #16253f 72%);
    text-align: left;
  }
  .ranks-intro .ranks-head {
    grid-area: head;
  }
  .ranks-intro h2 {
    font-size: 42px;
    line-height: 1.05;
  }
  .ranks-intro .ranks-note {
    margin: 14px 0 24px;
    font-size: 16px;
  }
  .ranks-intro .ranks-body {
    grid-area: body;
    margin-top: 0;
  }
  .ranks-intro .ranks-foot {
    grid-area: foot;
    align-self: end;
    align-items: flex-start;
    margin-top: 32px;
    padding-top: 0;
    border-top: 0;
  }
  .ranks-intro .ranks-beat {
    font-size: 19px;
  }
  .ranks-intro .ranks-go {
    width: auto;
    min-width: 280px;
    min-height: 60px;
    font-size: 20px;
  }
  .ranks-intro .ranks-podium {
    gap: 22px;
    max-width: 660px;
    margin: 0 auto;
  }
  .ranks-intro .podium-face {
    width: 88px;
    height: 88px;
  }
  .ranks-intro .podium-1 .podium-face {
    width: 116px;
    height: 116px;
  }
  .ranks-intro .podium-name {
    margin-top: 12px;
    font-size: 18px;
  }
  .ranks-intro .podium-meta {
    font-size: 14px;
  }
  .ranks-intro .podium-score {
    font-size: 26px;
  }
  .ranks-intro .podium-1 .podium-score {
    font-size: 32px;
  }
  .ranks-intro .podium-step {
    height: 54px;
    margin-top: 12px;
    padding-top: 8px;
    border-radius: 18px 18px 6px 6px;
    font-size: 26px;
  }
  .ranks-intro .podium-1 .podium-step {
    height: 82px;
    font-size: 34px;
  }
  .ranks-intro .podium-3 .podium-step {
    height: 36px;
    font-size: 21px;
  }
  .ranks-intro .ranks-list {
    display: grid;
    grid-template-rows: repeat(4, auto);
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    column-gap: 16px;
    margin-top: 22px;
  }
  .ranks-intro .board-empty {
    margin-top: 20px;
    font-size: 17px;
    text-align: center;
  }
  .ranks-more {
    display: none;
  }

  /* The ending's board: its words at the left with the periods beside them, the podium in the middle, the rows under */
  .ranks-end {
    padding: 24px 24px 18px;
    text-align: left;
  }
  .ranks-end .ranks-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      'kicker tabs'
      'title tabs'
      'note note';
    column-gap: 16px;
    align-items: center;
  }
  .ranks-end .ranks-kicker {
    grid-area: kicker;
  }
  .ranks-end h2 {
    grid-area: title;
  }
  .ranks-end .ranks-note {
    grid-area: note;
    max-width: none;
    margin: 8px 0 0;
  }
  .ranks-end .ranks-tabs {
    grid-area: tabs;
  }
  .ranks-end .ranks-body {
    margin-top: 22px;
  }
  .ranks-end .ranks-podium {
    gap: 16px;
    max-width: 500px;
    margin: 0 auto;
  }
  .ranks-end .podium-face {
    width: 70px;
    height: 70px;
  }
  .ranks-end .podium-1 .podium-face {
    width: 92px;
    height: 92px;
  }
  .ranks-end .podium-name {
    font-size: 16px;
  }

  /* A life's place on the board if it ended now: a section of the card, its place and score, a track of the ten with
     this life on it, and the next life to pass */
  .hud-rank {
    display: none;
  }
  .hud-race {
    display: block;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #ffffff14;
  }
  .race-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
  }
  .race-top .thing-pic {
    flex: none;
    width: 28px;
    height: 28px;
  }
  .race-place {
    color: var(--gold);
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .race-place.race-out {
    font-size: 15px;
    line-height: 1.25;
  }
  .race-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: auto;
    line-height: 1.1;
  }
  .race-score b {
    color: #fff;
    font-size: 21px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
  }
  .race-score small {
    color: var(--dim);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .race-caption {
    display: block;
    margin-top: 4px;
    color: var(--dim);
    font-size: 13px;
    line-height: 1.25;
  }
  .race-track {
    position: relative;
    display: block;
    height: 10px;
    margin: 16px 9px 12px;
    border-radius: 5px;
    background: #ffffff17;
  }
  .race-dot,
  .race-you {
    position: absolute;
    top: 50%;
    left: calc(var(--at, 0) * 100%);
    border-radius: 50%;
  }
  .race-dot {
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    background: #c4cbd8;
  }
  .race-dot.passed {
    background: #ffc53d80;
  }
  .race-you {
    z-index: 1;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 3px solid var(--navy);
    background: var(--gold);
    box-shadow: 0 0 0 2px var(--gold);
    transition: left 0.5s var(--ease);
  }
  .race-next {
    display: block;
    color: #c4cbd8;
    font-size: 13.5px;
    line-height: 1.3;
  }

  /* The ending: the film at the left, the life beside it, the real game below both */
  .ending {
    display: grid;
    grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
    grid-template-areas:
      'banner banner'
      'film stone'
      'film score'
      'film board'
      'film actions'
      'film town'
      'film whole'
      'call call'
      'foot foot';
    column-gap: 56px;
    align-items: start;
    max-width: 1080px;
    margin: 0 auto;
    padding: 40px 0 120px;
  }
  .ending > .banner {
    grid-area: banner;
    margin-bottom: 28px;
  }
  .ending > .stone-card {
    grid-area: stone;
  }
  .ending > .score {
    grid-area: score;
  }
  .ending > .end-town {
    grid-area: town;
  }
  .ending > .end-film {
    grid-area: film;
    position: sticky;
    top: 28px;
  }
  .ending .film {
    margin-top: 0;
  }
  .ending .film-frame {
    max-height: calc(100dvh - 150px);
  }
  .end-go {
    display: flex;
    margin-top: 16px;
  }
  .ending > .end-actions {
    grid-area: actions;
  }
  .ending > .ranks {
    grid-area: board;
  }
  .ending > .whole {
    grid-area: whole;
  }
  .ending > .call {
    grid-area: call;
    margin-top: 56px;
  }
  .ending > .foot {
    grid-area: foot;
  }
  .dock {
    display: none;
  }
}

/* A narrow wide screen (1024 to 1279 px): the first screen's board keeps a slimmer column of words and one column of rows */
@media (min-width: 1024px) and (max-width: 1279px) {
  .ranks-intro {
    grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
    column-gap: 40px;
    padding: 40px 36px 36px;
  }
  .ranks-intro h2 {
    font-size: 36px;
  }
  .ranks-intro .ranks-list {
    grid-template-rows: none;
    grid-auto-flow: row;
  }
  .ranks-intro .ranks-go {
    width: 100%;
    min-width: 0;
  }
}

/* A wide screen with room for a third column: the real game beside the life */
@media (min-width: 1280px) {
  .play {
    max-width: 1340px;
  }
  .life {
    grid-template-columns: 296px minmax(0, 1fr) 340px;
    grid-template-areas: 'hud main side';
  }
  .life-side {
    display: block;
    grid-area: side;
    position: sticky;
    top: 28px;
  }
  .life-side .full {
    margin: 0;
    padding: 24px 20px 20px;
  }
  .life-side .full h2 {
    font-size: 24px;
  }
  .life-side .full-text {
    margin-bottom: 10px;
    font-size: 15px;
  }
  .life-side .full-phones {
    height: 240px;
    margin-bottom: 12px;
  }
  .life-side .full-facts b {
    font-size: 19px;
  }
  .life-side .full-facts span {
    font-size: 11.5px;
  }
  .life-side .badges {
    margin-top: 16px;
  }
  .hud .mini-strip {
    display: none;
  }
}

/* ---- what the game is, under the first screen (the page's own words, site/src/pages/play.mjs): for a reader who
   scrolls and for search engines; play.js hides it once a life starts ---- */
.about {
  padding-top: 26px;
  padding-bottom: max(40px, env(safe-area-inset-bottom));
  border-top: 1px solid #ffffff1a;
  color: #d7dce6;
  font-weight: 600;
}
.about h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.15;
}
.about h3 {
  margin: 22px 0 6px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
}
.about p {
  margin: 0 0 12px;
}
.about-how {
  margin: 0;
  padding-left: 1.4em;
}
.about-how li {
  margin: 0 0 8px;
  padding-left: 2px;
}
.about-how li::marker {
  color: var(--gold);
  font-weight: 900;
}
.about-faq {
  margin-top: 34px;
}
.about-faq h3:first-of-type {
  margin-top: 0;
}
.about-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 26px 0 0;
}
.about-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--gold);
  font-weight: 800;
}

@media (min-width: 1024px) {
  .about {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 0 64px;
    padding-top: 44px;
    font-size: 17px;
  }
  .about h2 {
    font-size: 30px;
  }
  .about-faq {
    margin-top: 0;
  }
  .about-links {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
