:root {
  --ink: #140F0A;
  --grape: #2A231C;
  --deep: #16130F;
  --lift: #3A2F24;
  --lime: #FF5A1F;
  --cyan: #FFE2B0;
  --pink: #FFC83D;
  --sun: #FFC83D;
  --paper: #FFF1D6;
  --muted: #5C5248;
  --display: "Unbounded", system-ui, sans-serif;
  --body: "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-weight: 700;
  color: #fff;
  background: var(--deep);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
a { color: inherit; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(22, 19, 15, .85);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(255,255,255,.08);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 900; font-size: 17px; letter-spacing: .5px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--ink); }
.top nav { display: flex; gap: 22px; }
.top nav a { text-decoration: none; opacity: .85; font-size: 15px; }
.top nav a:hover { opacity: 1; color: var(--lime); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--display); font-weight: 900; font-size: 16px; text-decoration: none;
  color: var(--ink); background: var(--lime);
  border: 3px solid var(--ink); border-radius: 18px;
  padding: 15px 22px; box-shadow: 0 6px 0 var(--ink);
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover { transform: translateY(2px); box-shadow: 0 4px 0 var(--ink); }
.btn:active { transform: translateY(6px); box-shadow: 0 0 0 var(--ink); }
.btn.alt { background: #fff; }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn { text-align: center; text-wrap: balance; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; overflow: clip;
  background: radial-gradient(55% 65% at 76% 56%, var(--grape), rgba(42,35,28,0) 72%), var(--deep);
  padding: 72px 0 96px;
}
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; }
.shout {
  font-family: var(--display); font-weight: 900; color: var(--paper);
  font-size: clamp(36px, 4.4vw, 62px); line-height: 1.04; letter-spacing: -.025em;
  margin: 0 0 24px; text-wrap: balance;
}
.shout .u { position: relative; display: block; width: fit-content; }
.ul { position: absolute; left: -2%; bottom: -.2em; width: 104%; height: .3em; overflow: visible;
  animation: wipe .8s cubic-bezier(.16, 1, .3, 1) .3s backwards; }
