/* bluffyard.com. The page is one hand of poker, played from the top (the yard at night, before the flop) to the
   bottom (showdown, cards on the table). Every section is one flat colour from the game. Pixel art is shown at
   whole-number enlargements (--k) with image-rendering: pixelated, never smoothed. Boxes have the game's stepped
   corners: an outline made of four box-shadows with no corner pixels. Two fonts, the game's own: Jersey 10 for
   labels and numbers, Fredoka for sentences. */

@font-face { font-family: "Jersey 10"; src: url("/fonts/Jersey10.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("/fonts/Fredoka.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }

:root {
  --sky: #012b65; --skydeep: #021730; --fence: #874427; --fencedark: #5a2a12; --lawn: #195b2d; --lawndeep: #0f5030;
  --felt: #035720; --feltdark: #02431a; --wood: #c4641d; --wooddark: #a04a16;
  --ink: #121724; --panel: #1c2133; --panel2: #2b334d; --cream: #faf0cc; --paper: #fbf8ee; --dim: #a8adc2;
  --gold: #ffc73d; --red: #d6383d; --green: #33a85c; --amber: #f29e24; --blue: #4085eb; --purple: #7a4fc4; --purpledeep: #3d2a73;
  --fish: #40b8eb; --bandit: #eb574d; --worm: #8fd63d; --shark: #9aa8e6;
  --p: 3px;            /* one art pixel of outlines and bevels */
  --k: 3;              /* enlargement of character sprites */
  --ky: 8;             /* enlargement of the yard picture */
  --body: 20px; --line: 30px;
}
@media (max-width: 1250px) { :root { --ky: 7; } }
@media (max-width: 1000px) { :root { --ky: 6; } }
@media (max-width: 760px) { :root { --p: 2px; --k: 2; --ky: 4; --body: 17px; --line: 26px; } }
@media (max-width: 420px) { :root { --ky: 3; } }
@media (min-width: 1560px) { :root { --ky: 10; } }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--skydeep); scroll-behavior: smooth; }
body { margin: 0; color: var(--cream); background: var(--lawn); font: 400 var(--body)/var(--line) "Fredoka", system-ui, sans-serif; overflow-x: hidden; }
img.px, canvas, .bust, .yardtop, .caps { image-rendering: pixelated; }
h1, h2, h3, .tag, .btn, .potlabel, #pot, .name, .plate, .switch, .xtitle, caption, .big, .sizes b, .score { font-family: "Jersey 10", ui-monospace, monospace; font-weight: 400; letter-spacing: 0.02em; }
h1 { font-size: 50px; line-height: 50px; margin: 18px 0 14px; }
h2 { font-size: 50px; line-height: 50px; margin: 0 0 18px; }
h3 { font-size: 30px; line-height: 32px; margin: 0 0 10px; }
h3.sub { margin-top: 64px; }
p { margin: 0 0 18px; }
a { color: inherit; text-decoration-thickness: var(--p); text-underline-offset: 5px; }
em { font-style: normal; font-family: "Jersey 10", monospace; font-size: 1.25em; }
.small { font-size: 16px; line-height: 24px; opacity: .85; }
:focus-visible { outline: var(--p) dashed var(--gold); outline-offset: 5px; }
@media (max-width: 760px) { h1, h2 { font-size: 40px; line-height: 40px; } h3 { font-size: 30px; line-height: 30px; } }

.skip { position: absolute; left: 12px; top: -90px; z-index: 60; background: var(--gold); color: var(--ink); padding: 6px 12px; }
.skip:focus { top: 12px; }

/* the stepped pixel outline: four shadows, no corners */
.btn, .plate, .bubble, .note, .spot .felt, .sizes b, .xray, .pot, .signup input, .cardsvg, .switch, .consent, .famname {
  --edge: var(--ink);
  box-shadow: 0 calc(-1 * var(--p)) 0 0 var(--edge), 0 var(--p) 0 0 var(--edge), calc(-1 * var(--p)) 0 0 0 var(--edge), var(--p) 0 0 0 var(--edge);
}

section, header, footer { position: relative; padding: 72px 24px 96px; }
section > *, footer > * { max-width: 1040px; margin-left: auto; margin-right: auto; }
.wide { max-width: 720px; margin-left: auto; margin-right: auto; }
section > h2, section > .tag, section > .wide, section > h3.sub { max-width: 1040px; }
.tag { font-size: 20px; line-height: 20px; text-transform: uppercase; margin-bottom: 18px; display: flex; align-items: center; gap: 12px; color: var(--accent, var(--gold)); }
.tag::before { content: ""; width: 40px; height: var(--p); background: currentColor; }

