body { font-family: system-ui, -apple-system, sans-serif; margin: 0 1em; color: #222; }
h1 { margin: 0.5em 0; }
h2 { border-bottom: 1px solid #ccc; padding-bottom: 0.25em; margin-top: 1em; }
h3 { margin: 0.75em 0 0.25em; }
header { background: #f4f4f4; padding: 0.5em; }
section { margin: 1em 0; }
.row { display: flex; gap: 0.75em; align-items: center; flex-wrap: wrap; margin: 0.5em 0; }
label { display: flex; gap: 0.25em; align-items: center; }
button { padding: 0.3em 0.8em; cursor: pointer; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
table { border-collapse: collapse; width: 100%; font-size: 0.9em; }
th, td { border: 1px solid #ddd; padding: 0.25em 0.5em; text-align: left; }

.chips { display: flex; gap: 0.25em; }
.chips button { border-radius: 50%; width: 2.4em; height: 2.4em; padding: 0; border: 2px solid #999; background: #fff; }
.chips button.selected { border-color: #ffaa00; background: #fff4d6; font-weight: bold; }

.spots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5em; max-width: 30em; }
.spot { border: 1px solid #999; border-radius: 6px; padding: 0.5em; text-align: center; background: #fafafa; cursor: pointer; }
.spot:hover { background: #eef; }
.spot .spot-label { font-weight: bold; }
.spot .spot-pays { color: #666; font-size: 0.85em; }
.spot .spot-total { margin-top: 0.4em; font-family: monospace; }
.spot.ante { border-color: #069; }
.spot.bonus { border-color: #906; }

.traffic-light { display: flex; gap: 0.3em; align-items: center; background: #222; padding: 0.3em; border-radius: 1em; }
.light { width: 1em; height: 1em; border-radius: 50%; background: #444; display: inline-block; }
.light.red.on { background: #d00; box-shadow: 0 0 6px #d00; }
.light.amber.on { background: #e90; box-shadow: 0 0 6px #e90; }
.light.green.on { background: #0a0; box-shadow: 0 0 6px #0a0; }

.strength-meter { display: flex; gap: 0.2em; }
.strength-seg { width: 2em; height: 1em; background: #eee; border: 1px solid #ccc; }
.strength-seg.filled-weak { background: #c00; }
.strength-seg.filled-mid { background: #e90; }
.strength-seg.filled-strong { background: #0a0; }

.card-row { display: flex; gap: 0.3em; min-height: 2.6em; }
.deal-slot { text-align: center; }
.deal-label { font-weight: bold; margin-bottom: 0.25em; }
.card-slot { display: inline-flex; align-items: center; justify-content: center; min-width: 2.2em; padding: 0.4em 0.5em; border: 1px solid #999; border-radius: 4px; font-family: monospace; font-size: 1.3em; background: #fff; }
.card-slot.red { color: #c00; }
.card-slot.empty { color: #bbb; border-style: dashed; }
.card-slot.back { background: repeating-linear-gradient(45deg, #244, #244 4px, #366 4px, #366 8px); color: #fff; border-color: #123; }
.result-banner { margin-top: 0.5em; padding: 0.5em; border: 1px solid #999; border-radius: 4px; background: #fff8e0; font-weight: bold; }

.stat-block { min-width: 12em; }
.stat-title { font-weight: bold; margin-bottom: 0.25em; }

.results-strip { display: flex; gap: 0.3em; flex-wrap: wrap; min-height: 2.4em; background: #f8f8f8; border: 1px solid #ddd; padding: 0.4em; overflow-x: auto; }
.strip-chip { width: 1.8em; height: 1.8em; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85em; font-weight: bold; color: #fff; }
.strip-chip.p { background: #0a0; }
.strip-chip.d { background: #c00; }
.strip-chip.t { background: #666; }

.bet-stats { display: flex; flex-direction: column; gap: 0.4em; }
.bet-stat-row { display: flex; align-items: center; gap: 0.5em; }
.bet-stat-label { width: 4em; font-weight: bold; font-size: 0.85em; }
.bet-stat-bar { flex: 1; height: 1em; background: #eee; border: 1px solid #ddd; border-radius: 3px; overflow: hidden; }
.bet-stat-fill { height: 100%; }
.bet-stat-fill.ante { background: #069; }
.bet-stat-fill.bonus { background: #906; }
.bet-stat-fill.play { background: #0a0; }
.bet-stat-fill.fold { background: #c00; }
.bet-stat-pct { width: 3.5em; text-align: right; font-family: monospace; }

.outcome-won { color: #060; font-weight: bold; }
.outcome-lost { color: #900; }
.outcome-push { color: #666; }
.outcome-halflost { color: #b36b00; font-weight: bold; }

#logBox { background: #111; color: #eee; padding: 0.5em; max-height: 14em; overflow: auto; font-size: 0.8em; }
