/* Only cash dialogs and their information. No table/seat/card geometry. */
.cash-dialog[hidden], .cash-dialog [hidden],
html.cash-only [data-cash-menu] [hidden] { display: none !important; }
.cash-dialog {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.cash-dialog-card { position: relative; max-height: calc(100dvh - 32px); overflow-y: auto; }
.cash-dialog .ld-title { padding-right: 24px; }
.cash-field { display: grid; gap: 6px; margin: 12px 0; color: var(--text-hi); }
.cash-field .cf-input { width: 100%; box-sizing: border-box; }
.cash-dialog .ld-body { overflow-wrap: anywhere; }
.cash-dialog-status:empty { display: none; }
/* Dialog button groups keep a readable grid in DOM/tab order. */
.cash-dialog .cash-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9em), 1fr));
  gap: 8px;
  margin-top: 16px;
}
.cash-dialog .cash-controls .ld-btn {
  min-height: 44px;
  padding-inline: 12px;
  white-space: nowrap;
  letter-spacing: normal;
}
.cash-menu-group {
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 1vw, 7px);
}
.cash-ledger-scroll { overflow-x: auto; }
.cash-ledger { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.cash-ledger th, .cash-ledger td { padding: 8px 5px; text-align: right; border-bottom: 1px solid var(--border-hi); white-space: nowrap; }
.cash-ledger th:first-child { text-align: left; white-space: normal; overflow-wrap: anywhere; }
.cash-history-list { display: grid; gap: 8px; }
.cash-history-room { display: grid; gap: 4px; text-align: left; }
.cash-history-room .cash-history-time { font-size: var(--fs-sm); font-weight: normal; letter-spacing: normal; overflow-wrap: anywhere; }

/* Same modal tier as the official dialogs, above managed chat/reaction windows. */
html.cash-only #leave-dialog { z-index: 1300; }

/* Restore the original Start button only while the cash controller exposes it. */
html.cash-only #admin-startnobots-btn[data-cash-start-visible="1"],
html.cash-only #admin-startnobots-mob[data-cash-start-visible="1"] { display: inline-flex !important; }
html.cash-only [data-cash-start-visible="0"] { display: none !important; }

/* The cash journal keeps only one hand and one round open while browsing. */
.cash-hand-log {
  overflow-anchor: none;
  overflow-x: hidden;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  --cash-log-surface: var(--chatlog-surface, var(--panel));
  --cash-log-line: var(--chatlog-border, var(--border));
  --cash-log-subtle: var(--chatlog-text2, var(--text));
  --cash-log-tint: color-mix(in srgb, var(--cash-log-surface), var(--info, #416b9a) 9%);
}
.cash-log-hand-block {
  margin-block: 4px 7px;
  overflow: hidden;
  border: 1px solid var(--cash-log-line);
  border-radius: 7px;
  background: var(--cash-log-surface);
}
.cash-log-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 32px;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: start;
  font-size: inherit;
  font-weight: 650;
  cursor: pointer;
}
.cash-log-toggle:focus-visible { outline: 2px solid var(--info, #4174af); outline-offset: -2px; }
.cash-log-hand { min-height: 36px; justify-content: space-between; }
.cash-log-hand > span:first-child { flex-shrink: 0; }
.cash-log-status {
  margin-inline-start: auto;
  color: var(--cash-log-subtle);
  text-align: end;
  overflow-wrap: anywhere;
}
.cash-log-win, .cash-log-emphasis { color: var(--pos, #1c7b46); font-weight: 650; }
.cash-log-chevron {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  margin: 1px 2px 2px 1px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(-45deg);
}
.cash-log-toggle[aria-expanded=true] .cash-log-chevron { transform: rotate(45deg); }
.cash-log-detail { display: grid; gap: 7px; padding: 6px 8px 7px; border-top: 1px solid var(--cash-log-line); }
.cash-log-meta { color: var(--cash-log-subtle); font-size: 11px; overflow-wrap: anywhere; }
.cash-log-board { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; color: var(--cash-log-subtle); }
.cash-log-cards { display: inline-flex; align-items: center; gap: 3px; }
.cash-log-card-gap { margin-inline-start: 4px; }
.cash-log-cards .pk.xsm {
  width: 21px;
  height: 29.4px;
  border-radius: 4px;
  box-shadow: 0 1px 2px #0003;
  font-size: 9px;
}
.cash-log-board .pk.xsm { width: 23px; height: 32.2px; font-size: 10px; }
.cash-log-shown-list { padding: 3px 6px; border-radius: 5px; background: var(--cash-log-tint); }
.cash-log-shown {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(2.5em, auto);
  align-items: center;
  gap: 6px;
  padding: 3px 0;
}
.cash-log-shown span:first-child { overflow-wrap: anywhere; }
.cash-log-shown span:last-child { text-align: end; }
.cash-log-pot-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--cash-log-line);
}
.cash-log-pot-row > :last-child { text-align: end; overflow-wrap: anywhere; }
.cash-log-actions { justify-content: space-between; border-top: 1px solid var(--cash-log-line); }
.cash-log-street-block { border: 1px solid var(--cash-log-line); border-radius: 5px; overflow: hidden; }
.cash-log-street[aria-expanded=true] { background: var(--cash-log-tint); }
.cash-log-street .cash-log-status { white-space: nowrap; font-size: 12px; font-weight: 500; }
.cash-log-action-table {
  width: calc(100% - 12px);
  margin: 2px 6px 4px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px;
}
.cash-log-action-table col:nth-child(2) { width: 5em; }
.cash-log-action-table col:nth-child(3) { width: 5.3em; }
.cash-log-action-table :is(th, td) {
  padding: 4px 3px;
  border-bottom: 1px solid var(--cash-log-line);
  text-align: start;
  overflow-wrap: anywhere;
}
.cash-log-action-table th { color: var(--cash-log-subtle); font-size: 11px; font-weight: 550; }
.cash-log-action-table tr:last-child td { border-bottom: 0; }
.cash-log-action-table :is(th, td):last-child { text-align: end; }
.cash-log-note { margin: 3px 0; padding: 4px; color: var(--cash-log-subtle); overflow-wrap: anywhere; }
.cash-hand-log > .cash-log-scroll-space { padding: 0; border: 0; }