/* every section begins with a row of fence pickets in its own colour, standing in the section above */
.street::before { content: ""; position: absolute; left: 0; right: 0; top: calc(-8px * var(--k)); height: calc(8px * var(--k));
  background-repeat: repeat-x; background-size: calc(12px * var(--k)) calc(8px * var(--k)); image-rendering: pixelated; }
.s-pre { background: var(--lawn); }
.s-pre::before { display: none; }
.s-flop { background: var(--fence); --accent: #ffd9a0; }
.s-flop::before { background-image: url("/img/edge_fence.png"); }
.s-turn { background: var(--panel); --accent: var(--gold); }
.s-turn::before { background-image: url("/img/edge_panel.png"); }
.s-river { background: var(--purpledeep); --accent: #d9c4ff; }
.s-river::before { background-image: url("/img/edge_purple.png"); }
.s-show { background: var(--paper); color: var(--ink); --accent: var(--red); }
.s-show::before { background-image: url("/img/edge_paper.png"); }

/* ---- the top: the yard at night */
.sky { background: var(--sky); padding: 0 0 40px; text-align: center; overflow: hidden; }
.yardtop { height: calc(74px * var(--ky)); background: var(--lawn) url("/img/yard_top.png") center top / calc(192px * var(--ky)) calc(74px * var(--ky)) no-repeat; }
.sky { background: linear-gradient(var(--sky) 0, var(--sky) calc(74px * var(--ky) - 12px * var(--ky)), var(--lawn) calc(74px * var(--ky) - 12px * var(--ky))); }
.heroinner { position: relative; margin-top: calc(-74px * var(--ky)); padding: 22px 20px 0; min-height: calc(74px * var(--ky)); }
.logo { width: calc(147px * 4); height: auto; max-width: none; margin: 0 auto; display: block; }
.heroinner h1 { max-width: 760px; margin-left: auto; margin-right: auto; text-shadow: 0 var(--p) 0 var(--ink), var(--p) 0 0 var(--ink), calc(-1 * var(--p)) 0 0 var(--ink), 0 calc(-1 * var(--p)) 0 var(--ink); }
.heroinner .lead { max-width: 560px; margin: 0 auto 22px; padding: 8px 14px; background: var(--ink); }
.row { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; margin: 0; }
@media (max-width: 760px) { .logo { width: calc(147px * 2); } .heroinner { padding-top: 10px; } }

.fly { position: absolute; width: var(--p); height: var(--p); background: #fff2a8; box-shadow: 0 0 0 var(--p) rgba(255, 220, 90, .25); z-index: 1; pointer-events: none;
  animation: blink 3.2s steps(1) infinite, drift 11s steps(22) infinite alternate; }
.fly:nth-child(2n) { animation-duration: 4.1s, 14s; } .fly:nth-child(3n) { animation-duration: 2.6s, 9s; animation-direction: normal, alternate-reverse; }
@keyframes blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(66px, -42px); } }
@media (prefers-reduced-motion: reduce) { .fly { animation: none; } }

/* ---- buttons: the game's own */
.btn { display: inline-block; cursor: pointer; border: 0; font-size: 30px; line-height: 30px; padding: 12px 22px 14px; color: #fff; background: var(--panel2);
  text-decoration: none; text-shadow: 0 var(--p) 0 rgba(0, 0, 0, .45); position: relative;
  box-shadow: 0 calc(-1 * var(--p)) 0 0 var(--edge), 0 var(--p) 0 0 var(--edge), calc(-1 * var(--p)) 0 0 0 var(--edge), var(--p) 0 0 0 var(--edge),
    inset 0 var(--p) 0 0 rgba(255, 255, 255, .28), inset 0 calc(-2 * var(--p)) 0 0 rgba(0, 0, 0, .3); }
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(var(--p)); box-shadow: 0 calc(-1 * var(--p)) 0 0 var(--edge), 0 var(--p) 0 0 var(--edge), calc(-1 * var(--p)) 0 0 0 var(--edge), var(--p) 0 0 0 var(--edge), inset 0 calc(-1 * var(--p)) 0 0 rgba(0, 0, 0, .3); }
.btn.red { background: var(--red); } .btn.green { background: var(--green); } .btn.amber { background: var(--amber); }
.btn[disabled] { filter: saturate(.25) brightness(.8); cursor: default; }
.btn small { display: block; font-size: 20px; line-height: 18px; opacity: .92; }

