/* Twenty Questions: Emoji. The app's own look (Theme.swift): cream page, sand cards, terracotta accent,
   the system font in heavy and black weights, small-caps labels with wide letter spacing. */
@font-face {
  font-family: DM;
  src: url(/assets/fonts/dm-sans.woff2);
  font-display: swap;
  font-weight: 100 900;
}

:root {
  --page: #f4f1ea;
  --card: #e9e5db;
  --card-solved: #dcebdd;
  --card-lost: #f0deda;
  --ink: #1e1c19;
  --muted: #7b756b;
  --faint: #b5aea2;
  --line: #d6d0c4;
  --chip: #fbf9f5;
  --yes: #2f8a55;
  --no: #c2412d;
  --maybe: #b7800c;
  --accent: #c8643b;
  --accent-dark: #a94f2b;
  --wrap: min(1160px, 100% - 32px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", DM, system-ui, sans-serif;
  --emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}
body {
  overflow-x: clip;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
button,
input {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  touch-action: manipulation;
}
button:disabled {
  cursor: default;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.1;
}
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
}
.skip:focus {
  left: 8px;
}
.tq-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.tq-caps {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.tq-small {
  font-size: 14px;
  color: var(--muted);
}

/* Buttons: the app's 16 pt rounded slabs. */
.tq-button,
.tq-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 24px;
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  text-decoration: none;
  transition: transform 120ms ease-out, background-color 120ms;
}
.tq-button:hover,
.tq-cta:hover {
  background: var(--accent-dark);
}
.tq-button:active {
  transform: scale(0.97);
}
.tq-button.secondary {
  background: var(--card);
  color: var(--ink);
}
.tq-button.secondary:hover {
  background: var(--line);
}
.tq-button:disabled {
  opacity: 0.55;
}
.tq-link {
  border: 0;
  background: none;
  min-height: 44px;
  padding: 0 4px;
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
}
.tq-link:disabled {
  opacity: 0.45;
}
.tq-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tq-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tq-chips li {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--chip);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
}
.tq-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--chip);
  font-size: 14px;
  font-weight: 800;
  vertical-align: 1px;
  margin-right: 6px;
}
.tq-pill.yes {
  color: var(--yes);
}
.tq-pill.no {
  color: var(--no);
}
.tq-pill.maybe {
  color: var(--maybe);
}