.ul path { fill: none; stroke: var(--lime); stroke-width: 7; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ul path + path { stroke-width: 5; }
.hero h1 {
  font-family: var(--body); font-weight: 800; font-size: clamp(18px, 1.7vw, 22px); line-height: 1.35;
  color: var(--cyan); max-width: 30ch; margin: 0 0 32px; text-wrap: balance;
}
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; height: 60px; padding: 0 22px 0 16px;
  background: #000; color: #fff; text-decoration: none; border: 2px solid rgba(255, 241, 214, .4); border-radius: 14px;
  transition: border-color .15s ease;
}
.store:hover { border-color: var(--paper); }
.store svg { width: 28px; height: 28px; flex: none; margin-top: -3px; }
.store span { display: flex; flex-direction: column; font-family: var(--body); font-weight: 800; font-size: 21px; line-height: 1.05; letter-spacing: -.01em; }
.store small { font-size: 12px; font-weight: 700; letter-spacing: .01em; }
.trust { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; font-weight: 700; color: #E9DCC4; }
.trust li { display: flex; align-items: center; gap: 8px; }
.trust svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--sun); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* the game moment: a situation, three played cards, the judge's pick */
.table { margin: 0; width: 100%; max-width: 500px; justify-self: center; padding-bottom: 30px; }
.sit {
  position: relative; margin: 0 4%; padding: 16px 20px 18px; transform: rotate(-1.5deg);
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 0 8px 0 var(--ink);
}
.sit span { font-family: var(--display); font-weight: 800; font-size: 11px; letter-spacing: .12em; color: #B83A0A; }
.sit p { margin: 6px 0 0; font-family: var(--display); font-weight: 800; font-size: clamp(15px, 1.45vw, 19px); line-height: 1.28; text-wrap: balance; }
.hand { display: flex; justify-content: center; align-items: flex-end; padding-top: 44px; }
.mc {
  position: relative; flex: 0 0 31%; padding: 6px; background: var(--paper);
  border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 8px 0 var(--ink);
}
.mc img { width: 100%; height: auto; border-radius: 11px; border: 2px solid var(--ink); }
.mc:first-child { transform: translate(16%, 10px) rotate(-9deg); }
.mc:last-child { transform: translate(-16%, 10px) rotate(8deg); }
.mc:not(.win) img { filter: saturate(.8) brightness(.82); }
.mc.win {
  flex-basis: 40%; z-index: 1; transform: translateY(-16px) rotate(-1.5deg);
  box-shadow: 0 0 0 5px var(--lime), 0 14px 0 5px var(--ink);
  animation: pick .8s cubic-bezier(.16, 1, .3, 1) .5s backwards;
}
.crown { position: absolute; width: 64px; top: -40px; left: -26px; transform: rotate(-20deg); overflow: visible;
  animation: pop .5s cubic-bezier(.34, 1.56, .64, 1) 1.05s backwards; }
.crown path, .crown circle { fill: var(--sun); stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
.spark { position: absolute; width: 40px; top: 6%; right: -44px; overflow: visible; }

.spark path { fill: none; stroke: var(--sun); stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .45s cubic-bezier(.16, 1, .3, 1) 1.15s forwards; }
.won {
  position: absolute; left: 50%; bottom: -19px; transform: translateX(-50%) rotate(-4deg); white-space: nowrap;
  font-family: var(--display); font-weight: 900; font-size: 13px; letter-spacing: .08em;
  background: var(--sun); color: var(--ink); border: 3px solid var(--ink); border-radius: 999px; padding: 5px 14px;
  box-shadow: 0 4px 0 var(--ink);
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes wipe { from { clip-path: inset(-50% 100% -50% 0); } to { clip-path: inset(-50% -2% -50% 0); } }
@keyframes pick { from { transform: translateY(8px) rotate(0); box-shadow: 0 0 0 0 var(--lime), 0 8px 0 0 var(--ink); } }
@keyframes pop { from { transform: rotate(-50deg) scale(.2); opacity: 0; } }

/* ---------- sections ---------- */
section { padding: 88px 0; }
.section-title { font-family: var(--display); font-weight: 900; font-size: clamp(30px, 4.6vw, 48px); line-height: 1.05; margin: 0 0 14px; }
.section-sub { font-size: 18px; opacity: .8; max-width: 620px; margin: 0 0 44px; }
.paper-band { background: var(--paper); color: var(--ink); }
.paper-band .section-sub { color: var(--muted); opacity: 1; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.step {
  background: #fff; border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 8px 0 var(--ink);
  padding: 26px 22px; position: relative;
}
.step::before {
  counter-increment: s; content: counter(s);
  position: absolute; top: -20px; left: 20px;
  width: 44px; height: 44px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 900; font-size: 20px;
  background: var(--pink); color: #fff; border: 3px solid var(--ink); border-radius: 50%;
}
.step h3 { font-family: var(--display); font-weight: 900; font-size: 20px; margin: 12px 0 8px; }
.step p { margin: 0; color: var(--muted); }

.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mode { border: 3px solid var(--ink); border-radius: 20px; padding: 22px; color: var(--ink); box-shadow: 0 7px 0 var(--ink); }
.mode h3 { font-family: var(--display); font-weight: 900; font-size: 19px; margin: 0 0 6px; }
.mode p { margin: 0; font-size: 15px; }
.m1 { background: var(--lime); } .m2 { background: var(--cyan); } .m3 { background: var(--sun); }
.m4 { background: #FFB27A; } .m5 { background: #fff; } .m6 { background: #FFE2B0; }

.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.feature { background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.14); border-radius: 22px; padding: 26px; }
.feature h3 { font-family: var(--display); font-weight: 900; font-size: 20px; margin: 0 0 8px; color: var(--lime); }
.feature p { margin: 0; opacity: .85; }

.final { text-align: center; background: radial-gradient(circle at 50% 0%, #7A4E2A, #4A3524 55%, #2E241B); }
.final .cta { justify-content: center; }

/* ---------- footer ---------- */
footer { background: #0E0B08; padding: 44px 0 36px; font-size: 14px; }
footer .wrap { display: grid; gap: 18px; }
footer .links { display: flex; flex-wrap: wrap; gap: 20px; }
footer .links a { text-decoration: none; opacity: .85; }
footer .links a:hover { color: var(--lime); opacity: 1; }
footer .fine { opacity: .6; font-weight: 600; max-width: 820px; }

/* ---------- legal pages ---------- */
.legal { background: var(--paper); color: var(--ink); padding: 56px 0 80px; }
.legal .wrap { max-width: 800px; }
.legal h1 { font-family: var(--display); font-weight: 900; font-size: clamp(30px, 5vw, 44px); line-height: 1.05; margin: 0 0 8px; }
.legal .updated { color: var(--muted); margin: 0 0 32px; }
.legal h2 { font-family: var(--display); font-weight: 900; font-size: 21px; margin: 38px 0 10px; }
.legal h3 { font-size: 17px; margin: 22px 0 6px; }
.legal p, .legal li { font-weight: 600; color: #2A231C; }
.legal ul, .legal ol { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal a { color: #C2410C; font-weight: 800; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.legal th, .legal td { text-align: left; vertical-align: top; border-bottom: 2px solid rgba(20,15,10,.12); padding: 10px 8px; font-weight: 600; }
.legal th { font-family: var(--display); font-size: 13px; letter-spacing: .5px; }
.callout {
  background: #fff; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 6px 0 var(--ink);
  padding: 18px 20px; margin: 22px 0;
}
.callout.hot { background: var(--lime); }
.table-scroll { overflow-x: auto; }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero { padding: 40px 0 72px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; }
  .shout { font-size: clamp(34px, 9.4vw, 56px); }
  .steps, .modes, .feature-grid { grid-template-columns: 1fr; }
  .steps { gap: 34px; }
  section { padding: 64px 0; }
  .top nav { gap: 14px; }
  .top nav a.hide-sm { display: none; }
}
@media (max-width: 420px) {
  .wrap { padding: 0 16px; }
  .btn { width: 100%; }
  .btn.big { font-size: 16px; padding: 17px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .store { transition: none; }
  .mc.win, .crown, .ul { animation: none; }
  .spark path { animation: none; stroke-dashoffset: 0; }
}
.btn.soon { opacity: .65; cursor: default; }
.btn.soon:hover { transform: none; box-shadow: 0 6px 0 var(--ink); }

/* ---------- browser play ---------- */
.btn.big { font-size: 18px; padding: 17px 26px; }
.top nav { align-items: center; }
.top nav a.nav-play {
  opacity: 1; color: var(--ink); background: var(--lime); font-family: var(--display); font-weight: 900; font-size: 14px;
  border: 2px solid var(--ink); border-radius: 999px; padding: 7px 16px; box-shadow: 0 3px 0 var(--ink);
}
.top nav a.nav-play:hover { color: var(--ink); transform: translateY(1px); box-shadow: 0 2px 0 var(--ink); }
.modes { grid-template-columns: repeat(4, 1fr); }
.mode { position: relative; }
.m7 { background: var(--pink); color: var(--ink); }
.m8 { background: var(--deep); color: #fff; border-color: var(--lime); box-shadow: 0 7px 0 var(--lime); text-decoration: none; }
.m8 h3 { color: var(--lime); }
.m8:hover { transform: translateY(2px); box-shadow: 0 5px 0 var(--lime); }
.mode .new {
  position: absolute; top: -12px; right: 14px; font-family: var(--display); font-weight: 900; font-size: 11px; letter-spacing: 1px;
  background: var(--lime); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 10px; transform: rotate(4deg);
}
@media (max-width: 1080px) { .modes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 880px) { .modes { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .m8:hover, .top nav a.nav-play:hover { transform: none; } }
.brand, .top nav a.nav-play { white-space: nowrap; }
@media (max-width: 420px) {
  .brand { font-size: 14px; gap: 8px; }
  .brand img { width: 30px; height: 30px; }
}

/* ---------- FAQ ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.faq { display: grid; gap: 14px; max-width: 820px; }
.qa { background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.14); border-radius: 18px; padding: 4px 22px; }
.qa summary { cursor: pointer; list-style: none; font-family: var(--display); font-weight: 900; font-size: 17px; padding: 14px 28px 14px 0; position: relative; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; position: absolute; right: 0; top: 10px; font-size: 24px; color: var(--lime); }
.qa[open] summary::after { content: "–"; }
.qa p { margin: 0 0 16px; opacity: .85; }

/* ---------- language switcher + 8 modes ---------- */
.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
  font-family: var(--display); font-weight: 800; font-size: 13px; letter-spacing: .5px; opacity: .85; padding: 6px 2px;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { opacity: 1; color: var(--lime); }
.lang summary svg { width: 18px; height: 18px; flex: none; }
.lang ul {
  position: absolute; right: 0; top: calc(100% + 12px); margin: 0; padding: 8px; list-style: none; min-width: 170px;
  background: var(--grape); border: 2px solid rgba(255,255,255,.14); border-radius: 16px; box-shadow: 0 6px 0 var(--ink);
}
.top nav .lang a { display: block; padding: 8px 12px; border-radius: 10px; opacity: 1; }
.top nav .lang a:hover { background: var(--lift); }
.top nav .lang a[aria-current="page"] { color: var(--lime); }
.m9 { background: var(--paper); }
.m8 { grid-column: 1 / -1; }
@media (max-width: 420px) {
  .top nav { gap: 8px; }
  .top nav a.nav-play { padding: 7px 10px; }
  .brand { font-size: 13px; }
  .lang summary svg { display: none; }
}
@media (max-width: 374px) { .brand { font-size: 0; gap: 0; } }

/* Android badge until the Play release is back */
.store.soon { opacity: .72; cursor: default; }
.store.soon:hover { border-color: inherit; }
.hero .cta { flex-direction: column; align-items: flex-start; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- content pages: /modes/, alternatives (tool/gen_pages.py) ---------- */
a.mode { display: block; text-decoration: none; transition: transform .08s ease, box-shadow .08s ease; }
a.mode:not(.m8):hover { transform: translateY(2px); box-shadow: 0 5px 0 var(--ink); }
.mode small { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 800; border: 2px solid currentColor; border-radius: 999px; padding: 1px 10px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 0; margin: 0 0 18px; font-size: 14px; color: #E9DCC4; }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .5; }
.crumbs a { text-decoration: none; opacity: .85; }
.crumbs a:hover { color: var(--lime); opacity: 1; }
.page-hero { padding: 48px 0 80px; }
.page-hero.tight { padding: 48px 0 24px; }
.page-hero h1 {
  font-family: var(--display); font-weight: 900; color: var(--paper); font-size: clamp(30px, 4.2vw, 50px);
  line-height: 1.06; letter-spacing: -.02em; margin: 0 0 18px; max-width: 20ch; text-wrap: balance; overflow-wrap: anywhere;
}
.lead { font-size: 19px; line-height: 1.45; color: var(--cyan); max-width: 56ch; margin: 0 0 28px; }
.route { margin: 18px 0 0; font-size: 14px; color: #E9DCC4; opacity: .85; }
.hand.solo .mc.win { flex-basis: 58%; max-width: 280px; }
.hand.solo .mc.win .crown { left: -22px; }
.doodle { width: 100%; height: auto; display: block; background: #fff; border: 2px solid var(--ink); border-radius: 11px; }
.brain { list-style: none; margin: 40px 6% 0; padding: 0; display: grid; gap: 12px; }
.brain li {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; color: var(--ink);
  background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 6px 0 var(--ink);
}
.brain li:first-child { background: var(--lime); transform: rotate(-1.5deg); }
.brain li:last-child { opacity: .75; }
.brain b { font-family: var(--display); font-weight: 900; font-size: 18px; }
.brain span { font-size: 13px; font-weight: 800; white-space: nowrap; }
ol.steps { list-style: none; padding: 0; margin: 0; }
@media (min-width: 881px) { ol.steps { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); } }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fact { background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.14); border-radius: 18px; padding: 16px 18px; }
.fact dt { font-family: var(--display); font-weight: 900; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--lime); }
.fact dd { margin: 6px 0 0; font-size: 17px; }
.facts.ink { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.facts.ink .fact { background: #fff; border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--ink); }
.facts.ink dt { color: #B83A0A; }
.prose { max-width: 720px; font-size: 17px; }
.prose p { margin: 0 0 16px; opacity: .9; }
.prose ul { padding-left: 20px; margin: 0; }
.prose li { margin: 0 0 12px; }
.prose a, .disclaimer a { color: var(--lime); font-weight: 800; }
.paper-band .prose p { opacity: 1; color: #2A231C; }
.paper-band .prose a { color: #C2410C; }
.disclaimer { font-size: 14px; color: var(--muted) !important; margin-top: 28px !important; }
.cards-band { padding: 24px 0 88px; }
.cmp { width: 100%; min-width: 560px; border-collapse: separate; border-spacing: 0; background: #fff; border: 3px solid var(--ink); border-radius: 18px; overflow: hidden; box-shadow: 0 6px 0 var(--ink); }
.cmp th, .cmp td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 2px solid rgba(20,15,10,.1); font-size: 15px; }
.cmp thead th { font-family: var(--display); font-weight: 900; font-size: 14px; background: var(--sun); }
.cmp thead th:last-child { background: var(--lime); }
.cmp tbody th { font-family: var(--display); font-weight: 800; font-size: 13px; width: 22%; }
.cmp td { font-weight: 600; color: #2A231C; }
.cmp td:last-child { font-weight: 800; color: var(--ink); }
.table-scroll { padding-bottom: 8px; }
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .page-hero { padding: 32px 0 64px; }
}
@media (max-width: 420px) { .facts { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { a.mode:hover { transform: none; } }
ol.steps { margin-top: 44px; }
@media (max-width: 640px) {  /* comparison table stacks into one card per row */
  .cmp { min-width: 0; }
  .cmp thead { display: none; }
  .cmp tr { display: block; padding: 12px 16px; border-bottom: 2px solid rgba(20,15,10,.1); }
  .cmp tbody th, .cmp td { display: block; width: auto; padding: 4px 0; border: 0; }
  .cmp td::before { content: attr(data-l); display: block; font-family: var(--display); font-size: 11px; letter-spacing: .06em; color: #B83A0A; }
}
