:root {
  color-scheme: light;
  --cool: #d5d7e1;
  --ink: #17171b;
  --muted-ink: #575965;
  --paper: #f7f3e9;
  --paper-line: rgba(23, 23, 27, 0.16);
  --desk-top: #b5663f;
  --desk-edge: #7e3e29;
  --focus: #e9265c;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cool);
  font: 1rem/1.75 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
a { color: inherit; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
button { color: inherit; font: inherit; cursor: pointer; background: var(--paper); border: 1px solid var(--ink); padding: .4rem .7rem; }
button:hover { background: var(--cool); }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.mast { padding: 3.25rem 1.25rem 2.6rem; text-align: center; }
.eyebrow { margin: 0 0 1.1rem; color: var(--muted-ink); font-size: .8rem; letter-spacing: .18em; }
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.portrait { position: relative; width: min(46vw, 180px); margin: 0 auto 1.6rem; padding-bottom: 1.7rem; }
.portrait img { display: block; width: 100%; height: auto; background: var(--paper); border: 1px solid var(--paper-line); }
img { image-rendering: crisp-edges; image-rendering: pixelated; }
.desk { position: absolute; right: -12%; bottom: .85rem; left: -12%; height: 1.15rem; background: var(--desk-top); border-bottom: .4rem solid var(--desk-edge); }
.desk::before, .desk::after { position: absolute; top: 100%; width: .7rem; height: 1.5rem; background: var(--desk-edge); content: ""; }
.desk::before { left: 14%; }
.desk::after { right: 14%; }
h1 { margin: 0 0 .85rem; font-size: clamp(1.2rem, 3.2vw, 1.6rem); letter-spacing: -.02em; line-height: 1.3; }
.lede { max-width: 38rem; margin: 0 auto 1rem; color: var(--muted-ink); }
.subline { margin: 0; color: var(--muted-ink); font-size: .85rem; }
.market { padding: 0 1.25rem 3rem; border-top: 4px solid var(--ink); }
.market-inner { max-width: 1100px; margin: auto; padding-top: 2rem; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.toolbar h2 { margin: 0; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.sort-note, .status, .data-note { color: var(--muted-ink); font-size: .75rem; }
.sort-note { margin: .15rem 0 0; }
.status { margin: 1rem 0; min-height: 1.75em; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 1.1rem; padding: 0; margin: 0; list-style: none; }
.card { background: var(--paper); border: 1px solid var(--ink); padding: 1.1rem; min-width: 0; display: flex; flex-direction: column; }
.identity { display: flex; align-items: center; gap: 1rem; min-height: 84px; }
.coin-art { display: block; flex: 0 0 80px; width: 80px; height: 80px; object-fit: cover; background: var(--cool); border: 1px solid var(--paper-line); }
.card h3 { margin: 0; font-size: 1rem; line-height: 1.4; overflow-wrap: anywhere; }
.ticker { color: var(--muted-ink); font-size: .72rem; margin: .3rem 0 0; overflow-wrap: anywhere; }
.mint-row { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin: 1rem 0; font-size: .75rem; }
.mint { color: var(--muted-ink); overflow-wrap: anywhere; min-width: 0; }
.copy { font-size: .72rem; padding: .2rem .5rem; margin-left: auto; }
dl { margin: 0 0 1rem; border-top: 4px solid var(--ink); }
.metric { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; border-bottom: 1px solid var(--paper-line); padding: .55rem 0; }
dt { font-size: .75rem; color: var(--muted-ink); }
dd { margin: 0; font-size: .9rem; overflow-wrap: anywhere; text-align: right; font-variant-numeric: tabular-nums; }
.buy { margin-top: auto; font-size: .8rem; font-weight: bold; align-self: flex-start; }
.data-note { margin: 1.4rem 0 0; max-width: 52rem; }
footer { display: flex; flex-wrap: wrap; gap: .55rem 1.1rem; justify-content: center; padding: 1.6rem 1.25rem 3.5rem; background: var(--paper); border-top: 4px solid var(--ink); color: var(--muted-ink); font-size: .78rem; text-align: center; }
@media (max-width: 480px) { .mast { padding-top: 2.4rem; } .portrait { width: min(58vw, 160px); } .market { padding-inline: 1rem; } }
@media print { body { background: white; } .card { break-inside: avoid; } button { display: none; } }

/* Keep game, trade and market numbers in their own sections. */
.clock-in { display: block; padding: 0; border: 0; width: 100%; background: transparent; }
.clock-in:active { transform: scale(.97); }
.clock-in img { pointer-events: none; }
.desk-game { max-width: 46rem; margin: 0 auto 2rem; }
.clock-label { margin: 0; font-size: .8rem; }
#desk-counts { margin: .4rem 0; font-variant-numeric: tabular-nums; }
.game-note, .trade-note { font-size: .75rem; color: var(--muted-ink); }
.game-note { max-width: 36rem; margin: .5rem auto; }
.desk-items { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; padding: .5rem; background: var(--desk-top); border-bottom: 4px solid var(--desk-edge); }
.desk-items:empty { display: none; }
.desk-items img { width: 40px; height: 40px; object-fit: cover; border: 1px solid var(--ink); }
summary { cursor: pointer; padding: .5rem; font-size: .8rem; }
.upgrades { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: .5rem; list-style: none; padding: 0; text-align: left; }
.upgrades button { width: 100%; height: 100%; text-align: left; font-size: .72rem; }
.upgrades button:disabled { cursor: default; }
.quiet { font-size: .7rem; background: transparent; margin-top: .5rem; }
.trade-section { border-top: 4px solid var(--ink); padding: 2rem 1rem; }
.trade-inner { max-width: 36rem; margin: auto; min-width: 0; }
.trade-inner h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.trade-inner label { font-size: .8rem; }
#trade-coin { max-width: 100%; padding: .5rem; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--ink); }
#jupiter-plugin { height: 560px; min-height: 560px; width: 100%; overflow: hidden; background: var(--paper); border: 1px solid var(--ink); }
.plugin-placeholder { padding: 1rem; font-size: .8rem; }
.blurb { color: var(--muted-ink); font-size: .72rem; line-height: 1.5; margin: .4rem 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.identity > div { min-width: 0; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-top: auto; }
.card-actions .buy { margin: 0; align-self: center; }
@media (prefers-reduced-motion: reduce) { .clock-in:active { transform: none; } }
