* {
  font-family: monospace;
  font-size: large;
}

body {
  max-width: 80ch;
  margin: auto;
  padding: 10px;
}

table {
  border-collapse: collapse;
}

/* A row of five cards must never break across lines. */
#lines td,
#lines th,
#discards {
  white-space: nowrap;
}

th,
td {
  border: 1px solid black;
  padding: 4px 8px;
  text-align: left;
}

/* The grid cells are all one card wide, filled or not. */
#grid td {
  text-align: center;
  padding: 4px 6px;
}

/* An empty cell you can place the selected card into. */
#grid td.open {
  cursor: pointer;
  background-color: #eee;
}

#grid td.open:hover {
  background-color: blue;
  color: white;
}

/* The hand table is only for alignment, so it needs no grid lines. */
#handTable td {
  border: none;
  padding: 2px 6px 2px 0;
}

/* Fixed width so selecting a card cannot shift the row. */
.marker {
  display: inline-block;
  width: 1ch;
}

/* Fixed width so the cell reference appearing cannot shift the row. */
.cellref {
  display: inline-block;
  width: 4ch;
}

/* A placed card greys out in place instead of disappearing. */
.placed {
  opacity: 0.45;
}

/* Pad the rank to a fixed width so "10" lines up with "J", keeping the
   card width constant from one hand to the next. */
.rank {
  display: inline-block;
  width: 2ch;
  text-align: right;
}

.red {
  color: red;
}

.slot {
  color: gray;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  color: gray;
}
