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(4, 1fr); gap: 0.5em; }
.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.dragon { border-color: #c00; }
.spot.tiger { border-color: #c90; }
.spot.tie { border-color: #090; }
.spot.suited-tie { border-color: #069; }

.deal-slot { text-align: center; }
.deal-label { font-weight: bold; margin-bottom: 0.25em; }
.card-slot { display: inline-block; min-width: 3em; padding: 0.4em 0.6em; border: 1px solid #999; border-radius: 4px; font-family: monospace; font-size: 1.4em; background: #fff; }
.card-slot.red { color: #c00; }
.result-banner { margin-top: 0.5em; padding: 0.5em; border: 1px solid #999; border-radius: 4px; background: #fff8e0; font-weight: bold; }
.result-banner.suited { background: #e0f0ff; }

.road-block { flex: 1; min-width: 12em; }
.road-title { font-weight: bold; margin-bottom: 0.25em; }
.road-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(6, 1.4em); gap: 2px; overflow-x: auto; background: #f8f8f8; border: 1px solid #ddd; padding: 2px; min-height: 9em; }
.road-grid.small { grid-template-rows: repeat(3, 1.2em); min-height: 4em; }
.road-cell { width: 1.4em; height: 1.4em; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7em; color: #fff; }
.road-grid.small .road-cell { width: 1.2em; height: 1.2em; }
.road-cell.dragon { background: #c00; }
.road-cell.tiger { background: #dba500; }
.road-cell.tie { background: #090; }
.road-cell.red { background: #c00; }
.road-cell.blue { background: #069; }

.outcome-won { color: #060; font-weight: bold; }
.outcome-lost { color: #900; }
.outcome-push { color: #666; }
.outcome-half { color: #b36b00; font-weight: bold; }

#logBox { background: #111; color: #eee; padding: 0.5em; max-height: 14em; overflow: auto; font-size: 0.8em; }