/* Header */
.tq-head {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px max(16px, (100% - 1160px) / 2);
  background: color-mix(in srgb, var(--page) 90%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.tq-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tq-logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.tq-head nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
  font-size: 15px;
  font-weight: 600;
}
.tq-head nav a {
  text-decoration: none;
  color: var(--muted);
}
.tq-head nav a:hover {
  color: var(--ink);
}
.tq-cta {
  min-height: 42px;
  padding: 8px 18px;
  border-radius: 12px;
  font-size: 15px;
}

/* Sections */
main > section {
  padding: 88px max(16px, (100% - 1160px) / 2);
}
.tq-head-block {
  max-width: 720px;
  margin-bottom: 36px;
}
.tq-head-block h2 {
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.tq-head-block p:not(.tq-caps) {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
}

/* The emoji board (EmojiCloud): spans placed and scaled by transform. */
.tq-cloud {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.tq-cloud .e {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  font: 51px/64px var(--emoji);
  text-align: center;
  transform: scale(0);
  opacity: 0;
  transition: transform 650ms ease-out, opacity 650ms ease-out;
  pointer-events: none;
}
.tq-cloud .e.out {
  transition: transform 320ms ease-in, opacity 320ms ease-in;
  transition-delay: 0ms !important;
}
.tq-cloud .e i {
  display: block;
  font-style: normal;
}
.tq-cloud .e.pop i {
  animation: pop 900ms ease-out;
}
@keyframes pop {
  40% {
    transform: scale(1.9) rotate(-8deg);
  }
}
.tq-cloud .e.sel {
  z-index: 5;
  transition: transform 400ms cubic-bezier(0.3, 1.5, 0.5, 1);
}
.tq-halo {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 2px solid var(--accent);
  pointer-events: none;
}

/* Hero */
.tq-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 520px);
  gap: 48px;
  align-items: center;
  padding-top: 48px !important;
  padding-bottom: 56px !important;
}
.tq-hero .tq-caps {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.3em;
  color: var(--ink);
}
.tq-hero h1 {
  font-size: clamp(40px, 5.2vw, 68px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.tq-hero-copy > p:not(.tq-caps):not(.tq-small) {
  max-width: 520px;
  margin: 22px 0 28px;
  font-size: 19px;
  color: var(--muted);
}
.tq-hero-copy .tq-small {
  margin-top: 16px;
}
.tq-hero-board {
  display: grid;
  justify-items: center;
  gap: 12px;
}
.tq-hero-board .tq-cloud {
  max-width: 520px;
  cursor: pointer;
  animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe {
  50% {
    transform: scale(1.025) rotate(1.5deg);
  }
}
.tq-hero-name {
  min-height: 28px;
  margin: 0;
  font-weight: 700;
  font-size: 17px;
  text-align: center;
}
.tq-hero-name .yes {
  color: var(--yes);
}
.tq-try {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.tq-try button,
.tq-cats button,
.tq-deck-cats button {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--card);
  font-size: 14px;
  font-weight: 600;
}
.tq-try button[aria-pressed="true"],
.tq-cats button[aria-selected="true"],
.tq-deck-cats button[aria-selected="true"] {
  background: var(--ink);
  color: var(--page);
}

/* Numbers: the store screenshots' terracotta band. */
.tq-numbers {
  background: var(--accent);
  color: #fff;
  padding-top: 36px !important;
  padding-bottom: 36px !important;
}
.tq-numbers dl {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin: 0;
}
.tq-numbers div {
  display: flex;
  flex-direction: column-reverse;
}
.tq-numbers dd {
  margin: 0;
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tq-numbers dt {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* Play */
.tq-game {
  display: grid;
  grid-template-columns: minmax(0, 470px) minmax(0, 1fr);
  grid-template-areas: "modes modes" "left side";
  gap: 18px 28px;
  align-items: start;
}
.tq-modebar {
  grid-area: modes;
  display: inline-flex;
  justify-self: start;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--card);
}
.tq-modebar button {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 11px;
  background: none;
  font-weight: 700;
  font-size: 15px;
}
.tq-modebar button[aria-pressed="true"] {
  background: var(--chip);
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.12);
}
.tq-left {
  grid-area: left;
}
.tq-side {
  grid-area: side;
  position: relative;
  min-width: 0;
}
.tq-boardcard {
  position: relative;
  padding: 14px 16px 12px;
  border-radius: 18px;
  background: var(--card);
  transition: background-color 400ms;
}
.tq-game[data-status="won"] .tq-boardcard {
  background: var(--card-solved);
}
.tq-game[data-status="lost"] .tq-boardcard {
  background: var(--card-lost);
}
.tq-mode-title {
  margin: 0 0 4px;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.3em;
}
.tq-cloud-wrap {
  position: relative;
  width: min(100%, 400px);
  margin: 6px auto 0;
}
.tq-game[data-status="playing"] .tq-cloud {
  cursor: pointer;
}
.tq-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  background: radial-gradient(circle, color-mix(in srgb, var(--card) 88%, transparent) 30%, transparent 70%);
}
.tq-start .tq-button {
  min-width: 180px;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 8px 24px rgb(200 100 59 / 0.35);
}
.tq-start p {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 600;
}
/* The answer sits over the counters, below the board, so the emojis left stay in sight. */
.tq-toast {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  z-index: 10;
  padding: 6px 14px 8px;
  border-radius: 14px;
  background: var(--chip);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.12);
  text-align: center;
  animation: toast-in 150ms ease-out;
}
@keyframes toast-in {
  from {
    opacity: 0;
  }
}
.tq-toast small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--muted);
}
.tq-toast b {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
}
.tq-toast span {
  margin-left: 8px;
  font-size: 13px;
  color: var(--muted);
}
.yes-t {
  color: var(--yes);
}
.no-t {
  color: var(--no);
}
.maybe-t {
  color: var(--maybe);
}
.tq-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 10px;
  padding-top: 8px;
  border-top: 0.5px solid var(--faint);
  text-align: center;
}
.tq-stats span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.tq-stats b {
  font-size: 20px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.tq-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 2px 4px;
}
.tq-log-empty {
  margin: 4px 12px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}
