/* Apes: a botanical field journal. Cream journal paper, ink drawings with a green wash, a canopy that hangs over the
   lobby with specimen tags on vines (each tag carries a coin of the next cup's list). The cup clock is the journal's
   cloth cover with a banana-yellow elastic band and a paper label for the time. Standings are specimen labels; each
   bar is a vine that ends in a berry of the entrant's colour, the red-headed pin marks the 1 SOL start.
   Libre Baskerville for headings and figures, Lato for everything else. */
@font-face { font-family: 'Libre Baskerville'; font-style: normal; font-weight: 400 700; src: url(/fonts/libre-baskerville-400.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Libre Baskerville'; font-style: italic; font-weight: 400; src: url(/fonts/libre-baskerville-italic-400.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Lato'; font-weight: 400; src: url(/fonts/lato-400.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Lato'; font-weight: 700; src: url(/fonts/lato-700.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Lato'; font-weight: 900; src: url(/fonts/lato-900.woff2) format('woff2'); font-display: swap; }

:root {
  --page: #ece3c8; --paper: #fbf6e7; --paper-hi: #fffcf2; --label: #fffaf0;
  --ink: #2b2418; --ink-soft: #5d5340; --muted: #6e6450; --rule: #ddd2b4; --hair: rgba(43, 36, 24, .16);
  --canopy: #0f4a39; --canopy-hi: #17604a; --canopy-lo: #0a3429; --cream: #f6efd8; --cream-dim: #bfcbb8;
  --leaf: #4f8f47; --leaf-hi: #7fb05e; --leaf-lo: #2f6a3a; --vine: #3c6e32;
  --banana: #f5cd2f; --banana-hi: #fbe27a; --banana-lo: #b98a0c; --banana-ink: #8a6400;
  --pin: #b8442c;
  --up: #2e7d3e; --down: #b23a22;
  --display: 'Libre Baskerville', 'Baskerville', Georgia, serif;
  --text: 'Lato', ui-sans-serif, system-ui, sans-serif;
  --cloth: repeating-linear-gradient(45deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, .06) 0 1px, transparent 1px 4px), linear-gradient(180deg, var(--canopy-hi), var(--canopy) 60%, #0d4334);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); font: 400 16px/1.55 var(--text); font-variant-numeric: tabular-nums lining-nums; min-height: 100vh;
  background: radial-gradient(ellipse 120% 60% at 50% 0, #f3ebd3 0, transparent 70%), radial-gradient(ellipse 80% 50% at 0 100%, rgba(180, 160, 110, .14), transparent 70%), var(--page); }
a { color: inherit; }
img { max-width: 100%; }
.ico { width: 1em; height: 1em; vertical-align: -0.12em; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.up { color: var(--up); } .down { color: var(--down); }
code { font: 700 0.86em/1 var(--text); background: #f1e9d1; padding: 2px 5px; border-radius: 3px; overflow-wrap: anywhere; }
h1, h2, h3 { margin: 0; font-weight: 700; }
[hidden] { display: none !important; }

/* ---------- header: canopy cloth with a fringe of hanging leaves ---------- */
.top { background: var(--cloth); position: sticky; top: 0; z-index: 20; }
.top::after { content: ''; position: absolute; left: 0; right: 0; bottom: -13px; height: 14px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='14' viewBox='0 0 96 14'%3E%3Cpath d='M0 0h96v2H0z' fill='%230d4334'/%3E%3Cpath d='M6 1c3 5 2 10 5 12 2-3 1-8-2-12zM24 1c-2 4 0 8 3 9 1-3-1-6-3-9zM40 1c3 6 1 11 4 13 3-3 1-9-3-13zM58 1c-2 3-1 7 2 8 1-3 0-5-2-8zM74 1c3 5 2 9 5 11 2-3 0-7-3-11zM88 1c-2 3 0 6 2 7 1-2 0-5-2-7z' fill='%230f4a39' stroke='%23082b22' stroke-width='.6'/%3E%3C/svg%3E") repeat-x 0 0 / 96px 14px; }
.top-in { max-width: 1240px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 22px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cream); font: 700 29px/1 var(--display); letter-spacing: -.01em; }
.logo-mark { width: 48px; height: 48px; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .3)); }
.nav { display: flex; gap: 4px; margin-left: 8px; flex: 1; }
.nav a { color: var(--cream); text-decoration: none; font-weight: 700; font-size: 15px; padding: 8px 13px; border-radius: 6px; }
.nav a:hover { background: rgba(246, 239, 216, .1); }
.nav a.on { background: var(--cream); color: var(--canopy); }
.x-link { color: var(--cream); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 6px; font-size: 18px; }
.x-link:hover { background: rgba(246, 239, 216, .12); }
.mode-strip { background: #e3dbc0; color: var(--canopy); font-size: 13.5px; text-align: center; padding: 7px 16px; border-bottom: 1px solid var(--rule); }
.ca-strip { background: var(--paper-hi); border-bottom: 2px solid var(--banana); display: flex; gap: 12px; align-items: center; justify-content: center; padding: 18px 16px 8px; flex-wrap: wrap; }
.ca-strip span { overflow-wrap: anywhere; font-size: 14px; }

/* ---------- buttons ---------- */
.btn { --bg: var(--paper-hi); --fg: var(--ink); --lo: #c9bd9b; --ring: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--bg); color: var(--fg); font: 900 16px/1.15 var(--text); padding: 13px 22px; border-radius: 8px;
  box-shadow: inset 0 0 0 1.5px var(--ring), 0 3px 0 var(--lo), 0 8px 16px rgba(43, 36, 24, .12);
  transition: transform .08s, box-shadow .08s, filter .15s; }
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 0 0 1.5px var(--ring), 0 1px 0 var(--lo), 0 3px 8px rgba(43, 36, 24, .12); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn:focus-visible { outline: 3px solid var(--banana-lo); outline-offset: 2px; }
.btn-chip { --bg: linear-gradient(180deg, var(--banana-hi), var(--banana) 55%, #e9b91d); --fg: var(--ink); --lo: var(--banana-lo); --ring: rgba(43, 36, 24, .45); }
.btn-ivory { --bg: var(--paper-hi); --fg: var(--canopy); --lo: #c4b893; --ring: rgba(15, 74, 57, .4); }
.btn-paper { --bg: var(--paper-hi); --fg: var(--ink); --lo: var(--rule); --ring: var(--rule); box-shadow: inset 0 0 0 1.5px var(--ring), 0 2px 0 var(--lo); }
.btn-ink { --bg: var(--canopy); --fg: var(--cream); --lo: var(--canopy-lo); }
.btn-buy { --bg: linear-gradient(180deg, #3f9150, #2c7440); --fg: #f4fff1; --lo: #1b4d29; }
.btn-sell { --bg: linear-gradient(180deg, #c95536, #a63b22); --fg: #fff4ef; --lo: #6a2213; }
.btn-small { padding: 8px 14px; font-size: 14px; }
.btn-big { padding: 17px 28px; font-size: 18px; }
.btn-wide { width: 100%; }
.btn-wallet { padding: 10px 16px; font-size: 14.5px; white-space: nowrap; }
.top .btn-ivory { --bg: var(--cream); --ring: transparent; --lo: #062219; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--canopy); font-weight: 700; text-decoration: underline; cursor: pointer; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---------- layout and journal pages ---------- */
main { max-width: 1240px; margin: 0 auto; padding: 36px 24px 64px; display: block; }
.placard { background: var(--paper); border-radius: 4px; padding: 22px 24px; position: relative;
  box-shadow: inset 0 0 0 1px var(--hair), inset 0 0 0 5px var(--paper), inset 0 0 0 6px rgba(43, 36, 24, .09), 0 1px 0 rgba(43, 36, 24, .1), 0 14px 30px rgba(60, 48, 20, .12); }
.placard-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.placard-head h2 { font: 700 23px/1.2 var(--display); color: var(--ink); }
.placard h3 { font: 900 15px/1.3 var(--text); margin: 18px 0 8px; }

/* ---------- hero: an open journal page under the canopy ---------- */
.hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 44px; align-items: start;
  padding: 196px 52px 52px; border-radius: 6px; overflow: hidden; margin-bottom: 8px;
  background: repeating-linear-gradient(180deg, transparent 0 31px, rgba(92, 118, 128, .10) 31px 32px) 0 196px / 100% 100% no-repeat, linear-gradient(180deg, #f8f1dc, var(--paper-hi) 40%, #f7efd8);
  box-shadow: inset 0 0 0 1px var(--hair), 0 18px 40px rgba(60, 48, 20, .16); }
.hero > :not(.canopy) { position: relative; z-index: 2; }
.hero h1 { text-wrap: balance; font: 700 clamp(36px, 4.4vw, 60px)/1.1 var(--display); color: var(--ink); letter-spacing: -.015em; }
.hero h1 span { color: var(--canopy); font-style: italic; font-weight: 400; }
.lede { font-size: 18.5px; line-height: 1.6; max-width: 34em; margin: 22px 0 28px; }
.hero .lede { color: #3a3222; }
.hero-clock { padding-top: 4px; }
.canopy { position: absolute; left: 0; right: 0; top: 0; height: 300px; z-index: 1; pointer-events: none; }
.canopy svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.canopy .sway { transform-box: view-box; animation: sway var(--d, 7s) ease-in-out var(--dl, 0s) infinite alternate; }
.canopy .swing { animation: swing var(--d, 5s) ease-in-out var(--dl, 0s) infinite alternate; }
@keyframes sway { from { transform: rotate(calc(var(--a, 2deg) * -1)); } to { transform: rotate(var(--a, 2deg)); } }
@keyframes swing { from { transform: rotate(-3.5deg); } to { transform: rotate(3.5deg); } }
.tag text { font: 900 13px/1 var(--text); letter-spacing: .03em; fill: var(--ink); }

/* ---------- the clock: the journal's cloth cover, an elastic band, a paper label for the time ---------- */
.clock { border-radius: 6px 10px 10px 6px; padding: 18px 54px 18px 20px; background: var(--cloth); position: relative; color: var(--cream);
  box-shadow: inset 6px 0 0 rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 1px #062a20, 0 18px 34px rgba(30, 40, 20, .32); }
.clock::before { content: ''; position: absolute; inset: 8px 40px 8px 12px; border: 1.5px dashed rgba(246, 239, 216, .38); border-radius: 4px; pointer-events: none; }
.clock::after { content: ''; position: absolute; top: -2px; bottom: -2px; right: 16px; width: 15px; border-radius: 2px;
  background: linear-gradient(90deg, #c99a12, var(--banana) 30%, #ffe58a 50%, var(--banana) 70%, #b48508);
  box-shadow: 0 0 0 1px rgba(60, 44, 0, .45), -2px 0 4px rgba(0, 0, 0, .3); }
.clock-screen { position: relative; padding: 6px 6px 4px; }
.clock-top { display: flex; justify-content: space-between; gap: 12px; font: 700 17px/1.25 var(--display); color: var(--cream); }
.clock-state { color: var(--banana); font: 900 14px/1.4 var(--text); letter-spacing: .02em; }
.clock-time { display: flex; flex-direction: column; align-items: center; margin: 14px auto 16px; padding: 12px 18px 14px; max-width: 360px; color: var(--ink); border-radius: 3px;
  background: linear-gradient(180deg, #fffcf0, #f4ecd3);
  box-shadow: inset 0 0 0 1px rgba(43, 36, 24, .55), inset 0 0 0 4px #fbf5e2, inset 0 0 0 5px rgba(43, 36, 24, .35), 0 2px 0 rgba(0, 0, 0, .35), 0 6px 14px rgba(0, 0, 0, .25); }
.clock-label { color: var(--ink-soft); font: italic 400 15px/1.2 var(--display); margin-bottom: 4px; }
.clock-digits { font: 700 clamp(48px, 6.4vw, 80px)/1 var(--display); color: var(--ink); letter-spacing: .01em; }
.clock-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 10px 14px; margin: 0; padding: 12px 6px; border-top: 1px solid rgba(246, 239, 216, .2); border-bottom: 1px solid rgba(246, 239, 216, .2); }
.clock-grid div { display: flex; flex-direction: column; }
.clock-grid dt { color: var(--cream-dim); font-size: 13px; font-weight: 700; }
.clock-grid dd { margin: 0; font: 700 20px/1.3 var(--display); }
.clock-pay { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; padding-top: 10px; color: var(--cream); font-size: 15px; }
.clock-pay b { color: var(--banana); }

/* ---------- lobby ---------- */
.band { margin-top: 40px; }
.band-title { font: 700 27px/1.2 var(--display); color: var(--ink); margin: 0 0 16px; }
.band-empty { color: var(--muted); font-style: italic; }
.placards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.tplacard { display: flex; flex-direction: column; gap: 10px; padding-top: 26px; }
/* a ribbon bookmark hangs from the top edge of every cup page */
.tplacard::after { content: ''; position: absolute; top: -5px; right: 22px; width: 15px; height: 46px; background: linear-gradient(90deg, var(--canopy-lo), var(--canopy-hi) 50%, var(--canopy-lo));
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); }
.tp-name { text-decoration: none; display: flex; flex-direction: column; gap: 2px; }
.tp-name h3 { font: 700 24px/1.15 var(--display); color: var(--ink); margin: 0; }
.tp-time { font-weight: 700; color: var(--muted); font-size: 14px; }
.tp-clock { margin: 0; font-size: 15px; }
.tp-clock b { font: 700 27px/1 var(--display); margin-left: 4px; color: var(--canopy); }
.tp-kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 4px 0 6px; font-size: 15px; }
.tp-kv dt { color: var(--muted); }
.tp-kv dd { margin: 0; font-weight: 700; text-align: right; }
.tp-cta { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.tp-more { font-size: 14px; color: var(--canopy); text-align: center; font-weight: 700; }
.runcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 22px; }
.runcard { text-decoration: none; display: block; }
.rc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.rc-head h3 { font: 700 21px/1.15 var(--display); color: var(--ink); margin: 0; }
.rc-clock b { font: 700 21px/1 var(--display); color: var(--canopy); }
.results { display: flex; flex-direction: column; gap: 0; padding: 10px 24px; }
.result-row { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); text-decoration: none; flex-wrap: wrap; }
.result-row:last-child { border-bottom: 0; }
.rr-win { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.rr-win .row-chip { width: 18px; height: 18px; }

/* ---------- standings: specimen labels, each bar a vine with a berry ---------- */
.board-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.row { display: grid; grid-template-columns: 34px 24px minmax(96px, 150px) minmax(0, 1fr) 104px 108px; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 2px; color: var(--ink);
  background: var(--label);
  box-shadow: inset 0 0 0 1px rgba(43, 36, 24, .4), inset 0 0 0 3px var(--label), inset 0 0 0 4px rgba(43, 36, 24, .14), 0 1px 2px rgba(60, 48, 20, .12); will-change: transform; }
.row.mine { box-shadow: inset 0 0 0 2px var(--canopy), inset 0 0 0 4px var(--label), inset 0 0 0 5px var(--banana), 0 1px 2px rgba(60, 48, 20, .12); }
.row.dq { opacity: .6; }
.row-place { font: italic 400 22px/1 var(--display); text-align: center; color: var(--ink); }
/* a watercolour swatch, painted by hand: uneven edge, darker rim where the wash dried */
.row-chip, .seat-card { width: 24px; height: 24px; display: inline-block; border-radius: 52% 48% 55% 45% / 47% 55% 45% 53%;
  background: radial-gradient(circle at 38% 34%, rgba(255, 255, 255, .45) 0 14%, transparent 30%), radial-gradient(circle at 50% 50%, var(--c) 0 58%, var(--rim) 100%);
  box-shadow: 0 0 0 .5px rgba(43, 36, 24, .25); }
.row-who { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.row-who b { font: 700 16px/1.2 var(--display); }
.row-who em { font-style: normal; font-size: 12px; font-weight: 900; color: var(--canopy); }
.row-wallet { font-size: 12.5px; color: var(--muted); }
.row-bar { position: relative; height: 24px; border-radius: 2px; background: linear-gradient(transparent 11px, rgba(43, 36, 24, .12) 11px 12px, transparent 12px); }
.stack { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--w) * 100%);
  background:
    radial-gradient(ellipse 5.5px 3.2px at 7px 7px, var(--leaf-hi) 0 70%, transparent 88%) 0 0 / 18px 100% repeat-x,
    radial-gradient(ellipse 5.5px 3.2px at 15px 17px, var(--leaf) 0 70%, transparent 88%) 0 0 / 18px 100% repeat-x,
    linear-gradient(transparent 11px, var(--vine) 11px 13px, transparent 13px);
  transition: width .7s cubic-bezier(.2, .8, .2, 1); }
.stack::after { content: ''; position: absolute; right: -2px; top: 50%; width: 13px; height: 13px; margin-top: -6.5px; border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, rgba(255, 255, 255, .55) 0 18%, transparent 34%), var(--c); box-shadow: 0 0 0 1px var(--rim); }
/* the specimen pin at the 1 SOL start */
.start-line { position: absolute; top: 3px; bottom: 1px; left: calc(var(--start) * 100%); width: 2px; margin-left: -1px; background: #4a4236; }
.start-line::before { content: ''; position: absolute; left: -3.5px; top: -4px; width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f08c74, var(--pin) 60%, #7c2414); }
.row-val { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.row-val b { font: 700 16px/1.2 var(--display); }
.row-pnl { font-weight: 900; font-size: 13.5px; }
.row-meta { font-size: 13px; color: var(--muted); text-align: right; }
.row-empty { padding: 18px; color: var(--muted); text-align: center; font-style: italic; }
.board-rows.mini .row { grid-template-columns: 26px 20px minmax(70px, 110px) minmax(0, 1fr) 84px; padding: 6px 10px; }
.board-rows.mini .row-meta { display: none; }
.board-rows.mini .row-chip { width: 18px; height: 18px; }
/* swatch colours from the journal's paint box (the engine's chip names map to them) */
.chip-claret { --c: #f2c230; --rim: #b0860c; --spot: #2b2418; } .chip-teal { --c: #5a9b50; --rim: #2f6a32; --spot: #fff; }
.chip-mustard { --c: #d9649a; --rim: #9c3466; --spot: #fff; } .chip-onyx { --c: #c8432f; --rim: #842414; --spot: #fff; }
.chip-ivory { --c: #5b9bc9; --rim: #2c6592; --spot: #fff; } .chip-slate { --c: #9a6a3e; --rim: #5e3c1c; --spot: #fff; }
.chip-orange { --c: #ec8a2a; --rim: #a6550e; --spot: #2b2418; } .chip-plum { --c: #7d5aa8; --rim: #4d3272; --spot: #fff; }

/* ---------- cup page ---------- */
.tpage-head { margin-bottom: 18px; }
.back { color: var(--canopy); font-weight: 900; text-decoration: none; font-size: 15px; }
.back::before { content: '‹ '; }
.tpage-title { font: 700 clamp(32px, 4.2vw, 52px)/1.1 var(--display); color: var(--ink); margin: 6px 0 6px; }
.tpage-title span { color: var(--canopy); font-style: italic; font-weight: 400; }
.tgrid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; margin-top: 22px; align-items: start; }
.tmain, .tside { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.seat-card { width: auto; height: auto; padding: 6px 13px; border-radius: 999px 6px 6px 999px; font-weight: 900; color: var(--spot); background: var(--c); box-shadow: inset 0 0 0 1.5px var(--rim); }
.seat-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.seat-sum div { display: flex; flex-direction: column; background: #f5edd5; border-radius: 3px; padding: 8px 10px; box-shadow: inset 0 0 0 1px var(--rule); }
.seat-sum span { font-size: 12.5px; }
.seat-sum b { font: 700 17px/1.3 var(--display); }
.warn { color: var(--down); font-weight: 700; }
.result { font: 700 22px/1.25 var(--display); color: var(--canopy); }
.trade { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; padding: 14px; border-radius: 4px; background: #f5edd6; box-shadow: inset 0 0 0 1px var(--rule); }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: #e8dfc2; border-radius: 6px; padding: 4px; }
.seg button { border: 0; background: none; padding: 9px; border-radius: 4px; font: 900 15px/1 var(--text); cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--canopy); color: var(--cream); }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; color: var(--muted); font-weight: 700; }
select, .amt { font: 700 17px/1.2 var(--text); color: var(--ink); background: var(--paper-hi); border: 1.5px solid #cfc29f; border-radius: 4px; padding: 11px 12px; width: 100%; min-width: 0; }
select:focus, .amt:focus { outline: 2px solid var(--canopy); outline-offset: 1px; }
.presets { display: flex; gap: 8px; flex-wrap: wrap; }
.est { min-height: 1.4em; margin: 0; }
.bags, .fills, .payouts, .checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bags li { display: grid; grid-template-columns: 22px auto 1fr auto; gap: 8px; align-items: center; font-size: 15px; }
.bags img, .coin-name img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.coin-dot { width: 22px; height: 22px; border-radius: 50%; background: #e8dfc2; display: inline-block; }
.fills li { display: flex; flex-direction: column; font-size: 14.5px; padding: 6px 0; border-bottom: 1px dashed var(--rule); }
.payouts li { font-size: 14.5px; padding: 4px 0; overflow-wrap: anywhere; }
.checks li { font-weight: 700; }
.checks .ok { color: var(--up); }
.checks .bad { color: var(--down); }
.coin-table { display: flex; flex-direction: column; margin-top: 8px; }
.coin-row { display: grid; grid-template-columns: minmax(0, 2fr) 1fr 1fr 1fr; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.coin-row > span { text-align: right; }
.coin-headrow { font-size: 13px; color: var(--muted); font-weight: 900; }
.coin-name { display: flex; gap: 8px; align-items: center; text-decoration: none; min-width: 0; }
.coin-name b { font-family: var(--display); }
.coin-name .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }

/* ---------- text pages ---------- */
.prose { max-width: 780px; margin: 0 auto; }
.prose.wide { max-width: 980px; }
.prose h1 { font: 700 clamp(30px, 4vw, 44px)/1.15 var(--display); color: var(--ink); margin-bottom: 10px; }
.prose h2 { font: 700 20px/1.3 var(--display); color: var(--canopy); margin: 26px 0 8px; }
.prose p { margin: 10px 0; }
.prose .lede { font-size: 18px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 12px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 700; }
.kv-row { grid-template-columns: repeat(4, auto 1fr); }
.verify-out { margin-top: 18px; }

/* ---------- footer, dialogs, toast ---------- */
.foot { background: var(--canopy-lo); color: var(--cream-dim); margin-top: 24px; }
.foot-in { max-width: 1240px; margin: 0 auto; padding: 26px 24px 34px; font-size: 14px; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { color: var(--cream); }
.dlg { border: 0; padding: 0; border-radius: 6px; width: min(460px, calc(100vw - 32px)); background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(10, 52, 41, .45); }
.dlg::backdrop { background: rgba(10, 40, 30, .55); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: var(--cloth); color: var(--cream); box-shadow: 0 4px 0 var(--banana); position: relative; }
.dlg-head h2 { font: 700 21px/1.2 var(--display); }
.dlg-x { background: none; border: 0; color: inherit; font-size: 20px; cursor: pointer; padding: 4px; }
.dlg-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.dlg-body p { margin: 0; }
.wallets { display: flex; flex-direction: column; gap: 8px; }
.wallets button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 6px; border: 1.5px solid var(--rule); background: var(--paper-hi); font: 900 16px/1 var(--text); cursor: pointer; }
.wallets img { width: 28px; height: 28px; border-radius: 6px; }
.addr { overflow-wrap: anywhere; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--canopy); color: var(--cream); padding: 12px 18px; border-radius: 6px; z-index: 60; max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgba(10, 52, 41, .35); border-bottom: 3px solid var(--banana); }

@media (prefers-reduced-motion: reduce) { .stack { transition: none; } .canopy .sway, .canopy .swing { animation: none; } }

/* ---------- narrow screens ---------- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 30px; padding: 176px 32px 40px; }
  .tgrid { display: flex; flex-direction: column; }
  .tmain, .tside { display: contents; }
  .tgrid .board { order: 1; } .tgrid .seat { order: 2; } .tgrid .coins { order: 3; } .tgrid .record { order: 4; }
}
@media (max-width: 720px) {
  .top-in { padding: 10px 16px; gap: 10px; flex-wrap: wrap; }
  .logo { font-size: 24px; gap: 8px; } .logo-mark { width: 38px; height: 38px; }
  .nav { order: 3; flex-basis: 100%; margin: 0; overflow-x: auto; }
  .nav a { padding: 6px 10px; font-size: 14px; }
  .x-link { margin-left: auto; width: 32px; }
  .btn-wallet { padding: 8px 12px; font-size: 13.5px; }
  main { padding: 24px 12px 48px; }
  .hero { padding: 150px 18px 28px; gap: 26px; }
  .canopy { height: 220px; }
  .lede { font-size: 17px; }
  .placard { padding: 18px 16px; }
  .tplacard { padding-top: 24px; }
  .clock { padding: 14px 44px 14px 14px; }
  .clock::before { inset: 6px 34px 6px 8px; }
  .clock::after { right: 12px; width: 13px; }
  .runcards { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: 24px 20px minmax(0, 1fr) 82px; grid-template-areas: 'p c w v' 'b b b b'; gap: 6px 8px; padding: 8px 10px; }
  .row-place { grid-area: p; font-size: 18px; } .row-chip { grid-area: c; width: 20px; height: 20px; } .row-who { grid-area: w; flex-direction: row; gap: 6px; align-items: baseline; flex-wrap: wrap; }
  .row-val { grid-area: v; } .row-bar { grid-area: b; height: 22px; } .row-meta { display: none; }
  .board-rows.mini .row { grid-template-columns: 22px 18px minmax(0, 1fr) 76px; }
  .coin-row { grid-template-columns: minmax(0, 1.6fr) 1fr 1fr; } .coin-row > :nth-child(3) { display: none; }
  .kv-row { grid-template-columns: auto 1fr; }
  .clock-time { padding: 10px 12px 12px; }
  .clock-digits { font-size: 46px; }
  .clock-grid dd { font-size: 17px; }
  .seat-sum b { font-size: 15px; }
}