/* ---- the pot: grows as you go down the page */
.pot { position: fixed; right: 18px; top: 38%; z-index: 40; background: var(--ink); padding: 8px 12px 10px; text-align: center; min-width: 96px; --edge: var(--gold); }
.potlabel { display: block; font-size: 20px; line-height: 18px; color: var(--dim); text-transform: uppercase; }
#pot { display: block; font-size: 40px; line-height: 36px; color: var(--gold); }
.caps { display: block; margin: 6px auto 0; width: calc(37px * 2); height: calc(31px * 2); background: url("/img/pile_small.png") center bottom / calc(34px * 2) calc(24px * 2) no-repeat; }
.pot.big .caps { background-image: url("/img/pile_big.png"); background-size: calc(37px * 2) calc(31px * 2); }
.miniboard { display: flex; gap: 2px; justify-content: center; margin-top: 6px; min-height: 26px; }
.pot.bump { animation: bump .35s steps(4); }
@keyframes bump { 0% { transform: translateY(0); } 50% { transform: translateY(-9px); } 100% { transform: translateY(0); } }
@media (max-width: 1250px) {
  .pot { top: auto; bottom: 0; right: 0; left: 0; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 5px 10px; min-width: 0; --edge: transparent; border-top: var(--p) solid var(--gold); }
  .potlabel, #pot { display: inline; font-size: 30px; line-height: 30px; } .caps { display: none; } .miniboard { margin: 0; }
  footer { padding-bottom: 120px; }
}

/* ---- characters */
.bust { display: inline-block; flex: none; width: calc(var(--w) * var(--k) * 1px); height: calc(var(--h) * var(--k) * 1px);
  background-image: var(--img); background-repeat: no-repeat; background-size: calc(var(--w) * var(--k) * 4px) calc(var(--h) * var(--k) * 1px);
  background-position: calc(var(--mood, 0) * var(--w) * var(--k) * -1px) 0; }
.bust[data-mood="1"] { --mood: 1; } .bust[data-mood="2"] { --mood: 2; } .bust[data-mood="3"] { --mood: 3; }
.plate { display: inline-block; background: var(--panel); color: var(--cream); padding: 2px 10px 4px; font-size: 20px; line-height: 20px; white-space: nowrap; }
.plate b { font-weight: 400; color: var(--gold); margin-left: 6px; }

/* ---- a decision: the table, the two players, your cards, three buttons, the gnome */
.spot { margin: 28px auto 0; max-width: 760px; }
.spot .felt { position: relative; background: var(--felt); --edge: var(--wooddark); border: calc(4 * var(--p)) solid var(--wood); padding: 86px 12px 12px; display: grid;
  grid-template-columns: auto 1fr auto; align-items: end; gap: 8px; min-height: calc(92px * var(--k)); }