.tq-log {
  margin: 0;
  padding: 0 4px;
  list-style: none;
}
.tq-log li,
.tq-compare li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 0;
  border-bottom: 0.5px solid var(--line);
  font-size: 14px;
  font-weight: 600;
}
.tq-log .n {
  width: 18px;
  flex: none;
  font-size: 12px;
  font-weight: 400;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.tq-log .q,
.tq-compare .q {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tq-log .r {
  font-size: 12px;
  font-weight: 400;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.tq-log .a,
.tq-compare .a {
  min-width: 30px;
  text-align: right;
  font-weight: 800;
}

.tq-selected {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  background: var(--chip);
}
.tq-selected .tq-button {
  min-height: 48px;
  padding: 8px 16px;
  font-size: 16px;
}
.tq-sheets,
.tq-result {
  border-radius: 18px;
  background: var(--chip);
  border: 1px solid var(--line);
  overflow: hidden;
}
.tq-game[data-status="ready"] .tq-sheets {
  opacity: 0.55;
  pointer-events: none;
}
.tq-sheet-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}
.tq-sheet-tabs button {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: var(--card);
  font-weight: 800;
  font-size: 16px;
}
.tq-sheet-tabs button[aria-selected="true"] {
  background: var(--accent);
  color: #fff;
}
.tq-sheet-tabs small {
  font-weight: 600;
  opacity: 0.8;
}
.tq-sheet {
  padding: 12px 12px 14px;
}
.tq-cats {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
}
.tq-cats button {
  flex: none;
}
.tq-note {
  margin: 0 4px 8px;
  font-size: 14px;
  color: var(--muted);
}
.tq-questions,
.tq-guesses {
  max-height: 420px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.tq-questions {
  display: grid;
  align-content: start;
  gap: 6px;
  height: 420px;
}
.tq-questions .tq-note {
  margin: 0 4px 2px;
}
.tq-questions button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--chip);
  text-align: left;
  font-weight: 600;
  font-size: 16px;
}
.tq-questions button:hover:not(:disabled) {
  border-color: var(--accent);
}
.tq-questions button:disabled {
  background: none;
  color: var(--faint);
}
.tq-questions button span {
  flex: 1;
}
.tq-questions button b {
  font-size: 15px;
}
.tq-botpick {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px 14px;
  border: 1px dashed var(--faint);
  border-radius: 12px;
  background: none;
  text-align: left;
  font-weight: 700;
  font-size: 15px;
}
.tq-botpick small {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}
.tq-botpick:disabled {
  opacity: 0.5;
}
.tq-search input {
  width: 100%;
  min-height: 40px;
  margin-bottom: 8px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: var(--card);
  font-size: 16px;
}
.tq-nomatch {
  padding: 24px;
  text-align: center;
  color: var(--muted);
}
.tq-guesses {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
}
.tq-guesses button {
  display: grid;
  justify-items: center;
  padding: 8px 2px;
  border: 0;
  border-radius: 12px;
  background: none;
  min-width: 0;
}
.tq-guesses button:hover,
.tq-guesses button[aria-pressed="true"] {
  background: var(--card);
}
.tq-guesses i {
  font: normal 34px/42px var(--emoji);
}
.tq-guesses small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--muted);
}
.tq-result {
  padding: 22px 18px;
  text-align: center;
}
.tq-result h3 {
  font-size: 26px;
  font-weight: 900;
}
.tq-result h3:focus {
  outline: none;
}
.tq-result p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 15px;
}
.tq-result .tq-result-emoji {
  color: var(--ink);
  font-weight: 700;
  font-size: 18px;
}
.tq-result [data-result="bot"] {
  color: var(--ink);
  font-weight: 700;
}
.tq-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 14px 0;
  text-align: left;
}
.tq-compare h4 {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.tq-compare ol {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.tq-compare li {
  font-size: 13px;
}
.tq-share {
  margin: 14px auto;
  padding: 12px;
  border-radius: 14px;
  background: var(--card);
  max-width: 420px;
}
.tq-share pre,
.tq-sharecard {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: 600 14px/1.6 var(--font);
}
.tq-result .tq-actions {
  justify-content: center;
}

/* How to play */
.tq-how {
  background: var(--chip);
}
.tq-rules {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}
.tq-rules li {
  padding: 18px;
  border-radius: 18px;
  background: var(--page);
  font-size: 15px;
  color: var(--muted);
}
.tq-rules b {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
}
.tq-rules .tq-pill {
  display: table;
  margin: 0 0 10px;
  background: var(--card);
}
.tq-sortof {
  display: grid;
  grid-template-columns: minmax(0, 360px) 1fr;
  gap: 28px;
  align-items: center;
  padding: 26px;
  border-radius: 18px;
  background: var(--card);
}
.tq-sortof h3 {
  font-size: 28px;
  font-weight: 900;
}
.tq-answers {
  display: flex;
  gap: 8px;
  margin: 16px 0 10px;
}
.tq-answers button {
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid currentColor;
  border-radius: 12px;
  background: var(--chip);
  font-weight: 900;
}
.tq-answers .yes {
  color: var(--yes);
}
.tq-answers .no {
  color: var(--no);
}
.tq-answers .maybe {
  color: var(--maybe);
}
.tq-answers button[aria-pressed="true"] {
  border-color: transparent;
  color: #fff;
}
.tq-answers .yes[aria-pressed="true"] {
  background: var(--yes);
}
.tq-answers .no[aria-pressed="true"] {
  background: var(--no);
}
.tq-answers .maybe[aria-pressed="true"] {
  background: var(--maybe);
}
.tq-sortof-note {
  min-height: 48px;
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}
.tq-sortof-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tq-sortof-row li {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 14px 4px;
  border-radius: 16px;
  background: var(--chip);
  text-align: center;
  transition: transform 320ms ease-in, opacity 320ms ease-in;
}
.tq-sortof-row i {
  font: normal 44px/1.15 var(--emoji);
}
.tq-sortof-row small {
  font-size: 13px;
  font-weight: 600;
}
.tq-sortof-row b {
  font-size: 12px;
  font-weight: 800;
  visibility: hidden;
}
.tq-sortof[data-answer] .tq-sortof-row b {
  visibility: visible;
}
.tq-sortof-row li.out {
  opacity: 0.18;
  transform: scale(0.8);
}

/* The deck */
.tq-deck-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.tq-deck-panel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 28px;
  padding: 18px 22px;
  border-radius: 18px;
  background: var(--card);
}
.tq-deck-panel .tq-note {
  grid-column: 1 / -1;
  margin: 0 0 4px;
}
.tq-qrow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 6px 0;
  border-bottom: 0.5px solid var(--line);
  font-size: 15px;
  font-weight: 600;
}
.tq-qrow small {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tq-bar {
  grid-column: 1 / -1;
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--no);
}
.tq-bar i:nth-child(1) {
  background: var(--yes);
}
.tq-bar i:nth-child(2) {
  background: var(--maybe);
}
.tq-legend {
  display: flex;
  gap: 18px;
  margin: 14px 4px 0;
  font-size: 13px;
  font-weight: 700;
}
.tq-legend span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 3px;
  background: currentColor;
}
.tq-legend .yes {
  color: var(--yes);
}
.tq-legend .maybe {
  color: var(--maybe);
}
.tq-legend .no {
  color: var(--no);
}

