/* The gamified landing page: one phone-shaped column on the dark purple brand ground, a ticket
 * holding the game, and the screens that follow a win. README.md beside this file says why.
 *
 * Every colour and type size is a token from /play/kit/tokens.css (copied whole from
 * /mendel-kit/tokens.css, itself skill-design 0.4.0 assets/tokens.css). Brand-flavour grounds
 * carry their own content token: purple dark with contentOverBackgroundPurpleDark, pink with
 * contentOverBackgroundPink, green with contentOverBackgroundGreen, yellow with
 * contentOverBackgroundYellow, light purple with contentOverBackgroundPurpleLight.
 * The @font-face block and the .cta button are copied from /mendel-kit/kit.css (landing repo,
 * commit a47ef43, 2026-11-02). Corner radius is 8px, the components' common radius: the system
 * names no scale, so this is a choice made beside them.
 */

@font-face {
  font-family: "NextorySans";
  src: url("/play/kit/fonts/NextorySans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "NextorySans";
  src: url("/play/kit/fonts/NextorySans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "NextorySans";
  src: url("/play/kit/fonts/NextorySans-HeadlineDemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--backgroundPurpleDark);
  color: var(--contentOverBackgroundPurpleDark);
  font-family: var(--font-family);
  font-size: var(--text-body1-size);
  line-height: var(--text-body1-line);
  letter-spacing: var(--text-body1-tracking);
  font-weight: var(--text-body1-weight);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: calc(16px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom));
}

.top { display: flex; justify-content: center; }
.wordmark { width: 104px; height: auto; display: block; }

h1, h2 { margin: 0; font-weight: var(--text-heading-big-1-weight); }
h1 {
  font-size: var(--text-subtitle-big-2-size); line-height: var(--text-subtitle-big-2-line);
  letter-spacing: var(--text-subtitle-big-2-tracking);
}
h2 {
  font-size: var(--text-headline3-size); line-height: var(--text-headline3-line);
  letter-spacing: var(--text-headline3-tracking);
}
.big {
  font-size: var(--text-heading-big-1-size); line-height: var(--text-heading-big-1-line);
  letter-spacing: var(--text-heading-big-1-tracking);
}
.bright { color: var(--contentOverImageLight); }
.intro { text-align: center; margin: 16px 0 16px; }
.intro p { margin: 8px 0 0; }

.meta {
  font-size: var(--text-meta1-size); line-height: var(--text-meta1-line);
  letter-spacing: var(--text-meta1-tracking); font-weight: var(--text-meta1-weight);
}
.small {
  font-size: var(--text-body2-size); line-height: var(--text-body2-line);
  letter-spacing: var(--text-body2-tracking);
}

/* The ticket: light purple with a perforated edge left and right, the game on a purple panel. */
.ticket {
  position: relative;
  padding: 12px 16px 12px;
  background: var(--backgroundPurpleLight);
  color: var(--contentOverBackgroundPurpleLight);
  border-radius: 8px;
  -webkit-mask:
    radial-gradient(circle 7px at 0 50%, transparent 98%, #000) left / 51% 22px repeat-y,
    radial-gradient(circle 7px at 100% 50%, transparent 98%, #000) right / 51% 22px repeat-y;
  mask:
    radial-gradient(circle 7px at 0 50%, transparent 98%, #000) left / 51% 22px repeat-y,
    radial-gradient(circle 7px at 100% 50%, transparent 98%, #000) right / 51% 22px repeat-y;
}
.ticket-head { text-align: center; margin: 0 0 12px; }
.found { text-align: center; margin: 8px 0 0; min-height: 16px; }
[tabindex="-1"]:focus { outline: none; }
.panel { border-radius: 8px; background: var(--backgroundPurpleDark); padding: 10px; }

.game { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; touch-action: none; user-select: none; -webkit-user-select: none; }

/* One scratch card. The face is the symbol; the foil is a canvas drawn over it in kit colours. */
.card {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  outline: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.card:focus-visible { box-shadow: 0 0 0 3px var(--contentOverImageLight); }
.card .face {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--tile-bg); color: var(--tile-fg);
}
.card .face .icon {
  width: 48%; height: 48%;
  background: var(--tile-fg);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.card .prize {
  width: 82%; aspect-ratio: 1 / 1; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: var(--backgroundGreen); color: var(--contentOverBackgroundGreen);
  transform: rotate(-8deg);
}
.card .prize strong {
  font-weight: var(--text-headline3-weight);
  font-size: var(--text-headline3-size); line-height: var(--text-headline3-line);
}
.card .prize span {
  max-width: 64%;
  font-size: var(--text-meta1-size); line-height: var(--text-meta1-line); font-weight: var(--text-headline3-weight);
}
.card canvas.foil {
  position: absolute; inset: 0; width: 100%; height: 100%;
  transition: opacity 360ms ease;
}
.card.open canvas.foil { opacity: 0; }
.card.open { cursor: default; }
.card.hit .face { animation: pop 420ms ease both; }
.card.dim .face { opacity: 0.55; }
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.08); } 100% { transform: scale(1); } }

.hint { text-align: center; margin: 16px 0 0; }

.cta {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 48px; padding: 12px 20px;
  border: 0; border-radius: 1000px;
  background: var(--buttonCTABackground); color: var(--buttonCTAText);
  font: inherit;
  font-size: var(--text-button1-size); line-height: var(--text-button1-line);
  letter-spacing: var(--text-button1-tracking); font-weight: var(--text-button1-weight);
  text-decoration: none; text-align: center; cursor: pointer;
}
.cta:focus-visible, .link:focus-visible, .close:focus-visible {
  outline: 2px solid var(--contentOverImageLight); outline-offset: 3px;
}
.link {
  background: none; border: 0; padding: 4px; color: inherit; font: inherit;
  text-decoration: underline; cursor: pointer;
}

.foot { margin-top: auto; padding-top: 20px; text-align: center; }

/* The screens after the game: each fills the column, one at a time. */
.screen { display: none; flex: 1; flex-direction: column; }
.screen.now { display: flex; animation: rise 360ms ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.win { text-align: center; justify-content: center; gap: 12px; }
.win .badge {
  margin: 12px auto; width: 168px; aspect-ratio: 1 / 1; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--backgroundGreen); color: var(--contentOverBackgroundGreen);
  transform: rotate(-8deg);
}
.win .badge strong { font-size: var(--text-heading-big-1-size); line-height: var(--text-heading-big-1-line); font-weight: var(--text-heading-big-1-weight); }
.win .badge span { font-size: var(--text-headline4-size); line-height: var(--text-headline4-line); font-weight: var(--text-headline3-weight); }
.win .actions { margin-top: 20px; }

.redeem { justify-content: center; gap: 16px; }
.redeem ol { margin: 0; padding: 0 0 0 20px; display: grid; gap: 8px; }
.redeem .terms { margin: 4px 0 0; text-align: center; }

canvas.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 20; }

/* The terms, as a sheet over the page (the app Sheets component: 8px top corners). */
.sheet-back { position: fixed; inset: 0; background: var(--backgroundOverlay); z-index: 30; display: none; }
.sheet-back.now { display: block; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31;
  max-width: 480px; max-height: 86vh; margin: 0 auto; overflow: auto;
  background: var(--backgroundSecondary); color: var(--contentPrimary);
  border-radius: 8px 8px 0 0;
  padding: 20px 20px calc(24px + env(safe-area-inset-bottom));
  display: none;
}
.sheet.now { display: block; }
.sheet h2 { margin-bottom: 12px; }
.sheet h3 { margin: 16px 0 4px; font-size: var(--text-headline5-size); line-height: var(--text-headline5-line); font-weight: var(--text-headline3-weight); }
.sheet p { margin: 0 0 8px; }
.sheet a { color: var(--contentAccent); }
.close { float: right; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; padding: 4px 8px; }

/* Preview and debug: what the page would send, listed on the page itself. */
.probe {
  position: fixed; left: 8px; right: 8px; top: 8px; z-index: 40;
  max-width: 464px; margin: 0 auto; max-height: 20vh; overflow: hidden;
  pointer-events: none; opacity: 0.94;
  background: var(--backgroundDark); color: var(--contentOverBackgroundDark);
  border-radius: 8px; padding: 8px 12px;
  font-size: var(--text-meta1-size); line-height: var(--text-meta1-line);
}
.probe b { color: var(--contentOverImageLight); }
body.probing .stage { padding-top: calc(20vh + 16px); }
.probe ol { margin: 4px 0 0; padding-left: 18px; }

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

/* The wheel (games/wheel.js): ten slices in the brand-flavour grounds, each label in its own
 * content token, the blank in backgroundDark. The rim and bulbs are backgroundYellow on
 * contentYellow, like the coin; the pointer is the ad's gold coin pointing down. */
.game.wheel-game { display: block; }
.wheel { position: relative; width: 100%; max-width: 340px; margin: 8px auto 0; aspect-ratio: 1 / 1; cursor: pointer; }
.wheel-spin { position: absolute; inset: 0; will-change: transform; }
.wheel-svg, .wheel-cap { position: absolute; inset: 0; width: 100%; height: 100%; }
.wheel .slice { stroke: var(--backgroundPurpleDark); stroke-width: 1.2; }
.wheel .slice.landed { animation: landed 900ms ease 2; }
@keyframes landed { 50% { filter: brightness(1.18); } }
.wheel .rim { fill: none; stroke: var(--contentYellow); stroke-width: 7; }
.wheel .bulb { fill: var(--backgroundYellow); }
.wheel.spinning .bulb { animation: blink 300ms steps(2) infinite; }
@keyframes blink { 50% { fill: var(--contentOverImageLight); } }
.wheel .hub-ring { fill: var(--backgroundPurpleDark); stroke: var(--contentYellow); stroke-width: 3; }
.wheel .slice-days { font-weight: 600; font-size: 22px; }
.wheel .slice-word { font-weight: 600; font-size: 9px; }
.wheel .slice-again { font-weight: 600; font-size: 8.6px; }
.wheel-pointer {
  position: absolute; left: 50%; top: -6px; width: 0; height: 0; transform: translateX(-50%);
  border-left: 14px solid transparent; border-right: 14px solid transparent;
  border-top: 26px solid var(--contentYellow);
  filter: drop-shadow(0 3px 3px var(--backgroundOverlay));
}
#play.wheel-on { cursor: pointer; }

/* The scratching coin: on a mouse, over the cards, the pointer becomes the gold N coin of the
 * March ad, its lower-left rim on the point that scratches so the card stays visible. Yellow is
 * backgroundYellow into contentYellow (the rating-star colour, the darkest yellow the semantic
 * layer names), the N contentOverBackgroundYellow; the shadow is backgroundOverlay. */
.game.coin-on, .game.coin-on .card { cursor: none; }
.coin-cursor {
  position: fixed; left: 0; top: 0; z-index: 25; pointer-events: none;
  width: 56px; height: 56px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, var(--backgroundYellow), var(--contentYellow) 85%);
  box-shadow: 0 6px 14px var(--backgroundOverlay), inset 0 0 0 3px var(--backgroundYellow), inset 0 0 0 5px var(--contentYellow);
  color: var(--contentOverBackgroundYellow);
  font-weight: var(--text-headline3-weight); font-size: 30px; line-height: 1;
  transform: translate(-12px, -44px) rotate(-20deg);
  transition: transform 80ms ease;
}
.coin-cursor.on { display: flex; }
.coin-cursor.down { transform: translate(-12px, -44px) rotate(-32deg) scale(0.94); }

/* The book quiz (games/quiz.js). Each answer is the web Radio Button Card (skill-design
 * reference/components/web/Radio Button Card.md): min height 60px, 8px radius, backgroundSecondary
 * with contentPrimary, a 2px contentAccent border when chosen, 8px apart. The progress bars are
 * light purple, filled in backgroundPink as each question is reached. */
.game.quiz-game { display: block; touch-action: auto; user-select: auto; -webkit-user-select: auto; }
.quiz-bars { display: flex; gap: 4px; margin: 2px 0 10px; }
.quiz-bars span { flex: 1; height: 4px; border-radius: 1000px; background: var(--backgroundPurpleLight); opacity: 0.35; }
.quiz-bars span.done { background: var(--backgroundPink); opacity: 1; }
.quiz-step { margin: 0 0 4px; color: var(--contentOverBackgroundPurpleDark); }
.quiz-ask { border: 0; margin: 0; padding: 0; min-width: 0; }
.quiz-ask legend {
  padding: 0; margin: 0 0 12px; color: var(--contentOverImageLight);
  font-size: var(--text-headline3-size); line-height: var(--text-headline3-line);
  letter-spacing: var(--text-headline3-tracking); font-weight: var(--text-headline3-weight);
}
.quiz-answers { display: grid; gap: 8px; }
.quiz-answer {
  display: flex; align-items: center; width: 100%; min-height: 60px; padding: 8px 16px;
  border: 2px solid transparent; border-radius: 8px;
  background: var(--backgroundSecondary); color: var(--contentPrimary);
  font: inherit; text-align: left; cursor: pointer;
  transition: border-color 150ms ease, transform 150ms ease;
}
.quiz-answer[aria-pressed="true"] { border-color: var(--contentAccent); transform: scale(0.98); }
.quiz-answer:focus-visible { outline: 2px solid var(--contentOverImageLight); outline-offset: 2px; }
#play:has(.quiz-game) .found, #play:has(.quiz-game) .hint,
#play:has(.guess-game) .found, #play:has(.guess-game) .hint,
#play:has(.advent-game) .found, #play:has(.advent-game) .hint,
#play:has(.memory-game) .found, #play:has(.memory-game) .hint { display: none; }
/* The quiz's and the guessing game's prize line in green, as their ads draw it (the owner,
 * 2026-11-04): backgroundGreen used as a colour on the purple ground, the scratch ad's choice - the
 * system has no green content token for this ground. */
#play:has(.quiz-game) .intro .bright, #play:has(.guess-game) .intro .bright,
#play:has(.advent-game) .intro .bright, #play:has(.memory-game) .intro .bright { color: var(--backgroundGreen); }

/* Listen and guess (games/guess.js). The play button is the app's Player Primary Buttons play
 * circle (skill-design): 64px, contentPrimaryAlwaysLight on the dark panel, the system's Play_64
 * and Pause_64 icons as masks, 70% while pressed. The progress bar is the quiz's bar, filled in
 * backgroundPink; five backgroundPink bars move while the clip plays and stand still for reduced
 * motion. Each cover is the Product Book Card's square cover (16px radius) with its title in Meta 1
 * under it. After a guess the right cover gets a backgroundGreen ring and the system's Check_24 on
 * a backgroundGreen circle; a wrong pick gets a contentAccent ring at 55% and stays out of play while
 * the player tries again, and the status line says it in words. */
.game.guess-game { display: block; touch-action: auto; user-select: auto; -webkit-user-select: auto; }
.guess-player { display: flex; align-items: center; gap: 16px; padding: 4px 4px 0; }
.guess-play { flex: none; width: 64px; height: 64px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.guess-play i {
  display: block; width: 64px; height: 64px; background: var(--contentPrimaryAlwaysLight);
  -webkit-mask: url("/play/kit/icons/play.svg") center / contain no-repeat;
  mask: url("/play/kit/icons/play.svg") center / contain no-repeat;
}
.guess-player.on .guess-play i { -webkit-mask-image: url("/play/kit/icons/pause.svg"); mask-image: url("/play/kit/icons/pause.svg"); }
.guess-play:active i { opacity: 0.7; }
.guess-play:focus-visible { outline: 2px solid var(--contentOverImageLight); outline-offset: 3px; }
.guess-player.waiting .guess-play i { animation: breathe 800ms ease-in-out infinite alternate; }
.guess-player.failed .guess-play i, .guess-game.guessed .guess-play i { opacity: 0.5; }
.guess-game.guessed .guess-play { cursor: default; }
@keyframes breathe { from { opacity: 1; } to { opacity: 0.45; } }
.guess-track { flex: 1; min-width: 0; }
.guess-bar { position: relative; height: 4px; border-radius: 1000px; overflow: hidden; }
.guess-bar::before { content: ""; position: absolute; inset: 0; background: var(--backgroundPurpleLight); opacity: 0.35; }
.guess-bar span { position: absolute; inset: 0; background: var(--backgroundPink); transform-origin: left center; transform: scaleX(0); }
.guess-time { margin: 6px 0 0; color: var(--contentOverBackgroundPurpleDark); font-variant-numeric: tabular-nums; }
.guess-wave { flex: none; display: flex; align-items: center; gap: 4px; height: 32px; }
.guess-wave span { width: 4px; height: 100%; border-radius: 1000px; background: var(--backgroundPink); transform: scaleY(0.25); }
.guess-player.on .guess-wave span { animation: wave 700ms ease-in-out infinite alternate; }
.guess-wave span:nth-child(2) { animation-delay: -250ms; }
.guess-wave span:nth-child(3) { animation-delay: -500ms; }
.guess-wave span:nth-child(4) { animation-delay: -150ms; }
.guess-wave span:nth-child(5) { animation-delay: -400ms; }
@keyframes wave { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }
.guess-status { margin: 10px 0 12px; min-height: 16px; text-align: center; color: var(--contentOverBackgroundPurpleDark); }
.guess-ask { border: 0; margin: 0; padding: 0; min-width: 0; }
.guess-ask legend {
  padding: 0; margin: 0 0 12px; color: var(--contentOverImageLight);
  font-size: var(--text-headline3-size); line-height: var(--text-headline3-line);
  letter-spacing: var(--text-headline3-tracking); font-weight: var(--text-headline3-weight);
}
.guess-covers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.guess-cover {
  display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 0; border: 0;
  background: none; color: var(--contentOverImageLight); font: inherit; text-align: left; cursor: pointer;
  transition: opacity 200ms ease, transform 150ms ease;
}
.guess-cover:active:not(:disabled) { transform: scale(0.97); }
.guess-cover:disabled { cursor: default; }
.guess-face {
  position: relative; display: block; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden;
  border: 3px solid transparent; background: var(--backgroundPurpleLight);
}
.guess-face img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 13px; }
.guess-cover:focus-visible .guess-face { outline: 2px solid var(--contentOverImageLight); outline-offset: 2px; }
.guess-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.guess-cover.right .guess-face { border-color: var(--backgroundGreen); }
.guess-cover.wrong .guess-face { border-color: var(--contentAccent); }
.guess-cover.wrong, .guess-cover.other { opacity: 0.55; }
.guess-mark { display: none; }
.guess-cover.right .guess-mark {
  display: block; position: absolute; right: 6px; top: 6px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--backgroundGreen);
}
.guess-cover.right .guess-mark::after {
  content: ""; position: absolute; inset: 4px; background: var(--contentOverBackgroundGreen);
  -webkit-mask: url("/play/kit/icons/check.svg") center / contain no-repeat;
  mask: url("/play/kit/icons/check.svg") center / contain no-repeat;
}
.pick-list.one { grid-template-columns: minmax(0, 184px); justify-content: center; text-align: center; }

/* The advent calendar (games/advent.js): four doors a row on the dark panel, each door
 * backgroundPurpleLight with its number in contentOverBackgroundPurpleLight at Headline 3, today's
 * door backgroundPink with contentOverBackgroundPink, as the ad draws it. A door that has not
 * come is at 45% and says when it opens. An opened door swings open on its left edge and shows the
 * cover, its number on a backgroundPink tag. Corner radius 8px, the page's own. */
.game.advent-game { display: block; touch-action: auto; user-select: auto; -webkit-user-select: auto; }
.advent-doors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.advent-door {
  position: relative; aspect-ratio: 1 / 1; padding: 0; border: 0; border-radius: 8px;
  background: var(--backgroundDark); color: inherit; font: inherit; cursor: pointer; perspective: 600px;
}
.advent-door:focus-visible { outline: 2px solid var(--contentOverImageLight); outline-offset: 2px; }
.advent-behind { position: absolute; inset: 0; border-radius: 8px; overflow: hidden; }
.advent-behind img { display: block; width: 100%; height: 100%; object-fit: cover; }
.advent-door:not(.open) .advent-behind img { visibility: hidden; }
.advent-front {
  position: absolute; inset: 0; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--backgroundPurpleLight); color: var(--contentOverBackgroundPurpleLight);
  transform-origin: left center; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  transition: transform 700ms cubic-bezier(0.3, 0.7, 0.3, 1);
}
.advent-day {
  font-size: var(--text-headline3-size); line-height: var(--text-headline3-line);
  letter-spacing: var(--text-headline3-tracking); font-weight: var(--text-headline3-weight);
}
.advent-today { font-weight: var(--text-headline3-weight); }
.advent-door.now .advent-front { background: var(--backgroundPink); color: var(--contentOverBackgroundPink); }
.advent-door.now:not(.open) .advent-front { animation: glow 1400ms ease-in-out infinite alternate; }
@keyframes glow { to { filter: brightness(1.12); } }
.advent-door.locked { cursor: default; }
.advent-door.locked .advent-front { opacity: 0.45; }
.advent-door.open .advent-front { transform: rotateY(-110deg); pointer-events: none; }
.advent-tag {
  display: none; position: absolute; left: 4px; top: 4px; min-width: 22px; padding: 0 6px; border-radius: 1000px;
  background: var(--backgroundPink); color: var(--contentOverBackgroundPink); text-align: center;
  font-size: var(--text-meta2-size); line-height: var(--text-meta2-line); font-weight: var(--text-headline3-weight);
}
.advent-door.open .advent-tag { display: block; }
.advent-door.shake { animation: shake 420ms ease; }
@keyframes shake { 20% { transform: translateX(-3px); } 40% { transform: translateX(3px); } 60% { transform: translateX(-2px); } 80% { transform: translateX(2px); } }
.advent-status { margin: 10px 0 2px; min-height: 16px; text-align: center; color: var(--contentOverBackgroundPurpleDark); }

