/* Drawing a Blank's table (docs/drawing-a-blank.md). It wears Mixed
   Messages's sketch pad (David's call 17b): its tokens
   (mixed-messages/mixed-messages.css) and the pad, the pencil, the dock
   and the canvas (mixed-messages/table.css) load first; this is the board,
   the teams, the turn's end and the gallery. */

/* the teams: their marks, names and squares */
.dabscore { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.dabteam { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: center; padding: 6px 10px; border-radius: 10px; background: var(--chip); border: var(--chip-edge); font-weight: 800; min-width: 0; }
.dabteam > svg { grid-row: span 2; }
.dabteam .n { overflow-wrap: anywhere; line-height: 1.2; }
.dabteam .at { font-size: var(--t-note); font-weight: 600; color: var(--soft); line-height: 1.2; }
.dabteam.up { box-shadow: 0 0 0 2px var(--turn); }

/* the board: a track of squares, each its category's color, the pieces on it */
.dabboard { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 3px; margin-bottom: 12px; }
.dabsq { position: relative; aspect-ratio: 1 / 1; border-radius: 4px; border: 1px solid var(--paper-edge); background: var(--paper-2); display: grid; place-items: center; }
.dabsq.c-things { background: #f6e3a8; }
.dabsq.c-animals { background: #cfe7c4; }
.dabsq.c-food { background: #f6cfc8; }
.dabsq.c-places { background: #cfe0f4; }
.dabsq.c-doing { background: #e4d6f1; }
.dabsq.c-phrases { background: #f1dcc2; }
.dabsq.c-all { background: repeating-linear-gradient(45deg, #f6e3a8 0 4px, #cfe0f4 4px 8px); }
.dabsq.c-start, .dabsq.c-finish { background: var(--ink); }
.dabsq .piece { position: absolute; inset: 0; display: grid; place-items: center; }
/* each category's mark, in pencil over its color (a piece on the square sits over it) */
.dabsq .dabmark { width: 62%; height: 62%; fill: none; stroke: color-mix(in srgb, var(--ink) 62%, transparent); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.dabsq.c-all .dabmark { stroke: var(--ink); }
.dabsq .piece + .piece { inset: auto 0 0 auto; }

/* the turn's end: the word, the stamp, the drawings, the die */
.dabstamp { margin: 0; align-self: flex-start; padding: 4px 12px; border: 3px solid var(--good); color: var(--good); border-radius: 6px; font: 800 18px var(--ui-font); transform: rotate(-3deg); }
.dabstamp.miss { border-color: var(--soft); color: var(--soft); transform: none; }
.dabshownrow { display: grid; gap: 12px; }
.dabshownrow.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.dabshown { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.dabshown figcaption { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.dabshown.won .mmcanvas { box-shadow: 0 0 0 3px var(--good); border-radius: 6px; }
.dabroll { margin: 0; display: flex; align-items: center; gap: 10px; font-weight: 700; }
.dabroll .die { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 7px; border: 2px solid var(--ink); background: #fff; font: 800 20px var(--ui-font); }
.dabgot { min-height: 56px; font-size: 20px; }

/* typed guesses */
.dabguesses { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 120px; overflow-y: auto; font-size: 15px; }
.dabguesses li.right { color: var(--good); font-weight: 800; }
.dabgame .mmguess { flex-direction: row; flex-wrap: wrap; align-items: center; }
.dabgame .mmguess .mmfield { flex: 1; min-width: 0; }
.dabgame .mmguess .dabguesses { flex-basis: 100%; }

/* the gallery at the end */
.dabgallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.dabkept { margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; text-align: center; }
.dabthumb { width: 100%; }
.dabgallery > .btn { grid-column: 1 / -1; justify-self: start; }

/* a laptop: the teams sit over the pad, as wide as it */
@media (min-width: 900px) {
  .dabscore { width: 100%; max-width: 640px; align-self: center; }
}
