/* FreeCell board. Floats, percentages and vw sizes only, so the same layout works
   without Grid, Flex, gap or custom properties (Kobo) and keeps each card's node fixed. */
#deal-label { display: inline-block; margin-right: 8px; white-space: nowrap; font-size: 18px; line-height: 1.3; border: 1px solid #8a6b35; padding: 1px 6px; border-radius: 5px; color: #674c21; background: #f7e8ba; }
.freecell-board { width: 100%; margin: 2px 0 0; padding: 6px 2px 8px; border: 2px solid #45654e; border-radius: 10px; background: #e3ecdf; }
.freecell-board .top-row { margin: 0 0 10px; }
.freecell-board .top-row:after, .freecell-board .tableau:after { content: ""; display: block; clear: both; }
.freecell-board .slots { float: left; width: 50%; }
.freecell-board .slot { float: left; width: 25%; padding: 0 2px; }
.freecell-board .column { float: left; width: 12.5%; min-height: 75vw; padding: 0 2px; }
/* Covered cards show a strip with rank and suit; the last card in a place is full height. */
.freecell-board .card {
  display: block; position: relative; width: 100%; height: 5.4vw; min-height: 0; margin: 0; padding: 0;
  overflow: hidden; text-align: left; border: 2px solid #6d6556; border-bottom-width: 0; border-radius: 7px 7px 0 0;
  color: #222; background: #fffdf7; font: 700 4vw/1 Arial, "Noto Sans TC", sans-serif; cursor: pointer;
}
.freecell-board .card:last-child { height: 16vw; border-bottom-width: 2px; border-radius: 7px; }
.freecell-board .card.red { color: #e00000; }
.freecell-board .corner { display: block; padding: 0.5vw 0 0 0.6vw; white-space: nowrap; }
.freecell-board .rank { display: inline-block; vertical-align: top; letter-spacing: -1px; }
.freecell-board .suit { display: inline-block; vertical-align: top; width: 0.62em; height: 0.62em; margin: 0.1em 0 0 1px; }
.freecell-board .pip { display: block; width: 7vw; height: 7vw; margin: 1.2vw auto 0; }
/* Dark red looked almost black on Kindle color e-paper. Red cards use pure red, and red suits a
   light fill inside a red outline, so color and grayscale screens tell them from solid black suits. */
.freecell-board .card.red svg { fill: #ffaca3; stroke: #e00000; stroke-width: 9px; stroke-linejoin: round; overflow: visible; }
.freecell-board .card.red .suit { stroke-width: 12px; }
.freecell-board .black svg { fill: #222; }
.freecell-board .card.selected { border-color: #254532; background: #d8eadc; box-shadow: inset 0 0 0 2px #254532; }
.freecell-board .slot-empty, .freecell-board .column-empty {
  display: block; width: 100%; height: 16vw; min-height: 0; margin: 0; padding: 0;
  border: 2px dashed #7d9681; border-radius: 7px; background: transparent;
}
.freecell-board .cells .slot-empty { background: #edf3ea; }
.freecell-board .foundations .slot-empty { border-style: solid; background: #f1f4ec; }
.freecell-board .foundations .slot-empty .pip { margin-top: 4.5vw; }
.freecell-board .foundations .red .slot-empty svg { fill: #e3c3bd; }
.freecell-board .foundations .black .slot-empty svg { fill: #bfc6bc; }
.freecell-board .card:focus-visible, .freecell-board .slot-empty:focus-visible, .freecell-board .column-empty:focus-visible { outline: 3px dashed #111; outline-offset: -3px; }
@media (max-width: 480px) {
  .freecell-board .card { height: 26px; font-size: 18px; }
  .freecell-board .card:last-child { height: 16vw; }
  .freecell-board .corner { padding: 3px 0 0 2px; }
}
/* Keep "10" and its suit inside the narrowest cards. */
@media (max-width: 400px) {
  .freecell-board .card { font-size: 16px; }
  .freecell-board .corner { padding-left: 1px; }
  .freecell-board .suit { width: 0.55em; height: 0.55em; margin-left: 0; }
}
@media (min-width: 920px) {
  .freecell-board .column { min-height: 690px; }
  .freecell-board .card { height: 50px; font-size: 37px; }
  .freecell-board .card:last-child, .freecell-board .slot-empty, .freecell-board .column-empty { height: 147px; }
  .freecell-board .corner { padding: 5px 0 0 6px; }
  .freecell-board .pip { width: 64px; height: 64px; margin-top: 11px; }
  .freecell-board .foundations .slot-empty .pip { margin-top: 40px; }
}
