/* Tap To Pump: a cellar card table under a brass lamp. Two faces: Alegreya SC (display), Alegreya Sans (text). */
@font-face { font-family: "Alegreya SC"; font-weight: 800; font-display: swap; src: url(/fonts/alegreya-sc-800.woff2) format("woff2"); }
@font-face { font-family: "Alegreya SC"; font-weight: 900; font-display: swap; src: url(/fonts/alegreya-sc-900.woff2) format("woff2"); }
@font-face { font-family: "Alegreya Sans"; font-weight: 400; font-display: swap; src: url(/fonts/alegreya-sans-400.woff2) format("woff2"); }
@font-face { font-family: "Alegreya Sans"; font-weight: 500; font-display: swap; src: url(/fonts/alegreya-sans-500.woff2) format("woff2"); }
@font-face { font-family: "Alegreya Sans"; font-weight: 700; font-display: swap; src: url(/fonts/alegreya-sans-700.woff2) format("woff2"); }
@font-face { font-family: "Alegreya Sans"; font-weight: 800; font-display: swap; src: url(/fonts/alegreya-sans-800.woff2) format("woff2"); }
@font-face { font-family: "JB Mono"; font-weight: 500; font-display: swap; src: url(/fonts/jbmono-500.woff2) format("woff2"); }

:root {
  --felt: #0F5257; --felt-dark: #0A2E2C; --felt-deep: #071F1E;
  --cream: #F5EBD7; --gold: #D4A72C; --gold-hi: #E9C24E; --rust: #A23B2A; --wood: #5A3A22; --wood-dark: #3A2414; --ink: #141414;
  --muted: #CFC3A8;
  --display: "Alegreya SC", Georgia, serif;
  --text: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "JB Mono", ui-monospace, Consolas, monospace;
  --edge: 64px; --wrap: 1600px;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--felt-deep); color: var(--cream);
  font: 500 19px/1.5 var(--text); font-variant-numeric: tabular-nums lining-nums;
  min-height: 100vh; overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
b, strong { font-weight: 800; color: var(--gold-hi); }
code, .mono { font-family: var(--mono); font-weight: 500; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--cream); color: var(--ink); padding: 8px 16px; }

