/* "Who Owns the Block?" — a printed game board lying on a felt table. */
:root {
  --felt: #1e5a45;
  --felt-light: #2b7559;
  --felt-dark: #0f3528;
  --board: #f4eedb;
  --cream: #fbf6e8;
  --ink: #1d1f24;
  --ink-soft: #5b5d62;
  --line: #23262b;
  --red: #c8322c;
  --gold: #f0c419;
  --pe: #c8322c;
  --public: #2449a0;
  --c: 104px;
  --strip: 104px;
  --top: 108px;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .25 0 0 0 0 .15 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  --wood: repeating-linear-gradient(97deg, rgba(120, 72, 30, 0.14) 0 2px, transparent 2px 9px, rgba(120, 72, 30, 0.08) 9px 10px, transparent 10px 17px), linear-gradient(90deg, #e3c28f, #d2a468 55%, #e0bb85);
  --narrow: "Archivo Narrow", "Arial Narrow", system-ui, sans-serif;
  --slab: "Alfa Slab One", "Rockwell", Georgia, serif;
  --body: "Archivo", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: var(--noise), radial-gradient(ellipse 80% 70% at 55% 45%, var(--felt-light), var(--felt) 55%, var(--felt-dark));
  color: var(--ink);
  font: 15px/1.4 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 2px; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.table { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 16px; }

/* ---------- the box lid / rule sheet */
.box {
  width: 320px;
  flex: none;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  background: var(--grain), var(--cream);
  border-radius: 6px;
  box-shadow: 0 0 0 2px var(--line), 0 16px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.lid {
  position: relative;
  padding: 14px 18px 18px;
  background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(255, 255, 255, 0.05) 14px 28px), var(--red);
  border-bottom: 3px solid var(--line);
  color: var(--cream);
}
.home { font: 700 13px var(--narrow); letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; opacity: 0.9; }
.home:hover { text-decoration: underline; }
.lid h1 {
  margin: 8px 0 0;
  font: 400 33px/1 var(--slab);
  letter-spacing: 0.01em;
  text-shadow: 2px 2px 0 var(--line);
}
.kicker {
  display: table;
  margin-bottom: 6px;
  padding: 2px 8px;
  background: var(--gold);
  color: var(--ink);
  font: 700 12px var(--narrow);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow: none;
  border: 2px solid var(--line);
  transform: rotate(-2deg);
}
.rules-toggle { display: none; }
.box-body { flex: 1; min-height: 0; overflow: auto; padding: 14px 18px 12px; display: flex; flex-direction: column; gap: 12px; }
.lede { margin: 0; color: var(--ink-soft); font-size: 14.5px; }
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 6px;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.06);
}
.search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; border: 0; background: none; font: 16px var(--body); color: var(--ink); outline: none; }
#results { margin-top: -6px; max-height: 38vh; overflow: auto; border: 2px solid var(--line); border-radius: 6px; background: #fff; }
#results button {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid rgba(35, 38, 43, 0.15);
  background: none;
  padding: 7px 10px;
  font: 600 14.5px var(--body);
}
#results button:hover, #results button:focus-visible { background: #fdf3cf; outline: none; }
#results .chip { flex: none; width: 12px; height: 16px; margin-top: 2px; background: var(--set); border: 1.5px solid var(--line); border-radius: 2px; }
#results small { display: block; color: var(--ink-soft); font: 400 12.5px var(--body); }
#results .none { padding: 7px 10px; color: var(--ink-soft); font-size: 13.5px; }

.rules h2 { margin: 2px 0 6px; font: 700 13px var(--narrow); letter-spacing: 0.16em; text-transform: uppercase; }
#legend { display: grid; gap: 2px; }
#legend button {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 3px 6px 3px 2px;
  border: 0;
  border-radius: 6px;
  background: none;
  text-align: left;
}
#legend button:hover { background: rgba(240, 196, 25, 0.22); }
#legend .label { font: 700 14.5px/1.15 var(--narrow); }
#legend .label small { display: block; font: 400 12px var(--body); color: var(--ink-soft); }
#legend .count { font: 400 17px var(--slab); }
#legend button[aria-pressed="false"] { opacity: 0.38; }
#legend button[aria-pressed="false"] .label { text-decoration: line-through; }
.fine { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-soft); }