/* Memory match (games/memory.js): twelve cards, four a row. Face down a card is backgroundPink
 * with the N mark (kit/n-mark.svg, the wheel's slice mark, whose ground is the same pink400); face
 * up it is the square cover. A pair found keeps a backgroundGreen ring and the guessing game's
 * check mark. The cards turn on their middle in 400ms, and simply swap for reduced motion. */
.game.memory-game { display: block; touch-action: auto; user-select: auto; -webkit-user-select: auto; }
.memory-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.memory-card {
  position: relative; aspect-ratio: 1 / 1; padding: 0; border: 0; border-radius: 8px;
  background: none; color: inherit; font: inherit; cursor: pointer; perspective: 600px;
}
.memory-card:focus-visible { outline: 2px solid var(--contentOverImageLight); outline-offset: 2px; }
.memory-card.matched { cursor: default; }
.memory-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 400ms ease; }
.memory-card.up .memory-inner, .memory-card.matched .memory-inner { transform: rotateY(180deg); }
.memory-back, .memory-face {
  position: absolute; inset: 0; border-radius: 8px; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.memory-back { display: flex; align-items: center; justify-content: center; background: var(--backgroundPink); }
.memory-back i { display: block; width: 56%; height: 56%; background: url("/play/kit/n-mark.svg") center / contain no-repeat; }
.memory-face { transform: rotateY(180deg); background: var(--backgroundPurpleLight); border: 3px solid transparent; }
.memory-face img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }
.memory-card.matched .memory-face { border-color: var(--backgroundGreen); }
.memory-check { display: none; }
.memory-card.matched .memory-check {
  display: block; position: absolute; right: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--backgroundGreen);
}
.memory-card.matched .memory-check::after {
  content: ""; position: absolute; inset: 3px; background: var(--contentOverBackgroundGreen);
  -webkit-mask: url("/play/kit/icons/check.svg") center / contain no-repeat;
  mask: url("/play/kit/icons/check.svg") center / contain no-repeat;
}
.memory-count { margin: 10px 0 0; text-align: center; color: var(--contentOverBackgroundPurpleDark); font-variant-numeric: tabular-nums; }
.memory-status { margin: 2px 0 2px; min-height: 16px; text-align: center; color: var(--contentOverImageLight); }

