.tally-board{
  --tb-ink:#312d22;
  margin:15px 0;color:var(--tb-ink);
}
.tally-board .tb-instruction{margin:0 0 10px;font-size:15px}
.tally-board .tb-evidence{display:grid;gap:11px}
.tally-board .tb-rack{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;
  padding:10px clamp(5px,2vw,13px) 8px;border:1px solid #352c21;border-radius:3px;
  background:
    repeating-linear-gradient(2deg,#e0c3940b 0 1px,transparent 1px 5px),
    linear-gradient(170deg,#574a36,#3c3329 46%,#483e2f 72%,#352e26);
  box-shadow:inset 0 0 0 2px #78654a66,inset 0 -5px 6px #271f1877,0 2px 2px #4d3e251f;
}
.tally-board .tb-hook{
  position:relative;display:flex;align-items:center;flex-direction:column;gap:0;
  width:100%;min-width:0;min-height:97px;padding:3px 2px 5px;
  color:#f7ebcb;background:transparent;border:1px solid transparent;border-radius:3px;
}
.tally-board .tb-hook:focus-visible{outline:2px solid #fff3c9;outline-offset:0}
@media(hover:hover){
  .tally-board .tb-hook:not(:disabled):hover{background:#fff1bb12;border-color:#e4c88877}
}
.tally-board .tb-hook:disabled{opacity:1;cursor:default}
.tally-board .tb-plaque{
  display:flex;align-items:baseline;justify-content:center;gap:3px;width:max-content;
  padding:0 4px;color:#30281d;background:#decfaa;border:1px solid #27251f;border-radius:2px;
  font:600 10px/1.4 var(--sans,Arial,sans-serif);text-transform:uppercase;letter-spacing:.04em;
}
.tally-board .tb-plaque b{font:700 14px/1.25 Georgia,serif}
.tally-board .tb-pin{
  position:absolute;z-index:1;top:32px;left:50%;width:7px;height:14px;
  transform:translateX(-50%) rotate(-10deg);border-radius:4px;
  border:1px solid #272620;background:linear-gradient(90deg,#807e6b,#e7e2c2 50%,#777564);
  box-shadow:1px 1px 2px #241d17;
}
.tally-board .tb-brass{
  position:relative;display:grid;place-items:end center;width:45px;height:49px;max-width:100%;
  margin:13px auto 0;padding:0 0 4px;border:1px solid #4a3219;border-radius:50%;
  background:linear-gradient(125deg,#b58a44 3%,#e3c16f 27%,#bf9550 54%,#d4ac5f 81%,#94703d);
  color:#433019;box-shadow:inset 0 0 0 1px #e2c68a,inset 0 0 0 3px #98743b,1px 3px 3px #241b12;
  font:700 24px/1.1 Georgia,serif;text-shadow:0 1px #e5ca8e;letter-spacing:.02em;
  transform-origin:50% 6px;
}
.tally-board .tb-brass::before{
  content:"";position:absolute;top:3px;left:50%;width:7px;height:7px;
  transform:translateX(-50%);border-radius:50%;background:#493b29;box-shadow:0 1px #e1bd71;
}
.tally-board [data-tally="47"] .tb-brass{width:44px;border-radius:9px 9px 4px 4px}
.tally-board [data-tally="58"] .tb-brass{width:49px;border-radius:12px 12px 20px 20px}
.tally-board .tb-bare{margin:auto 0 4px;color:#d6c7a8;font:italic 14px/1.2 Georgia,serif}
.tally-board .tb-hook[aria-pressed=true]{background:#dfc38d21;border:1px solid #e6c97f}
.tally-board .tb-hook[aria-pressed=true] .tb-brass{transform:translateY(-5px) rotate(-9deg);box-shadow:inset 0 0 0 1px #f4dda2,1px 7px 5px #231911}
.tally-board.tb-lifted .tb-hook:not([data-tally]){border:1px dashed #d7c79f}
.tb-book{
  --tb-paper:#f7efda;--tb-rule:#c6b797;
  width:100%;border:1px solid var(--tb-rule);border-top:none;border-spacing:0;
  background:linear-gradient(95deg,#e7dbc0,var(--tb-paper) 7%,#fbf5e6 97%,#f0e4c9);
  font-size:14px;line-height:1.3;
}
.tb-book caption{
  padding:7px 10px 4px;border:1px solid var(--tb-rule);border-bottom:0;
  color:#443523;background:#f2e8d1;text-align:left;
  font:600 17px/1.2 var(--serif,Georgia,serif);
}
.tb-book caption span{
  display:inline-block;margin-left:8px;color:#65594a;font:italic 13px/1.2 Georgia,serif;
}
.tb-book th,.tb-book td{padding:3px 9px;text-align:center}
.tb-book thead th{
  color:#625447;border-bottom:1px solid #b2a183;font-size:11px;font-weight:650;
}
.tb-book th:first-child{text-align:left}
.tb-book tbody tr+tr>*{border-top:1px solid #b1a38a70}
.tb-book tbody th{font:italic 15px/1.25 Georgia,serif}
.tb-book tbody td{border-left:1px solid #b1a38a70;font:600 15px/1.25 Georgia,serif}
.tally-board .tb-status{margin:10px 0 0;color:#4b4b39;font-size:14px}
.tally-board .tb-status:empty{margin:0}
.tally-board[data-solved=true] .tb-status{font-weight:650;color:#274732}
.tally-board [hidden]{display:none}
@media(max-height:520px) and (min-width:600px){
  .tally-board .tb-evidence{grid-template-columns:1.15fr 1fr;align-items:start;gap:8px}
  .tally-board .tb-rack{padding-inline:3px;gap:0}
  .tb-book caption span{display:block;margin:2px 0 0}
  .tb-book th,.tb-book td{padding-inline:4px}
}