/* ---------- nav: one row of cream words ---------- */
.nav {
  position: absolute; z-index: 20; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 32px;
  padding: 24px var(--edge) 0; max-width: calc(var(--wrap) + 2 * var(--edge)); margin: 0 auto;
}
.nav a { position: relative; font: 800 21px/1 var(--display); text-decoration: none; color: var(--cream); padding: 8px 0; letter-spacing: .01em; }
.nav a:not(.nav-mark)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: transparent; }
.nav a.is-on::after { background: var(--gold); }
.nav a:hover { color: var(--gold-hi); }
.nav a.is-on { color: var(--gold-hi); }
.nav-mark { padding: 0 !important; border: 0 !important; margin-right: -8px; flex: none; }
.nav-mark img { width: 40px; height: 40px; border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.5); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 30px;
  font: 800 23px/1 var(--display); letter-spacing: .01em; text-decoration: none; cursor: pointer;
  border-radius: 10px; border: 2px solid transparent; transition: transform .16s var(--ease), background-color .16s, box-shadow .16s;
  padding-top: 2px;
}
.btn:active { transform: translateY(2px) scale(.98); }
.btn-gold { background: linear-gradient(#E3B83C, #C99A1F); color: var(--ink); border-color: #F2D27A; box-shadow: 0 4px 0 #8A6512, 0 10px 24px rgba(0,0,0,.45); }
.btn-gold:hover { background: linear-gradient(#ECC650, #D4A72C); }
.btn-gold:disabled { background: #6E6A5C; border-color: #8A8676; color: #2A2A2A; box-shadow: none; cursor: not-allowed; }
.btn-line { background: rgba(7, 31, 30, .35); color: var(--cream); border-color: var(--cream); }
.btn-line:hover { background: rgba(245, 235, 215, .12); }

/* ---------- paper: the one panel style ---------- */
.paper {
  background: var(--cream); color: var(--ink); border-radius: 12px; position: relative;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45), inset 0 0 0 2px var(--cream), inset 0 0 0 4px rgba(212, 167, 44, .9);
}
.paper b { color: var(--rust); }

/* ---------- section heads ---------- */
.sec-head { margin: 0 0 var(--s4); }
.sec-head h2 { font: 900 56px/1.02 var(--display); margin: 0 0 8px; color: var(--cream); text-shadow: 0 3px 0 var(--rust); }
.sec-head p { margin: 0; color: var(--muted); max-width: 760px; }

/* =================== HOME =================== */
.hero { position: relative; height: 100vh; min-height: 700px; max-height: 1180px; overflow: hidden; background: var(--felt-deep); }
.hero-stage { position: absolute; left: 0; top: 0; width: 1672px; height: 941px; transform-origin: 0 0; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; }
.hero-stage { z-index: 3; }
.hero::after { z-index: 1; content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(7,31,30,.55) 0%, rgba(7,31,30,.2) 34%, rgba(7,31,30,0) 48%); }
.hero-copy {
  position: absolute; z-index: 5; left: max(var(--edge), calc((100vw - var(--wrap)) / 2)); top: 0; bottom: 0;
  width: min(560px, 42vw); display: flex; flex-direction: column; justify-content: center; padding-top: 72px;
}
.name {
  font: 900 clamp(96px, 9.7vw, 150px)/.86 var(--display); margin: 0 0 24px; color: var(--cream); letter-spacing: -.01em;
  text-shadow: 3px 3px 0 var(--rust), 6px 6px 0 var(--rust), 9px 9px 0 #7E2A1D, 12px 14px 22px rgba(0,0,0,.55);
}
.headline { font: 900 clamp(26px, 2.5vw, 38px)/1.12 var(--display); color: var(--gold-hi); margin: 0 0 16px; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.headline span { white-space: nowrap; }
.lede { margin: 0 0 28px; max-width: 30em; text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }

/* the wooden contract plaque */
.plaque {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0 16px;
  background: linear-gradient(#6B4529, #4E301B); border: 2px solid #B58A3A; border-radius: 10px;
  padding: 12px 12px 12px 20px; box-shadow: inset 0 0 0 2px #2B1A0D, 0 10px 24px rgba(0,0,0,.5); max-width: 560px;
}
.plaque-label { font: 700 16px/1.2 var(--text); color: var(--gold-hi); white-space: nowrap; }
.plaque-ca { font-size: 16px; color: var(--cream); overflow-wrap: anywhere; line-height: 1.35; user-select: all; }
.plaque.is-empty .plaque-ca { font-family: var(--text); font-weight: 700; color: var(--muted); user-select: none; }
.plaque-copy {
  min-height: 48px; padding: 0 22px; border-radius: 8px; cursor: pointer;
  background: var(--cream); color: var(--ink); border: 2px solid var(--gold); font: 800 18px/1 var(--text);
}
.plaque-copy:disabled { background: #8B7A62; color: #3A2E22; border-color: #8B7A62; cursor: not-allowed; }

/* ---------- the card: the generated frame, the coin's picture in its window, numbers on its chips ---------- */
.card { --w: 140px; position: relative; width: var(--w); aspect-ratio: 520 / 765; flex: none; user-select: none; }
.card .pic { position: absolute; left: 10.6%; top: 20.6%; width: 78.6%; height: 40.4%; object-fit: cover; border-radius: 7% / 11%; background: #1d3b38; }
.card .frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.card .nm {
  position: absolute; left: max(12%, 18px); right: max(12%, 18px); top: 6.5%; height: 11%; display: flex; align-items: center; justify-content: center;
  font: 900 max(16px, calc(var(--w) * .118))/1 var(--display); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card .nm span { display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .tr {
  position: absolute; left: max(12%, 16px); right: max(12%, 16px); top: 62.4%; height: 11%; display: flex; align-items: center; justify-content: center; gap: 4px;
  font: 800 16px/1 var(--text); color: var(--rust); white-space: nowrap; overflow: hidden;
}
.card .n {
  position: absolute; top: 82.6%; width: 19%; aspect-ratio: 1; transform: translate(-50%, -50%);
  display: grid; place-items: center; padding-top: .06em;
  font: 900 max(16px, calc(var(--w) * .15))/1 var(--display); color: var(--cream); text-shadow: 0 1px 0 rgba(0,0,0,.6), 0 0 6px rgba(0,0,0,.35);
}
.card .n.c { left: 21.4%; color: var(--ink); text-shadow: 0 1px 0 rgba(255,240,200,.5); }
.card .n.p { left: 50%; }
.card .n.h { left: 78%; }
.card .n.hurt { color: #FFD7C9; }
.card.sm .nm, .card.sm .tr, .card.sm .n { display: none; }
.card .pills { display: none; }
.card.sm .pills { display: flex; position: absolute; left: 6%; right: 6%; bottom: 5%; gap: 6%; justify-content: center; }
.pill { flex: 1; min-width: 0; display: grid; place-items: center; height: 26px; border-radius: 13px; font: 900 18px/1 var(--display); color: var(--cream); border: 2px solid var(--cream); }
.pill.p { background: var(--rust); }
.pill.h { background: var(--felt); }
.pill.h.hurt { background: #7A2D20; }
.card.back { background: url(/img/card-back.webp) center/100% 100% no-repeat; }

/* ---------- the fan on the felt ---------- */
.fan { position: absolute; left: 46%; top: 15%; width: 37%; height: 46%; }
.fan .card { --w: 167px; position: absolute; left: 50%; top: 0; transform-origin: 50% 50%; transition: transform .26s var(--ease); cursor: pointer; filter: drop-shadow(0 14px 14px rgba(0,0,0,.55)); }
.fan .card:hover, .fan .card:focus-visible { z-index: 6; }
.fan a.card { text-decoration: none; color: inherit; }

.pot { position: absolute; left: 83.5%; top: 15%; width: 15%; height: 50%; }
.pot-chips { position: absolute; left: 27%; top: 0; width: 40%; filter: drop-shadow(0 18px 14px rgba(0,0,0,.6)); }
.pot-plaque { position: absolute; left: -2%; top: 64%; width: 104%; padding: 14px 18px 16px; text-align: center; }
.pot-label { margin: 0; font: 800 18px/1.2 var(--display); color: var(--rust); }
.pot-amount { margin: 2px 0 2px; font: 900 44px/1.05 var(--display); color: #8A6512; }
.pot-amount #pot-unit { font-size: 24px; }
.pot-line { margin: 0; font: 600 16px/1.25 var(--text); color: var(--ink); }
.pot-line b { color: var(--rust); }
.chip-fall { position: absolute; width: 40%; left: 26%; top: -30%; opacity: 0; pointer-events: none; }
.chip-fall.go { animation: chipfall .7s cubic-bezier(.4, 0, .9, .4) forwards; }
@keyframes chipfall { 0% { opacity: 1; transform: translateY(-120px) rotate(-30deg); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(60px) rotate(10deg); } }

.linkcards { position: absolute; left: 56%; top: 66%; width: 40%; height: 30%; display: flex; gap: 2.2%; align-items: flex-start; }
.linkcard {
  position: relative; width: 22%; aspect-ratio: 520 / 788; background: url(/img/card-back.webp) center/100% 100% no-repeat;
  filter: drop-shadow(0 10px 10px rgba(0,0,0,.55)); text-decoration: none; color: var(--ink); cursor: pointer; border: 0; padding: 0;
  transition: transform .18s var(--ease);
}
.linkcard:nth-child(odd) { transform: rotate(-4deg); }
.linkcard:nth-child(even) { transform: rotate(3deg) translateY(6px); }
.linkcard:hover { transform: translateY(-10px) rotate(0); }
.linkcard .tab {
  position: absolute; left: 50%; bottom: 10%; transform: translateX(-50%); padding: 8px 22px 7px; border-radius: 7px;
  background: var(--cream); border: 2px solid var(--gold); display: flex; align-items: center; justify-content: center; gap: 6px;
  font: 800 16px/1 var(--text); white-space: nowrap; box-shadow: 0 3px 6px rgba(0,0,0,.4);
}
.linkcard .lc-mark { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); width: 54%; aspect-ratio: 1; border-radius: 50%; background: var(--cream); border: 3px solid var(--gold); display: grid; place-items: center; box-shadow: 0 3px 6px rgba(0,0,0,.35); }
.linkcard .lc-mark img { width: 58%; height: 58%; object-fit: contain; }
.linkcard .lc-ca { font: 900 20px/1 var(--display); color: var(--ink); padding-top: 2px; }
.linkcard[aria-disabled="true"] { cursor: not-allowed; }
.linkcard[aria-disabled="true"] .tab { background: #CDBFA2; border-color: #9C8A62; color: #4A3F2E; }

/* ---------- below the hero ---------- */
.below { position: relative; padding: var(--s7) var(--edge); max-width: calc(var(--wrap) + 2 * var(--edge)); margin: 0 auto; }
.steps { list-style: none; margin: 0 0 var(--s6); padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step { background: var(--cream); color: var(--ink); border-radius: 12px; overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,.45); display: flex; flex-direction: column; }
.step img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.step h3 { font: 900 24px/1.1 var(--display); margin: 20px 24px 8px; color: var(--ink); }
.step p { margin: 0 24px 24px; font-size: 17px; }
.step b { color: var(--rust); }
.split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.split-row { position: relative; display: flex; align-items: baseline; gap: 16px; padding-top: 18px; }
.split-row::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: rgba(212,167,44,.6); }
.split-n { font: 900 64px/1 var(--display); color: var(--gold-hi); }

/* =================== inner pages =================== */
.felt-page {
  position: relative; min-height: 100vh; padding: 112px var(--edge) var(--s7);
  max-width: calc(var(--wrap) + 2 * var(--edge)); margin: 0 auto;
}
body:not([data-view="home"]) { background: radial-gradient(ellipse 70% 60% at 55% 30%, #1A6A62 0%, #0F5257 28%, #0A2E2C 70%, #071F1E 100%) var(--felt-deep) no-repeat; background-size: 100% 100vh; }

/* ---------- lobby ---------- */
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.level { text-align: left; padding: 32px; display: flex; flex-direction: column; gap: 12px; border: 0; cursor: pointer; font: inherit; color: var(--ink); min-height: 300px; }
button.level:hover { transform: translateY(-4px); }
button.level { transition: transform .18s var(--ease); }
.level-name { font: 900 40px/1 var(--display); color: var(--ink); }
.level-what { flex: 1; }
.level-go { position: relative; align-self: flex-start; font: 800 21px/1.2 var(--display); color: var(--rust); }
.level-go::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--rust); }
.level-hard { cursor: default; background: #F7E7B8; }
.level-hard .btn { width: 100%; white-space: nowrap; }
.level-hard .btn-line { color: var(--ink); border-color: var(--ink); background: transparent; }
.level-note { margin: 0; font-size: 17px; color: var(--rust); min-height: 1.4em; }
.lobby-resume { margin-top: 24px; }

/* ---------- draft ---------- */
.commit { display: inline-block; margin-left: 8px; }
.commit code { font-size: 16px; color: var(--cream); overflow-wrap: anywhere; }
.offer { display: flex; justify-content: center; gap: 48px; margin: 16px 0 40px; min-height: 380px; }
.offer .card { --w: 240px; cursor: pointer; transition: transform .2s var(--ease); filter: drop-shadow(0 16px 16px rgba(0,0,0,.5)); }
.offer .card:hover, .offer .card:focus-visible { transform: translateY(-14px); }
.offer button.card { border: 0; padding: 0; background: none; }
.offer .card.deal { animation: deal .32s var(--ease) both; }
@keyframes deal { from { opacity: 0; transform: translateY(40px) rotate(-6deg); } }
.offer .card.picked { animation: pickfly .3s ease-in forwards; }
@keyframes pickfly { to { opacity: 0; transform: translateY(160px) scale(.5); } }
.deckline { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.deckline .mini { display: flex; align-items: center; gap: 8px; background: rgba(245,235,215,.1); border: 1px solid rgba(245,235,215,.25); border-radius: 8px; padding: 6px 12px 6px 6px; font: 700 16px/1 var(--text); }
.deckline .mini img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.deckline .mini i { font-style: normal; color: var(--gold-hi); }

/* ---------- the game ---------- */
.view-play .felt-page { max-width: 1600px; padding-top: 96px; }
.game { display: grid; grid-template-columns: 220px minmax(0, 1fr) 300px; gap: 24px; align-items: start; position: relative; }
.side { display: flex; flex-direction: column; gap: 12px; }
.who { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.who-name { font: 900 28px/1 var(--display); }
.who-level { font: 700 16px/1 var(--text); color: var(--muted); }
.liq { display: flex; align-items: baseline; gap: 10px; }
.liq-n { font: 900 72px/.9 var(--display); color: var(--gold-hi); text-shadow: 0 3px 0 var(--rust); transition: color .2s; }
.liq-n.hit { color: #FF9A80; }
.liq-l { font: 700 16px/1 var(--text); color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 17px; color: var(--muted); }
.meta b { color: var(--cream); }
.backs { display: flex; margin-top: 4px; min-height: 76px; }
.backs .card { --w: 52px; margin-right: -30px; filter: drop-shadow(0 4px 4px rgba(0,0,0,.5)); }
.backs.think .card { animation: think 1s ease-in-out infinite; }
.backs.think .card:nth-child(2n) { animation-delay: .25s; }
@keyframes think { 50% { transform: translateY(-6px); } }

.board { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.table-stage { position: relative; width: 100%; max-width: calc((100vh - 330px) * 1.777); margin: 0 auto; min-width: min(100%, 560px); aspect-ratio: 1672 / 941; border-radius: 14px; overflow: hidden; box-shadow: 0 18px 40px rgba(0,0,0,.55); }
.table-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.slots { position: absolute; inset: 0; }
.slot { position: absolute; width: 12.6%; height: 33.3%; border-radius: 8%/5.5%; border: 0; padding: 0; background: transparent; display: grid; place-items: center; }
.slot.can { background: rgba(233, 194, 78, .18); box-shadow: 0 0 0 3px var(--gold-hi), 0 0 18px rgba(233,194,78,.7); cursor: pointer; }
.slot .card { --w: 100%; width: 100%; transition: transform .24s var(--ease), opacity .3s; }
.slot .card.tapped { transform: rotate(90deg) scale(.66); }
.slot .card { border-radius: 9% / 6%; }
.slot .card.ready { cursor: pointer; box-shadow: 0 0 0 3px var(--gold-hi), 0 0 16px rgba(233,194,78,.85); }
.slot .card.sick { filter: saturate(.7) brightness(.85); }
.slot .card.enter { animation: enter .26s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(40px) scale(.9); } }
.slot .card.shake { animation: shake .3s ease-out; }
@keyframes shake { 30% { transform: translateY(-10px); } 60% { transform: translateY(4px); } }
.slot .card.gone { opacity: 0; transform: translateY(30px) rotate(12deg); }
.float { position: absolute; z-index: 8; font: 900 34px/1 var(--display); color: #FF8C6E; text-shadow: 0 2px 0 #3B0F07, 0 0 10px rgba(0,0,0,.6); pointer-events: none; animation: floatup .9s ease-out forwards; }
@keyframes floatup { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -48px); } }
.thinking { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; background: rgba(7,31,30,.85); color: var(--cream); padding: 10px 20px; border-radius: 10px; font: 800 18px/1 var(--text); border: 1px solid var(--gold); }

.hand { display: flex; justify-content: center; gap: 12px; min-height: 196px; flex-wrap: nowrap; padding: 0 8px; }
.hand .card { --w: 128px; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 9% / 6%; transition: transform .18s var(--ease); box-shadow: 0 8px 14px rgba(0,0,0,.45); }
.hand .card.cant { filter: saturate(.45) brightness(.7); cursor: default; }
.hand .card.sel { transform: translateY(-18px); box-shadow: 0 0 0 4px var(--gold-hi), 0 0 22px rgba(233,194,78,.8); }
.hand .card:not(.cant):hover { transform: translateY(-10px); }
.hand .card.enter { animation: enter .26s var(--ease) both; }

.btn-end { width: 100%; }
.hint { margin: 0; font-size: 17px; color: var(--muted); min-height: 3em; }
.log { list-style: none; margin: 0; padding: 18px 20px; max-height: 340px; overflow-y: auto; font-size: 17px; line-height: 1.35; }
.log li { padding: 4px 0; border-bottom: 1px solid rgba(20,20,20,.12); }
.log li:last-child { border-bottom: 0; }
.log li.h { color: #6B2618; }
.log li.t { font-weight: 800; color: var(--ink); }

.over { position: absolute; z-index: 30; left: 50%; top: 40px; transform: translateX(-50%); width: min(560px, 92vw); padding: 32px 32px 28px; text-align: center; }
.over-title { font: 900 56px/1 var(--display); margin: 0 0 8px; color: var(--ink); }
.over-line { margin: 0 0 16px; }
.over-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; text-align: left; margin: 0 0 20px; font-size: 16px; }
.over-facts dt { font-weight: 800; }
.over-facts dd { margin: 0; overflow-wrap: anywhere; }
.over-facts code { font-size: 16px; }
.over-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.over .btn-line { color: var(--ink); border-color: var(--ink); background: transparent; }
.over-note { margin: 16px 0 0; font-size: 17px; color: var(--rust); }

/* ---------- the pool ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.chip-btn { min-height: 48px; padding: 0 24px; border-radius: 24px; border: 2px solid var(--cream); background: transparent; cursor: pointer; font: 800 18px/1 var(--text); }
.chip-btn.is-on { background: var(--cream); color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 28px 24px; }
.grid .card { --w: 100%; width: 100%; text-decoration: none; color: inherit; border-radius: 9% / 6%; box-shadow: 0 10px 16px rgba(0,0,0,.4); transition: transform .18s var(--ease); }
.grid .card:hover { transform: translateY(-6px); }

/* ---------- one card ---------- */
.cardpage { display: grid; grid-template-columns: 380px 1fr; gap: 56px; align-items: start; }
.cardpage .card { --w: 380px; filter: drop-shadow(0 18px 18px rgba(0,0,0,.5)); }
.cardpage h2 { font: 900 64px/1 var(--display); margin: 0 0 8px; text-shadow: 0 3px 0 var(--rust); overflow-wrap: anywhere; }
.cardpage .sub { margin: 0 0 24px; color: var(--muted); }
.facts { width: 100%; border-collapse: collapse; margin: 0 0 24px; }
.facts th, .facts td { text-align: left; padding: 12px 20px; border-bottom: 1px solid rgba(245,235,215,.2); vertical-align: top; font-size: 18px; }
.facts th { font-weight: 800; color: var(--gold-hi); width: 24%; }
.facts td.v { font-weight: 800; }
.facts td.r { color: var(--muted); }
.cardpage .links { display: flex; gap: 12px; flex-wrap: wrap; }
.cardpage .mintline { font-size: 16px; color: var(--muted); overflow-wrap: anywhere; margin: 0 0 20px; }

/* ---------- winners ---------- */
.winners { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.win { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 32px; align-items: center; padding: 24px 32px; }
.win-no { font: 900 34px/1 var(--display); color: var(--ink); }
.win-tag { display: inline-block; font: 800 16px/1 var(--text); padding: 8px 16px; border-radius: 6px; background: var(--rust); color: var(--cream); margin-right: 8px; }
.win-tag.paid { background: var(--felt); }
.win-who { font-size: 17px; }
.win-who code { font-size: 16px; overflow-wrap: anywhere; }
.win .btn { min-height: 48px; font-size: 20px; }
.win .btn-line { color: var(--ink); border-color: var(--ink); background: transparent; }
.empty { color: var(--muted); }
.replay { padding: 28px; }
.replay h3 { font: 900 34px/1.1 var(--display); margin: 0 0 8px; color: var(--ink); }
.replay .rp-line { margin: 0 0 16px; font-size: 17px; overflow-wrap: anywhere; }
.replay .rp-line code { font-size: 16px; }
.rp-board { background: url(/img/table.webp) center/cover; border-radius: 12px; position: relative; aspect-ratio: 1672 / 941; margin-bottom: 16px; }
.rp-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 12px; }
.rp-controls .btn { min-height: 48px; font-size: 20px; }
.rp-controls .btn-line { color: var(--ink); border-color: var(--ink); background: transparent; }
.rp-step { font: 800 18px/1.2 var(--text); }
.rp-liq { display: flex; justify-content: space-between; font: 800 18px/1 var(--text); margin-bottom: 8px; }
.rp-ok { color: var(--felt); font-weight: 800; }
.rp-bad { color: var(--rust); font-weight: 800; }

/* ---------- docs ---------- */
.docs > * { max-width: 980px; }
.docs h2 { font: 900 56px/1.02 var(--display); margin: 0 0 16px; text-shadow: 0 3px 0 var(--rust); }
.docs h3 { font: 900 34px/1.1 var(--display); margin: 56px 0 12px; color: var(--gold-hi); }
.docs p, .docs li { max-width: 46em; }
.docs table { border-collapse: collapse; width: 100%; margin: 8px 0 16px; }
.docs th, .docs td { text-align: left; padding: 10px 20px; border-bottom: 1px solid rgba(245,235,215,.2); font-size: 18px; }
.docs th { color: var(--gold-hi); font-weight: 800; }
.docs code { font-size: 16px; overflow-wrap: anywhere; }
.scheme { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 16px 0; padding: 0; list-style: none; counter-reset: s; }
.scheme li { background: var(--cream); color: var(--ink); border-radius: 12px; padding: 20px; font-size: 17px; position: relative; }
.scheme li b { color: var(--rust); }
.scheme li::before { counter-increment: s; content: counter(s); display: block; font: 900 44px/1 var(--display); color: var(--rust); margin-bottom: 8px; }

.toast { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: var(--cream); color: var(--ink); padding: 12px 24px; border-radius: 10px; font: 800 18px/1.2 var(--text); box-shadow: 0 10px 30px rgba(0,0,0,.5); transition: transform .22s var(--ease), opacity .22s, visibility .22s; max-width: 92vw; opacity: 0; visibility: hidden; }
.toast.on { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* =================== narrower screens =================== */
@media (max-width: 1280px) {
  .game { grid-template-columns: 190px 1fr 260px; gap: 16px; }
  .hand .card { --w: 112px; }
}
@media (max-width: 1100px) {
  :root { --edge: 40px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .game { grid-template-columns: 1fr; }
  .side-house { order: 1; display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 8px 24px; }
  .side-house .backs { display: none; }
  .board { order: 2; }
  .side-you { order: 3; display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 12px 24px; }
  .side-you .btn-end, .side-you .hint, .side-you .log { grid-column: 1 / -1; }
  .liq-n { font-size: 56px; }
  .cardpage { grid-template-columns: 1fr; }
  .levels { grid-template-columns: 1fr; }
  .level { min-height: 0; }
}
@media (max-width: 760px) {
  :root { --edge: 24px; }
  body { font-size: 18px; }
  .nav { gap: 18px; padding-top: 16px; }
  .nav a { font-size: 20px; }
  .nav-mark img { width: 36px; height: 36px; }
  .hero { height: auto; min-height: 0; max-height: none; display: flex; flex-direction: column; padding: 84px 32px 32px; }
  .hero::after { background: linear-gradient(180deg, rgba(7,31,30,.65) 0%, rgba(7,31,30,.15) 46%, rgba(7,31,30,.5) 100%); }
  .hero-stage { position: static; width: auto !important; height: auto !important; transform: none !important; display: contents; }
  .hero-bg { object-position: 50% 70%; }
  .hero-copy { display: contents; }
  .name { order: 1; position: relative; z-index: 2; font-size: 60px; margin-bottom: 18px; text-shadow: 2px 2px 0 var(--rust), 4px 4px 0 var(--rust), 6px 6px 0 #7E2A1D, 8px 10px 16px rgba(0,0,0,.55); }
  .headline { order: 2; position: relative; z-index: 2; font-size: 26px; }
  .headline span { white-space: normal; }
  .lede { order: 3; position: relative; z-index: 2; font-size: 18px; margin-bottom: 20px; }
  .actions { order: 4; position: relative; z-index: 2; }
  .actions { flex-direction: column; gap: 12px; }
  .actions .btn { width: 100%; }
  .fan { order: 5; position: relative; z-index: 2; left: auto; top: auto; width: 100%; height: 210px; margin: 24px 0 8px; }
  .fan .card { --w: 104px; }
  .pot { order: 6; position: relative; z-index: 2; left: auto; top: auto; width: 100%; height: auto; display: flex; align-items: flex-end; gap: 16px; margin-bottom: 16px; }
  .pot-chips { position: static; width: 64px; flex: none; }
  .pot-plaque { position: static; width: auto; flex: 1; text-align: left; padding: 16px 32px; }
  .pot-amount { font-size: 38px; }
  .linkcards { order: 7; position: relative; z-index: 2; left: auto; top: auto; width: 100%; height: auto; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
  .linkcard { width: 23%; }
  .linkcard .tab { display: none; }
  .linkcard .lc-mark { top: 50%; width: 74%; }
  .linkcard .lc-ca { font-size: 16px; width: 98%; }
  .plaque { order: 8; position: relative; z-index: 2; grid-template-columns: 1fr auto; }
  .plaque-label { grid-column: 1 / -1; margin-bottom: 6px; }
  .below { padding: var(--s6) var(--edge); }
  .steps, .split { grid-template-columns: 1fr; }
  .sec-head h2, .docs h2 { font-size: 44px; }
  .felt-page { padding-top: 88px; }
  .offer { gap: 10px; min-height: 0; }
  .offer .card { --w: calc((100vw - 2 * var(--edge) - 20px) / 3); }
  .offer .card .tr { font-size: 16px; }
  .game { gap: 12px; }
  /* the stitched slots span 78% of the table photo: the photo is widened so the slots fill the phone, rims off screen */
  .board { overflow: hidden; margin: 0 calc(-1 * var(--edge)); }
  .table-stage { width: calc((100vw - 16px) / .78); max-width: none; min-width: 0; margin-left: calc((100vw - (100vw - 16px) / .78) / 2); border-radius: 0; box-shadow: none; }
  .hand { margin: 0 var(--edge); }
  .over-facts { grid-template-columns: 1fr; }
  .over-facts dd { margin-bottom: 8px; }
  .replay h3 { font-size: 26px; }
  .hand { justify-content: flex-start; overflow-x: auto; min-height: 150px; padding-bottom: 8px; gap: 8px; }
  .hand .card { --w: 118px; }
  .hand .card .more, .offer .card .more { display: none; }
  .liq-n { font-size: 48px; }
  .who-name { font-size: 24px; }
  .side-house, .side-you { grid-template-columns: auto 1fr; }
  .side-house .meta, .side-you .meta { grid-column: 1 / -1; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; }
  .cardpage .card { --w: min(340px, 100%); margin: 0 auto; }
  .cardpage h2 { font-size: 48px; }
  .win { grid-template-columns: 1fr; }
  .scheme { grid-template-columns: 1fr 1fr; }
  .facts th { width: 34%; }
  .over { top: 12px; padding: 24px 20px; }
  .over-title { font-size: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* inner pages: the same cellar, dimmed behind the felt (a fixed layer, composited, never repainted on scroll) */
body:not([data-view="home"])::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(7,31,30,.55) 0%, rgba(7,31,30,.82) 45%, rgba(7,31,30,.94) 100%), url(/img/hero-wide.webp) 62% 40% / cover no-repeat;
}
body:not([data-view="home"]) { background: var(--felt-deep); }
@media (max-width: 760px) {
  body:not([data-view="home"])::before { background: linear-gradient(180deg, rgba(7,31,30,.6) 0%, rgba(7,31,30,.9) 50%), url(/img/hero-tall.webp) 50% 30% / cover no-repeat; }
}

@media (max-width: 360px) {
  .grid { grid-template-columns: minmax(0, 220px); justify-content: center; }
}
