/* 55-dice.css — v44.5  Nat 1s and nat 20s by player (100-dice-rolls.js)

   Admin's Dice Ledger gains "Who rolled them" under the chart: one row per
   person, the leader in each column in bold. The session form's counters are
   a row per person with − n + for each kind, big enough to tap mid-game. */

.dice-people { margin-top: 12px; border-top: 1px solid rgba(31,22,12,.14); }
.dice-person {
  display: grid; grid-template-columns: minmax(0, 1fr) 56px 56px; align-items: center; gap: 8px;
  min-height: 44px; padding: 4px 2px; border-bottom: 1px solid rgba(31,22,12,.08);
}
.dice-person:last-child { border-bottom: 0; }
.dice-people-head { min-height: 32px; font-size: var(--ui-meta); color: var(--muted); }
.dice-people-head span:not(:first-child) { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; }
.dice-person-who { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.dice-person-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.dice-person-n { display: block; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft, var(--ink)); }
.dice-person-n.is-top { font-weight: 800; color: var(--ink); }
.dice-person-n.dice-n-ones.is-top { color: #8f3b24; }
.dice-person-n.dice-n-twenties.is-top { color: #23703a; }
.dice-person.is-rest .dice-person-name { font-weight: 400; color: var(--muted); font-style: italic; white-space: normal; line-height: 1.2; }
.dice-people-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.dice-people-foot .mobile-note { margin: 0; }

/* The counters (session form, earlier totals). */
.dice-grid { display: flex; flex-direction: column; gap: 2px; }
.dice-grid-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px;
  min-height: 48px; border-bottom: 1px solid rgba(31,22,12,.08);
}
.dice-grid-row:last-child { border-bottom: 0; }
.dice-grid-head { min-height: 24px; font-size: var(--ui-meta); color: var(--muted); border-bottom: 0; }
.dice-grid-head span:not(:first-child) { display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: 104px; }
.dice-grid-row.is-rest .dice-person-name { font-weight: 400; font-style: italic; color: var(--muted); white-space: normal; line-height: 1.2; }
.dice-step { display: inline-grid; grid-template-columns: 34px 36px 34px; align-items: center; width: 104px; }
.dice-step-btn {
  width: 34px; height: 40px; min-width: 0; padding: 0; border: 1px solid rgba(31,22,12,.22); background: transparent;
  color: var(--ink); font-size: 18px; line-height: 1; border-radius: 10px; cursor: pointer;
}
.dice-step-btn:active { background: rgba(193,138,42,.18); }
#modal .dice-step .dice-step-input {
  width: 36px; min-width: 0; height: 40px; min-height: 40px; padding: 0; margin: 0; border: 0; background: transparent;
  text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; -moz-appearance: textfield;
}
.dice-step-input::-webkit-outer-spin-button, .dice-step-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dice-grid-field { grid-column: 1 / -1; }
#sessOnes[readonly], #sessTwenties[readonly] { background: transparent; }

/* v44.12: a person on the ledger opens their sessions. */
.dice-person-open {
  border: 0; background: none; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left;
  min-height: 44px; width: 100%; cursor: pointer;
}
.dice-person-open .dice-person-name { text-decoration: underline; text-decoration-color: rgba(31,22,12,.28); text-underline-offset: 3px; }
.dice-sess-row {
  width: 100%; border: 0; border-bottom: 1px solid rgba(31,22,12,.08); background: none; margin: 0;
  font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 0;
}
.dice-sess-row:active { background: rgba(193,138,42,.12); }
.dice-sess-what { display: flex; flex-direction: column; min-width: 0; }
.dice-sess-date { font-size: var(--ui-meta); color: var(--muted); }
.dice-person-sessions .dice-people { margin-top: 0; border-top: 0; }