/* Modes: the tab re-themes the whole section in the app's colours. */
.tq-modes {
  --m-bg: var(--accent);
  --m-ink: #fff;
  --m-muted: rgb(255 255 255 / 0.82);
  --m-card: rgb(255 255 255 / 0.14);
  --m-pick: #fff;
  --m-pick-ink: var(--accent);
  background: var(--m-bg);
  color: var(--m-ink);
  transition: background-color 400ms, color 400ms;
}
.tq-modes[data-mode="practice"] {
  --m-bg: #f1e4c2;
  --m-ink: var(--ink);
  --m-muted: #6b5a33;
  --m-card: rgb(183 128 12 / 0.14);
  --m-pick: var(--maybe);
  --m-pick-ink: #fff;
}
.tq-modes[data-mode="bot"] {
  --m-bg: var(--ink);
  --m-ink: var(--page);
  --m-muted: var(--faint);
  --m-card: rgb(255 255 255 / 0.08);
  --m-pick: var(--accent);
  --m-pick-ink: #fff;
}
.tq-modes[data-mode="friends"] {
  --m-bg: var(--card-solved);
  --m-ink: var(--ink);
  --m-muted: #3f6a4f;
  --m-card: rgb(47 138 85 / 0.12);
  --m-pick: var(--yes);
  --m-pick-ink: #fff;
}
.tq-modes[data-mode="race"] {
  --m-bg: var(--card-lost);
  --m-ink: var(--ink);
  --m-muted: #874033;
  --m-card: rgb(194 65 45 / 0.1);
  --m-pick: var(--no);
  --m-pick-ink: #fff;
}
.tq-modes[data-mode="league"] {
  --m-bg: color-mix(in srgb, var(--yes) 70%, var(--ink));
  --m-ink: #fff;
  --m-muted: rgb(255 255 255 / 0.8);
  --m-card: rgb(255 255 255 / 0.12);
  --m-pick: var(--card-solved);
  --m-pick-ink: var(--ink);
}
.tq-modes[data-mode="cup"] {
  --m-bg: color-mix(in srgb, var(--maybe) 72%, var(--ink));
  --m-ink: #fff;
  --m-muted: rgb(255 255 255 / 0.82);
  --m-card: rgb(255 255 255 / 0.13);
  --m-pick: #f6e3b4;
  --m-pick-ink: var(--ink);
}
.tq-modes .tq-caps,
.tq-modes .tq-head-block p {
  color: var(--m-muted);
}
.tq-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.tq-mode-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: var(--m-card);
  color: var(--m-ink);
  font-weight: 800;
  font-size: 15px;
}
.tq-mode-tabs i {
  font: normal 20px/1 var(--emoji);
}
.tq-mode-tabs button[aria-selected="true"] {
  background: var(--m-pick);
  color: var(--m-pick-ink);
}
.tq-modes :focus-visible {
  outline-color: var(--m-ink);
}
.tq-mode {
  display: grid;
  grid-template-columns: 1fr minmax(0, 420px);
  gap: 32px;
  align-items: center;
  min-height: 300px;
  padding: 30px;
  border-radius: 22px;
  background: var(--m-card);
}
.tq-mode-icon {
  margin: 0 0 6px;
  font: 56px/1 var(--emoji);
}
.tq-mode h3 {
  font-size: 32px;
  font-weight: 900;
}
.tq-mode-copy > p:not(.tq-mode-icon) {
  margin: 12px 0 18px;
  color: var(--m-muted);
}
.tq-mode .tq-chips li {
  background: var(--m-card);
  border-color: transparent;
  color: var(--m-ink);
}
.tq-mode-art {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 0;
  text-align: center;
}
.tq-mode-art figcaption {
  font-size: 14px;
  color: var(--m-muted);
}
.tq-sharecard {
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--chip);
  color: var(--ink);
  font-size: 16px;
  text-align: left;
}
.tq-slots,
.tq-prizes,
.tq-rounds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tq-slots li,
.tq-prizes li,
.tq-rounds li {
  display: grid;
  place-items: center;
  min-height: 64px;
  padding: 8px;
  border-radius: 14px;
  background: var(--chip);
  color: var(--ink);
  font-weight: 800;
  font-size: 15px;
}
.tq-slots li.free {
  background: var(--maybe);
  color: #fff;
}
.tq-prizes {
  grid-template-columns: repeat(4, 1fr);
}
.tq-prizes li,
.tq-rounds li {
  font-size: 22px;
  font-weight: 900;
}
.tq-prizes b,
.tq-rounds b {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.tq-bignum {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  font-size: 96px;
  font-weight: 900;
  line-height: 1;
}
.tq-bignum small {
  font-size: 22px;
}
.tq-code {
  display: grid;
  gap: 4px;
  padding: 18px 26px;
  border: 0;
  border-radius: 16px;
  background: var(--chip);
  color: var(--ink);
}
.tq-code span {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0.22em;
  font-variant-numeric: tabular-nums;
}
.tq-code small {
  font-size: 12px;
  color: var(--muted);
}
.tq-seats {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  width: min(100%, 320px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.tq-seats li {
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgb(194 65 45 / 0.22);
}
.tq-seats li.on {
  background: var(--no);
  animation: seat 400ms ease-out backwards;
}
@keyframes seat {
  from {
    transform: scale(0);
  }
}
.tq-mode-foot {
  margin: 18px 4px 0;
  font-size: 14px;
  color: var(--m-muted);
}

/* Hints */
.tq-hint-game {
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-areas: "secret list" "secret actions" "secret note";
  gap: 14px 32px;
  padding: 28px;
  border-radius: 22px;
  background: var(--card);
}
.tq-hint-secret {
  grid-area: secret;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  align-self: start;
}
.tq-hint-secret span {
  font: 900 88px/1 var(--font);
}
.tq-hint-secret b {
  font-size: 16px;
}
.tq-hint-list {
  grid-area: list;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: hint;
}
.tq-hint-list li {
  position: relative;
  padding: 10px 0 10px 96px;
  border-bottom: 0.5px solid var(--line);
  font-weight: 600;
  counter-increment: hint;
  animation: toast-in 300ms ease-out;
}
.tq-hint-list li::before {
  content: "💡 Hint " counter(hint);
  position: absolute;
  left: 0;
  top: 11px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.tq-hint-list li::after {
  content: attr(data-cost);
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}
.tq-hint-game .tq-actions {
  grid-area: actions;
}
.tq-hint-game .tq-button.secondary {
  background: var(--chip);
}
.tq-hint-game .tq-small {
  grid-area: note;
  margin: 0;
}

/* Screenshots */
.tq-shot-strip {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 6px 20px;
  margin-inline: -6px;
}
.tq-shot-strip figure {
  flex: 0 0 min(64vw, 260px);
  margin: 0;
  scroll-snap-align: start;
}
.tq-shot-strip img {
  width: 100%;
  height: auto;
  border-radius: 26px;
  border: 6px solid var(--ink);
  background: var(--page);
}
.tq-shot-strip figcaption {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
}

/* Final */
.tq-final {
  display: grid;
  justify-items: center;
  gap: 18px;
  background: var(--accent);
  color: #fff;
  text-align: center;
}
.tq-final img {
  border-radius: 26px;
  box-shadow: 0 12px 30px rgb(0 0 0 / 0.2);
  animation: bob 3.2s ease-in-out infinite;
}
@keyframes bob {
  50% {
    transform: translateY(-8px) rotate(-3deg);
  }
}
.tq-final h2 {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.tq-final > p {
  margin: 0;
  max-width: 520px;
  opacity: 0.9;
}
.tq-final .tq-chips {
  justify-content: center;
}
.tq-final .tq-chips li {
  background: rgb(255 255 255 / 0.16);
  border-color: transparent;
}
.tq-final .tq-button {
  background: var(--chip);
  color: var(--accent);
}
.tq-final .tq-button:hover {
  background: #fff;
}
.tq-final :focus-visible {
  outline-color: #fff;
}
.tq-legal {
  font-size: 14px;
  opacity: 0.9;
}
.made-by {
  background: var(--ink);
  text-align: center;
  padding: 16px;
  font-size: 14px;
}
.made-by a {
  color: var(--faint);
  text-decoration: none;
}
.made-by a:hover b {
  color: var(--page);
}

/* Layout */
@media (max-width: 1020px) {
  .tq-rules {
    grid-template-columns: repeat(2, 1fr);
  }
  .tq-mode {
    grid-template-columns: 1fr;
  }
  .tq-numbers dl {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 20px;
  }
}
@media (max-width: 860px) {
  .tq-head nav {
    display: none;
  }
  .tq-cta {
    margin-left: auto;
  }
  .tq-hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .tq-hero-board .tq-cloud {
    max-width: 420px;
  }
  .tq-game {
    grid-template-columns: minmax(0, 1fr);
  }
  .tq-game {
    grid-template-areas: "modes" "board" "tools" "side" "empty" "log";
    row-gap: 12px;
  }
  .tq-left {
    display: contents;
  }
  .tq-boardcard {
    grid-area: board;
  }
  .tq-toolbar {
    grid-area: tools;
    margin-top: -10px;
  }
  .tq-log-empty {
    grid-area: empty;
  }
  .tq-log {
    grid-area: log;
  }
  .tq-sortof {
    grid-template-columns: 1fr;
  }
  .tq-deck-panel {
    grid-template-columns: 1fr;
  }
  .tq-hint-game {
    grid-template-columns: 1fr;
    grid-template-areas: "secret" "list" "actions" "note";
  }
  .tq-hint-secret {
    width: 160px;
    justify-self: center;
  }
}
@media (max-width: 560px) {
  main > section {
    padding-top: 64px;
    padding-bottom: 64px;
  }
  .tq-logo span {
    letter-spacing: 0.14em;
    font-size: 13px;
  }
  .tq-hero {
    padding-top: 28px !important;
  }
  .tq-hero h1 {
    font-size: 40px;
  }
  .tq-hero-copy > p:not(.tq-caps):not(.tq-small) {
    font-size: 17px;
  }
  .tq-numbers dl {
    grid-template-columns: repeat(2, 1fr);
  }
  .tq-rules {
    grid-template-columns: 1fr;
  }
  .tq-sortof {
    padding: 18px;
  }
  .tq-sortof-row {
    grid-template-columns: repeat(3, 1fr);
  }
  .tq-cloud-wrap {
    width: min(100%, 236px);
  }
  .tq-questions,
  .tq-guesses {
    max-height: 44svh;
  }
  .tq-questions {
    height: 44svh;
  }
  .tq-mode {
    padding: 20px;
  }
  .tq-mode-tabs button {
    padding: 0 12px;
    font-size: 14px;
  }
  .tq-hint-list li {
    padding-left: 0;
    padding-top: 28px;
  }
  .tq-hint-list li::before {
    top: 8px;
  }
  .tq-prizes {
    grid-template-columns: repeat(2, 1fr);
  }
  .tq-compare {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 340px) {
  .tq-logo span {
    display: none;
  }
}

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