/* The three books: the web Product Book Card (reference/components/web/Product Book Card.md) at
 * a third of the column - square cover, 16px radius, the rating badge bottom-left in
 * backgroundLight with contentPrimaryAlwaysDark, the title Heading 7 on two lines at most, the
 * author and the length in Meta 1. */
.picks { justify-content: flex-start; gap: 16px; }
.picks .intro { margin-bottom: 4px; }
.picks .intro h1 { margin-bottom: 8px; }
/* The prize, as the win screen's green badge (backgroundGreen with its content token), smaller
 * so the three books and the button stay above the fold on a phone. */
.pick-prize {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 6px 18px; border-radius: 1000px;
  background: var(--backgroundGreen); color: var(--contentOverBackgroundGreen); transform: rotate(-3deg);
}
.pick-prize strong { font-size: var(--text-headline3-size); line-height: var(--text-headline3-line); font-weight: var(--text-headline3-weight); }
.pick-prize span { font-size: var(--text-headline5-size); line-height: var(--text-headline5-line); font-weight: var(--text-headline3-weight); }
.pick-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pick { min-width: 0; }
.pick-cover { position: relative; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; background: var(--backgroundPurpleLight); }
.pick-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pick-rating {
  position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 2px;
  min-width: 24px; padding: 0 6px; border-radius: 999px;
  background: var(--backgroundLight); color: var(--contentPrimaryAlwaysDark);
  font-size: var(--text-meta2-size); line-height: var(--text-meta2-line); font-weight: var(--text-meta2-weight);
}
.pick-rating i {
  width: 10px; height: 10px; background: var(--contentYellow);
  -webkit-mask: url("/play/kit/icons/star.svg") center / contain no-repeat;
  mask: url("/play/kit/icons/star.svg") center / contain no-repeat;
}
.pick-title {
  margin: 8px 0 2px; color: var(--contentOverImageLight);
  font-size: var(--text-headline-body-7-size); line-height: var(--text-headline-body-7-line);
  letter-spacing: var(--text-headline-body-7-tracking); font-weight: var(--text-headline-body-7-weight);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
.pick-author, .pick-length { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picks .terms { margin: -4px 0 0; text-align: center; }
.again-quiz { align-self: center; }

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