.seat { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.seat .bust.out { filter: grayscale(1) brightness(.6); }
.seat .hole { min-height: 34px; }
.seat .hole .backs, .seat .hole .face { display: flex; gap: 3px; justify-content: center; }
.middle { align-self: center; text-align: center; }
.board { display: flex; gap: 4px; justify-content: center; min-height: 74px; }
.potline { display: inline-block; margin-top: 10px; background: var(--ink); padding: 1px 10px 3px; font: 20px/20px "Jersey 10", monospace; color: var(--dim); }
.potline b { color: var(--gold); font-weight: 400; font-size: 30px; line-height: 20px; margin-left: 6px; }
.thought { position: absolute; z-index: 5; bottom: calc(100% + 8px); width: 230px; text-align: left; background: var(--cream); color: var(--ink); padding: 6px 9px 7px; font-size: 15px; line-height: 19px; display: none; }
.thought small { display: block; color: #5b3a9e; font-size: 14px; line-height: 18px; margin-top: 2px; }
.thought small.only { margin-top: 0; }
.seat.l .thought { left: 0; } .seat.r .thought { right: 0; }
body.minds .thought { display: block; }
.thought, .bubble, .note { box-shadow: 0 calc(-1 * var(--p)) 0 0 var(--ink), 0 var(--p) 0 0 var(--ink), calc(-1 * var(--p)) 0 0 0 var(--ink), var(--p) 0 0 0 var(--ink); }
.cardsvg { display: block; background: var(--paper); --edge: #33364d; border-radius: 0; }
.cardsvg.back { background: #b8292f; }
body:not(.cards) .seat .hole .face { display: none; } body.cards .seat .hole .backs { display: none; }
.hole.shown .face { display: block !important; } .hole.shown .backs { display: none !important; }

.you { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: end; margin-top: 16px; }
.you .mine { display: flex; gap: 6px; align-items: flex-end; }
.mystack { font: 24px/24px "Jersey 10", monospace; color: var(--gold); background: var(--ink); padding: 3px 7px 5px; margin-left: 4px; align-self: flex-end; }
.say { position: relative; display: flex; gap: 10px; align-items: flex-end; }
.bubble { background: var(--cream); color: var(--ink); padding: 8px 12px 10px; font-size: 17px; line-height: 24px; flex: 1; min-height: 78px; }
.bubble b { font: 30px/26px "Jersey 10", monospace; margin-right: 8px; }
.bubble span { font: 20px/26px "Jersey 10", monospace; }
.bubble p { margin: 2px 0 0; }
.g0, .g1 { color: #1a7a33; } .g2 { color: #b56a05; } .g3, .g4 { color: #c72424; }
.s-flop em.g0, .s-flop em.g4 { background: var(--cream); padding: 0 6px; }
.buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.buttons .btn { padding-left: 6px; padding-right: 6px; text-align: center; }
.after { margin: 16px 0 0; font-size: 17px; line-height: 24px; min-height: 24px; }
.after a { font-family: "Jersey 10", monospace; font-size: 20px; }
@media (max-width: 760px) {
  /* on a phone the two players sit in the top corners and the board lies across the table below them */
  .spot .felt { padding: 10px 8px 12px; gap: 10px 8px; grid-template-columns: 1fr 1fr; }
  .thought { position: static; width: auto; order: 9; margin-top: 4px; }
  .spot .felt .seat.l { grid-column: 1; grid-row: 1; justify-self: start; }
  .spot .felt .seat.r { grid-column: 2; grid-row: 1; justify-self: end; }
  .spot .felt .middle { grid-column: 1 / -1; grid-row: 2; }
  .board { min-height: 64px; } .board:empty { min-height: 0; }
  .spot .felt .seat { align-self: start; }
  .thought { font-size: 14px; line-height: 18px; }
  .you { grid-template-columns: 1fr; } .you .mine { justify-content: center; order: 2; }
  .bubble { font-size: 16px; line-height: 22px; }
  .buttons { gap: 8px; } .buttons .btn { font-size: 30px; }
}

/* ---- the four kinds of players */
.families { display: grid; gap: 56px; margin-top: 30px; }
/* a family: its name and its two rules, the card of whoever you tapped beside them, and the four regulars in a row below */
.family { display: grid; grid-template-columns: 340px 1fr; gap: 18px 28px; align-items: start; }
.family .lineup { grid-column: 1 / -1; grid-row: 2; }
.family .note { grid-column: 2; grid-row: 1; align-self: stretch; }
.famname { display: inline-block; font: 40px/40px "Jersey 10", monospace; color: var(--ink); background: var(--fc); padding: 2px 14px 6px; margin-bottom: 12px; }
.family p { margin: 0 0 8px; }
.family .beat { color: var(--gold); }
.lineup { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 14px; position: relative; }
.who { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; display: flex; flex-direction: column; align-items: center; gap: 6px; font: inherit; }
.who .name { font-size: 20px; line-height: 20px; }
.who[aria-pressed="true"] .name { color: var(--ink); background: var(--gold); padding: 0 8px 2px; }
.note { background: var(--cream); color: var(--ink); padding: 10px 14px 12px; min-height: 96px; }
.note b { font: 30px/28px "Jersey 10", monospace; display: block; }
.note i { font-style: normal; font: 20px/22px "Jersey 10", monospace; color: #7a5a14; text-transform: uppercase; display: block; margin-top: 2px; }
.note p { margin: 4px 0 0; }
.f-fish { --fc: var(--fish); } .f-bandit { --fc: var(--bandit); } .f-worm { --fc: var(--worm); } .f-shark { --fc: var(--shark); }
@media (max-width: 900px) { .family { grid-template-columns: 1fr; gap: 12px; } .family .lineup { grid-row: 2; } .family .note { grid-column: 1; grid-row: 3; } }

/* ---- two columns of words */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 64px; align-items: start; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; gap: 36px; } }
.sizes { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 14px; }
.sizes li { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; font-size: 17px; line-height: 24px; }
.sizes b { background: var(--amber); color: #fff; font-size: 40px; line-height: 40px; text-align: center; padding: 6px 0 10px; text-shadow: 0 var(--p) 0 rgba(0, 0, 0, .4); }
.gnomesays { display: flex; gap: 12px; align-items: flex-end; margin-top: 16px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; background: var(--ink); color: var(--dim); padding: 4px 14px 8px; user-select: none; }
.switch i { width: 14px; height: 14px; background: var(--panel2); box-shadow: 0 0 0 var(--p) var(--ink) inset; }
.switch.on { color: var(--gold); --edge: var(--gold); } .switch.on i { background: var(--gold); }
.perks { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.perks li { padding-left: 34px; background: url("/img/cap_gold.png") 0 5px / 22px 14px no-repeat; image-rendering: pixelated; }
.xray { background: var(--ink); padding: 16px 18px; --edge: #b79bff; }
.xtitle { font-size: 20px; line-height: 20px; color: var(--fish); margin: 0 0 8px; }
#range { width: 260px; height: 260px; display: block; }
.ev { margin-top: 14px; border-collapse: collapse; width: 100%; font-size: 16px; }
.ev caption { text-align: left; color: var(--dim); font-size: 20px; line-height: 22px; padding-bottom: 4px; }
.ev td { padding: 2px 0; } .ev .num { font: 30px/26px "Jersey 10", monospace; color: var(--gold); text-align: right; padding-right: 14px; width: 90px; }
.ev .bad { color: #ff7a70; } .dim { color: var(--dim); }

/* ---- showdown and the way out */
.reveal { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; margin-top: 12px; }
.reveal p { flex: 1 1 300px; margin: 0; }
.reveal .cards { display: flex; gap: 6px; }
.score { font-size: 30px; line-height: 32px; margin: 26px auto 0; color: var(--red); min-height: 32px; }
.get { margin-top: 56px; padding-top: 34px; border-top: var(--p) dashed var(--ink); }
.signup { display: grid; grid-template-columns: 1fr auto; gap: 14px; max-width: 620px; align-items: stretch; margin-top: 8px; }
.signup label { grid-column: 1 / -1; font: 20px/20px "Jersey 10", monospace; }
.signup input { border: 0; border-radius: 0; background: #fff; color: var(--ink); font: 400 19px/1 "Fredoka", sans-serif; padding: 12px 14px; min-width: 0; }
.formnote { grid-column: 1 / -1; margin: 0; min-height: 26px; font-size: 17px; }
@media (max-width: 600px) { .signup { grid-template-columns: 1fr; } }

footer { background: var(--ink); text-align: center; padding-top: 44px; }
footer img { display: inline-block; vertical-align: -3px; margin-right: 6px; }
.consent { position: fixed; left: 12px; bottom: 12px; z-index: 70; background: var(--cream); color: var(--ink); padding: 12px 14px; max-width: 380px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.consent[hidden] { display: none; }
.consent p { margin: 0; flex: 1 1 100%; font-size: 16px; line-height: 22px; }
.consent .btn { font-size: 20px; line-height: 20px; padding: 6px 14px 8px; }
.noscript { background: var(--gold); color: var(--ink); margin: 0; padding: 10px 20px; text-align: center; }

/* plain pages: privacy, terms */
.doc { background: var(--paper); color: var(--ink); min-height: 100vh; }
.doc main { max-width: 760px; margin: 0 auto; padding: 40px 22px 90px; }
.doc h1 { font-size: 50px; line-height: 50px; } .doc h2 { font-size: 30px; line-height: 32px; margin-top: 34px; }
.doc .home { font: 20px/20px "Jersey 10", monospace; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .pot.bump { animation: none; } }

.ev .best { color: var(--green); }
.ev .head td { color: var(--dim); font-size: 14px; } .ev .head .num { font: 14px/18px "Fredoka", sans-serif; }