.roll {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 14px;
  background: var(--red);
  color: var(--cream);
  border: 2px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 4px 0 var(--line);
  text-align: left;
  transition: transform 0.08s, box-shadow 0.08s;
}
.roll:hover { background: #d23b34; }
.roll:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.roll-label { font: 400 22px/1 var(--slab); text-shadow: 1.5px 1.5px 0 var(--line); }
.roll-label small { display: block; margin-top: 3px; font: 600 12.5px var(--body); text-shadow: none; opacity: 0.92; }
.dice { display: flex; gap: 7px; }
.die {
  width: 34px;
  height: 34px;
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  place-items: center;
  padding: 4px;
  background: #fffdf5;
  border: 1.5px solid var(--line);
  border-radius: 7px;
  box-shadow: inset -2px -3px 0 rgba(0, 0, 0, 0.12);
}
.die:nth-child(2) { transform: rotate(8deg); }
.die i.on { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.roll.rolling .die { animation: tumble 0.16s infinite alternate ease-in-out; }
.roll.rolling .die:nth-child(2) { animation-delay: -0.08s; }
@keyframes tumble {
  from { transform: translateY(0) rotate(-16deg); }
  to { transform: translateY(-5px) rotate(14deg); }
}

.credit .sep { display: none; }
body.mobile .credit .sep { display: inline; }
.credit { margin: auto 0 0; padding-top: 6px; font-size: 12px; color: var(--ink-soft); border-top: 1px solid rgba(35, 38, 43, 0.15); }

/* ---------- the board */
.board {
  position: relative;
  flex: none;
  width: 900px;
  height: 860px;
  background: var(--grain), var(--board);
  border-radius: 4px;
  box-shadow: 0 0 0 2px var(--line), 0 0 0 7px #e4d8b8, 0 0 0 9px var(--felt-dark), 0 24px 50px rgba(0, 0, 0, 0.5);
}
.track {
  --h: 6;
  --v: 5;
  position: absolute;
  inset: 10px;
  display: grid;
  grid-template-columns: var(--cw, var(--c)) repeat(var(--h), 1fr) var(--cw, var(--c));
  grid-template-rows: var(--c) repeat(var(--v), 1fr) var(--c);
  gap: 2px;
  background: var(--line);
  border: 2px solid var(--line);
}
.center { grid-row: 2 / -2; grid-column: 2 / -2; position: relative; overflow: hidden; background: var(--board); min-width: 0; min-height: 0; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; outline: none; }
#map.dragging { cursor: grabbing; }
#map.pointing { cursor: pointer; }
#map:focus-visible { box-shadow: inset 0 0 0 3px var(--gold); }

.space {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 0;
  padding: 6px;
  border: 0;
  border-radius: 0;
  background: var(--board);
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  overflow: hidden;
  transition: background 0.15s, opacity 0.15s;
}
button.space:hover, a.space:hover { background: #fffaf0; }
.space:focus-visible { outline-offset: -4px; }
.space .band { position: absolute; background: var(--set); }
.space.bottom { padding-top: 24px; }
.space.bottom .band { top: 0; left: 0; right: 0; height: 18px; border-bottom: 2px solid var(--line); }
.space.top { padding-bottom: 24px; }
.space.top .band { bottom: 0; left: 0; right: 0; height: 18px; border-top: 2px solid var(--line); }
.space.left { padding-right: 24px; }
.space.left .band { top: 0; bottom: 0; right: 0; width: 18px; border-left: 2px solid var(--line); }
.space.right { padding-left: 24px; }
.space.right .band { top: 0; bottom: 0; left: 0; width: 18px; border-right: 2px solid var(--line); }
.space .parent { font: 700 calc(9.5px * var(--fs, 1))/1.1 var(--narrow); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.space .brand { font: 700 calc(14.5px * var(--fs, 1))/1.05 var(--narrow); overflow-wrap: break-word; hyphens: auto; max-width: 100%; }
.space .count { font: 500 calc(11.5px * var(--fs, 1)) var(--narrow); color: var(--ink-soft); }
.space .count b { font: 400 calc(15px * var(--fs, 1)) var(--slab); color: var(--ink); margin-right: 2px; }
.space .tag {
  display: inline-block;
  margin-left: 4px;
  padding: 0 4px;
  border: 1.2px solid currentColor;
  border-radius: 3px;
  font: 700 9px/1.4 var(--narrow);
  font-style: normal;
  letter-spacing: 0.05em;
  vertical-align: 1px;
}
.board.focusing .space[data-set][aria-pressed="false"] > * { opacity: 0.32; }
.board.focusing .space[data-set][aria-pressed="false"] canvas { opacity: 1; }
.space[aria-pressed="true"] { background: #fffaf0; box-shadow: inset 0 0 0 3px var(--set, var(--line)); }
.space.filler { background: repeating-linear-gradient(45deg, transparent 0 8px, rgba(35, 38, 43, 0.04) 8px 16px), var(--board); }
.space.filler .brand { font-size: 12.5px; }
.space.filler a { color: var(--public); }

.corner { gap: 3px; padding: 6px; }
.corner .big { font: 400 calc(20px * var(--fs, 1))/1 var(--slab); }
.corner .small { font: 700 calc(10.5px * var(--fs, 1))/1.15 var(--narrow); letter-spacing: 0.08em; text-transform: uppercase; }
.corner.go { background: var(--grain), #fbf1d6; }
.corner.go .big { color: var(--red); font-size: calc(24px * var(--fs, 1)); text-shadow: 1.5px 1.5px 0 var(--line); }
.corner.go .arrow { font: 400 30px/0.8 var(--slab); color: var(--red); }
.corner.wood { background: var(--wood); }
.corner.wood .big, .corner.grey .big { font-size: calc(22px * var(--fs, 1)); }
.corner.grey { --set: #a4abb3; background: repeating-linear-gradient(-45deg, rgba(35, 38, 43, 0.07) 0 6px, transparent 6px 12px), #dde0e3; }
.corner.wood { --set: #8b5534; }
.corner.sources { background: #fbf1d6; }
.corner.sources .big { font-size: calc(17px * var(--fs, 1)); color: var(--public); }
.corner .icon canvas { display: block; }

/* ---------- things lying on the board center */
.setinfo {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  max-width: min(560px, calc(100% - 20px));
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 36px 10px 10px;
  background: var(--cream);
  border: 2px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 4px 0 rgba(35, 38, 43, 0.25);
  font-size: 13px;
}
.setinfo .chip { flex: none; width: 18px; height: 24px; background: var(--set); border: 2px solid var(--line); border-radius: 3px; }
.setinfo .chip.wood { background: var(--wood); }
.setinfo strong { font: 700 15px var(--narrow); }
.setinfo p { margin: 1px 0 0; }
.setinfo em { color: var(--ink-soft); }
.setinfo .clear { position: absolute; top: 4px; right: 6px; border: 0; background: none; font: 700 22px/1 var(--body); padding: 2px 6px; }

.controls { position: absolute; z-index: 2; right: 10px; bottom: 10px; display: grid; gap: 6px; }
.controls button {
  width: 38px;
  height: 38px;
  border: 2px solid var(--line);
  border-radius: 7px;
  background: var(--cream);
  box-shadow: 0 3px 0 var(--line);
  font: 700 20px/1 var(--body);
}
.controls button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
#status { position: absolute; left: 50%; top: 50%; margin: 0; transform: translate(-50%, -50%); font: 400 24px var(--slab); color: var(--ink); text-align: center; }
#status:empty { display: none; }

#tip {
  position: fixed;
  z-index: 10;
  pointer-events: none;
  max-width: 250px;
  padding: 5px 10px 6px;
  background: var(--cream);
  border: 2px solid var(--line);
  border-left: 9px solid var(--set, var(--line));
  border-radius: 4px;
  box-shadow: 0 3px 0 rgba(35, 38, 43, 0.3);
  font: 700 15px/1.15 var(--narrow);
}
#tip small { display: block; font: 400 12px var(--body); color: var(--ink-soft); }

/* ---------- title deed */
#card {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  width: min(380px, 46%);
  max-height: calc(100% - 24px);
  overflow: auto;
  padding: 9px;
  background: #fffdf6;
  border: 2px solid var(--line);
  border-radius: 5px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  overscroll-behavior: contain;
}
#card[hidden] { display: none; }
#card .close {
  position: absolute;
  z-index: 1;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--cream);
  font: 700 19px/1 var(--body);
  padding: 0;
}
#card .band {
  padding: 10px 40px 12px;
  background: var(--set);
  color: var(--on, var(--ink));
  border: 2px solid var(--line);
  text-align: center;
}
#card .band.wood { background: var(--wood); color: var(--ink); }
#card .band small { color: inherit; display: block; font: 700 11px var(--narrow); letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.9; }
#card .band h2 { margin: 4px 0 0; font: 400 22px/1.1 var(--slab); overflow-wrap: anywhere; }
.deed-body { padding: 10px 6px 4px; font-size: 14px; }
#card .addr { margin: 0 0 8px; text-align: center; font-style: italic; color: var(--ink-soft); }
.rows { display: grid; gap: 3px; padding-bottom: 10px; border-bottom: 2px solid var(--line); font: 500 14px/1.25 var(--narrow); }
.row { display: flex; align-items: baseline; gap: 6px; }
.row span { flex: none; color: var(--ink-soft); }
.row i { flex: 1 1 12px; min-width: 12px; border-bottom: 1.5px dotted rgba(35, 38, 43, 0.45); transform: translateY(-3px); }
.row b { flex: 0 1 auto; text-align: right; font-weight: 700; }
.evidence { padding-top: 10px; }
#card p { margin: 4px 0; }
#card .badge {
  display: inline-block;
  padding: 2px 8px;
  border: 2px solid var(--line);
  border-radius: 3px;
  font: 700 12px var(--narrow);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
#card .badge.pe { border-color: var(--pe); color: var(--pe); }
#card h3 { margin: 14px 0 6px; padding-top: 8px; border-top: 1px solid rgba(35, 38, 43, 0.25); font: 700 12.5px var(--narrow); letter-spacing: 0.16em; text-transform: uppercase; }
#card .callout, #card .claim, #card .estimate { margin: 10px 0 0; padding: 9px 11px; border: 1.5px solid rgba(35, 38, 43, 0.35); border-radius: 4px; background: #fff; }
#card .callout { border-left: 7px solid var(--line); }
#card .callout.pe { border-left-color: var(--pe); background: #fdf1ec; }
#card .callout.public { border-left-color: var(--public); background: #eff3fb; }
#card .estimate { border-style: dashed; background: none; }
#card small, #card .note { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-soft); }
#card .traits { display: grid; gap: 5px; }
#card .trait { display: grid; grid-template-columns: 108px 1fr; gap: 8px; font-size: 13.5px; }
#card .trait > span:first-child { font: 700 13.5px var(--narrow); }
#card .trait.unknown > span:last-child { color: var(--ink-soft); }
#card a { color: var(--public); }
.deed-fine { margin: 12px 0 0 !important; padding-top: 8px; border-top: 2px solid var(--line); text-align: center; font-size: 12px; font-style: italic; color: var(--ink-soft); }

/* ---------- phones and small tablets: the track becomes a strip of set cards */
.strip { display: none; }
body.mobile .table { display: block; padding: 0; }
body.mobile .box {
  position: fixed;
  z-index: 5;
  top: 0;
  left: 0;
  right: 0;
  width: auto;
  border-radius: 0;
  overflow: visible;
  box-shadow: 0 2px 0 var(--line), 0 6px 16px rgba(0, 0, 0, 0.35);
}
body.mobile .lid { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom-width: 2px; }
body.mobile .lid h1 { flex: 1; margin: 0; font-size: 19px; }
body.mobile .kicker { display: none; }
body.mobile .home { font-size: 11px; order: 2; }
body.mobile .rules-toggle {
  display: block;
  order: 3;
  padding: 4px 10px;
  background: var(--gold);
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 5px;
  font: 700 12px var(--narrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
body.mobile .box-body { overflow: visible; padding: 8px 12px 10px; gap: 8px; }
body.mobile .lede { display: none; }
body.mobile .search { padding: 5px 10px; }
body.mobile #results { position: absolute; left: 12px; right: 12px; top: calc(100% - 4px); z-index: 6; margin: 0; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); }
body.mobile .rules {
  display: none;
  position: absolute;
  z-index: 6;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 65vh;
  overflow: auto;
  padding: 12px 14px;
  background: var(--grain), var(--cream);
  border-bottom: 2px solid var(--line);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}
body.mobile .box.open .rules { display: block; }
body.mobile .dicebox { position: fixed; z-index: 4; left: 16px; bottom: calc(var(--strip) + 38px); }
body.mobile .roll { width: auto; padding: 7px 9px; gap: 0; border-radius: 10px; }
body.mobile .roll-label { display: none; }
body.mobile .die { width: 28px; height: 28px; padding: 3px; }
body.mobile .die i.on { width: 5px; height: 5px; }
body.mobile .credit {
  position: fixed;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 3px 8px 4px;
  border: 0;
  background: var(--felt-dark);
  color: #d9e7df;
  font-size: 10.5px;
  line-height: 1.3;
  text-align: center;
}
body.mobile .credit br, body.mobile .credit .wide { display: none; }
body.mobile .credit a[href*="openstreetmap"] { margin-left: 0; }
body.mobile .board {
  position: fixed;
  top: calc(var(--top) + 10px);
  left: 8px;
  right: 8px;
  bottom: calc(var(--strip) + 34px);
  width: auto;
  height: auto;
  box-shadow: 0 0 0 2px var(--line), 0 0 0 5px #e4d8b8, 0 0 0 7px var(--felt-dark), 0 12px 26px rgba(0, 0, 0, 0.45);
}
body.mobile .track { inset: 5px; display: block; background: none; }
body.mobile .track > .space { display: none; }
body.mobile .center { position: absolute; inset: 0; }
body.mobile .setinfo { top: 6px; left: 6px; right: 6px; max-width: none; font-size: 12px; padding: 7px 32px 8px 8px; }
body.mobile .setinfo strong { font-size: 14px; }
body.mobile .setinfo .list { display: none; }
body.mobile .controls { right: 8px; bottom: 8px; }
body.mobile .controls button { width: 36px; height: 36px; }
body.mobile .strip {
  display: flex;
  position: fixed;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 18px;
  height: calc(var(--strip) + 8px);
  gap: 8px;
  padding: 4px 12px 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scroll-padding: 12px;
  -webkit-overflow-scrolling: touch;
}
.setcard {
  flex: none;
  width: 148px;
  height: var(--strip);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: var(--cream);
  border: 2px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
  text-align: left;
  text-decoration: none;
  scroll-snap-align: start;
  transition: transform 0.15s;
}
.setcard .band {
  padding: 5px 8px;
  background: var(--set);
  color: var(--on, var(--ink));
  border-bottom: 2px solid var(--line);
  font: 700 12px/1.15 var(--narrow);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.setcard .band em { font-style: normal; padding: 0 3px; border: 1.2px solid currentColor; border-radius: 3px; font-size: 10px; }
.setcard.wood .band { background: var(--wood); color: var(--ink); }
.setcard .brands { flex: 1; padding: 5px 8px 0; font: 500 12.5px/1.2 var(--narrow); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.setcard .total { padding: 0 8px 6px; font: 600 11.5px var(--narrow); color: var(--ink-soft); }
.setcard .total b { font: 400 15px var(--slab); color: var(--ink); }
.setcard[aria-pressed="true"] { transform: translateY(-5px); box-shadow: 0 5px 0 var(--set); }
.setcard.fine-card .band { background: var(--gold); color: var(--ink); }
body.mobile.card-open .board { z-index: 9; }
body.mobile #card {
  position: fixed;
  z-index: 7;
  top: auto;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  max-height: 64vh;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -8px 26px rgba(0, 0, 0, 0.4);
}
@media (max-width: 380px) {
  body.mobile .lid h1 { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .roll, .space, .setcard { transition: none; }
  .roll.rolling .die { animation: none; }
}
@media (max-height: 820px) {
  body:not(.mobile) .lede { display: none; }
  body:not(.mobile) .lid h1 { font-size: 29px; }
  body:not(.mobile) #legend .label small { display: none; }
  body:not(.mobile) .box-body { gap: 10px; }
}
