/* Liar's Dice. Layout, toggles and charts come from battleship.css. */

.ld-hands { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .ld-hands { grid-template-columns: 1fr; } }
.ld-dice { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; min-height: 40px; }

.die { width: 40px; height: 40px; flex: none; }
.die rect { fill: #fbfdfc; }
.die circle { fill: #10241d; }
.die.hidden rect { fill: #24506e; stroke: rgba(255, 255, 255, .25); stroke-width: 2; }
.die.hidden text { fill: rgba(255, 255, 255, .7); font: 700 18px var(--font); }
.die.match rect { fill: var(--gold); }
.die.small { width: 22px; height: 22px; }

.ld-bids { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; min-height: 28px; }
.ld-bid {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px 3px 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); font-size: 13px; font-weight: 650;
}
.ld-bid.cpu { background: rgba(243, 201, 105, .16); }
.ld-bid .who { color: var(--ink-dim); font-weight: 600; }

.ld-current {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  margin: 12px 0 4px; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, .22);
  font-size: 15px;
}
.ld-current:empty { display: none; }
.ld-current .big { display: inline-flex; align-items: center; gap: 6px; font-size: 22px; font-weight: 700; }
.ld-current b.mono { font-size: 18px; }

.ld-reveal {
  margin: 12px 0 4px; padding: 14px; border-radius: 12px;
  border: 1px solid var(--gold); background: rgba(243, 201, 105, .08);
  display: grid; gap: 10px;
}
.ld-reveal[hidden] { display: none; }
.ld-reveal button { justify-self: start; }

.ld-grid-head { margin-top: 16px; }
.ld-grid { display: grid; gap: 3px; --face-col: 28px; }
.ld-grid .corner, .ld-grid .qh { font-family: var(--mono); font-size: 12px; color: var(--ink-dim); text-align: center; font-weight: 700; }
.ld-grid .fh { display: grid; place-items: center; }
.ld-grid button {
  padding: 0; height: 34px; border-radius: 6px; font-family: var(--mono); font-size: 12px; font-weight: 700;
  background: var(--water); border: 1px solid var(--water-line);
}
.ld-grid button:disabled { opacity: .28; }
.ld-grid button.dark-ink { color: #1a1206; }
.ld-grid button.current { box-shadow: inset 0 0 0 2px var(--ink); opacity: 1; }
@media (max-width: 560px) {
  .ld-grid { gap: 2px; --face-col: 22px; }
  .ld-grid button { height: 32px; font-size: 11px; letter-spacing: -.02em; }
}

.ld-call { width: 100%; margin-top: 12px; padding: 14px; font-size: 17px; }

.ld-small { font-size: 13px; margin: 6px 0 10px; line-height: 1.45; }
.ld-read { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 10px; align-items: center; font-size: 13px; }
.ld-read .track { height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .07); overflow: hidden; position: relative; }
.ld-read .fill { height: 100%; background: var(--s-posterior); border-radius: 5px; transition: width .35s ease; }
.ld-read .base { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--s-prior); }
.ld-read .mono { text-align: right; }

/* The dice odds: P(q) and P'(q) for the face in play. */
.ld-odds { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.ld-odds[hidden] { display: none; }
.ld-formula { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 8px 0 6px; font-family: var(--mono); font-size: 14px; }
.ld-formula small { font-family: var(--font); color: var(--ink-dim); margin-left: 6px; }
.table-scroll { overflow-x: auto; }
.ld-odds-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; margin-top: 6px; }
.ld-odds-table th, .ld-odds-table td { padding: 5px 8px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ld-odds-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-dim); font-weight: 700; }
.ld-odds-table th:first-child, .ld-odds-table td:first-child { text-align: left; }
.ld-odds-table td.bar-cell { width: 34%; }
.ld-odds-table .pbar { height: 8px; border-radius: 0 4px 4px 0; background: var(--s-prior); min-width: 1px; }
.ld-odds-table tr.need td { background: rgba(243, 201, 105, .12); font-weight: 700; }
.ld-odds-table tr.need td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
