/* Mexican Train Dominoes, a Parlor and Play section.
   Domino score keeper styles, built on the house palette and type:
   pine #1E3A2F, brass #B08A3C, sand #E7DCC3, cream #FAF5EA.
   Fraunces for display, Inter for body (loaded per page).
   The keeper is read across a table, so its type runs large and its
   tap targets run larger than a normal web form. */

.keeper {
  background: var(--paper);
  border: 1px solid var(--sand-line);
  padding: 22px 20px 26px 20px;
  margin: 0 0 22px 0;
  font-size: 1.12rem;
}
.keeper .btn {
  cursor: pointer;
  font-family: inherit;
  min-height: 54px;
  padding: 12px 22px;
  font-size: 1.05rem;
}
.keeper .btn[disabled] { opacity: 0.45; cursor: default; }

.welcome {
  border-left: 5px solid var(--pine);
  background: rgba(30, 58, 47, 0.06);
  padding: 12px 16px;
  margin: 0 0 16px 0;
}
.welcome p { margin: 0 0 8px 0; }
.welcome p:last-child { margin-bottom: 0; }

/* Setup */
.segrow { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 16px 0; }
.segbtn {
  font: inherit; font-size: 1.1rem; font-weight: 600;
  min-height: 54px; padding: 12px 20px;
  background: #fff; color: var(--pine);
  border: 1px solid var(--sand-line); border-radius: 2px;
  cursor: pointer;
}
.segbtn[aria-pressed="true"] {
  background: var(--pine); color: var(--cream); border-color: var(--pine);
}

.field { margin: 0 0 16px 0; }
.field label, .field .flabel {
  display: block; font-weight: 600; color: var(--pine); margin-bottom: 6px;
}
.field select {
  font: inherit; font-size: 1.1rem;
  min-height: 52px; padding: 10px 12px;
  border: 1px solid var(--sand-line); background: #fff; color: var(--ink);
  border-radius: 2px; max-width: 100%;
}
.field select[disabled] { opacity: 0.55; }

.namegrid { display: grid; gap: 10px; margin: 6px 0 4px 0; }
@media (min-width: 640px) { .namegrid { grid-template-columns: 1fr 1fr; } }
.namegrid .namefield label {
  display: block; font-size: 0.92rem; font-weight: 600; color: var(--muted); margin-bottom: 4px;
}
.name-input {
  width: 100%; font: inherit; font-size: 1.15rem;
  min-height: 52px; padding: 10px 12px;
  border: 1px solid var(--sand-line); background: #fff; color: var(--ink);
  border-radius: 2px;
}

.startline {
  font-size: 1.08rem; color: var(--pine); font-weight: 600;
  background: rgba(176, 138, 60, 0.08);
  border-left: 5px solid var(--brass);
  padding: 10px 14px; margin: 0 0 16px 0;
}

.toggleline { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 18px 0; }
.toggleline input[type="checkbox"] {
  width: 28px; height: 28px; margin-top: 2px; flex: 0 0 auto;
  accent-color: var(--pine);
}
.toggleline label { font-weight: 600; color: var(--pine); cursor: pointer; }
.toggleline .hint { display: block; font-weight: 400; color: var(--muted); font-size: 0.95rem; }

/* Game screen */
.roundhead {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.7rem; font-weight: 600; color: var(--pine);
  margin: 0 0 6px 0;
}
.roundmsg {
  border-left: 5px solid var(--brass);
  background: rgba(176, 138, 60, 0.07);
  padding: 10px 14px; margin: 10px 0 16px 0; min-height: 1.2em;
}
.roundmsg p { margin: 0; }

.entryrows { display: grid; gap: 12px; margin: 0 0 16px 0; }
.entryrow {
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center;
  border: 1px solid var(--sand-line); background: #fff;
  padding: 12px 14px;
}
.entryrow .entryname {
  font-weight: 700; color: var(--pine); font-size: 1.2rem;
  flex: 1 1 130px;
}
.pip-input {
  width: 132px; font: inherit; font-size: 1.6rem; font-weight: 600;
  min-height: 58px; padding: 8px 12px;
  border: 1px solid var(--sand-line); background: #fff; color: var(--ink);
  border-radius: 2px;
}
.blanklab {
  display: flex; gap: 8px; align-items: center;
  font-size: 0.98rem; color: var(--ink); cursor: pointer;
  min-height: 48px;
}
.blanklab input[type="checkbox"] { width: 26px; height: 26px; accent-color: var(--pine); }

.totalsbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px 0; }
.totalchip {
  border: 1px solid var(--sand-line); background: var(--cream);
  padding: 8px 14px; border-radius: 999px;
  font-size: 1.05rem; color: var(--ink);
}
.totalchip .totalnum {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.65rem; font-weight: 600; color: var(--pine);
  margin-left: 6px; vertical-align: -2px;
}
.totalchip.leader { border-color: var(--brass); background: rgba(176, 138, 60, 0.14); }
.totalchip .leadtag {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--brass); margin-left: 6px;
}

.roundlist { display: grid; gap: 8px; margin: 0 0 8px 0; }
.roundrow {
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center;
  border: 1px solid var(--sand-line); background: #fff;
  padding: 10px 14px; font-size: 1rem;
}
.roundrow .rlabel { font-weight: 700; color: var(--pine); }
.roundrow .rscores { color: var(--muted); }
.roundrow .rwinner { color: var(--pine); font-weight: 600; }
.editbtn {
  font: inherit; font-size: 0.95rem; font-weight: 600;
  min-height: 48px; padding: 8px 16px; margin-left: auto;
  background: transparent; color: var(--pine);
  border: 1px solid var(--sand-line); border-radius: 2px; cursor: pointer;
}
.editbtn:hover { border-color: var(--brass); }

/* Finish */
.winnerbanner {
  background: var(--pine); color: var(--cream);
  padding: 20px 22px; margin: 18px 0 16px 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.55rem; font-weight: 600; line-height: 1.3;
}
.dtable { border-collapse: collapse; width: 100%; margin: 0 0 14px 0; font-size: 1.05rem; }
.dtable th, .dtable td {
  text-align: left; padding: 9px 12px;
  border-bottom: 1px solid var(--sand-line);
}
.dtable th { color: var(--pine); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; }
.dtable .bignum {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem; font-weight: 600; color: var(--pine);
}

/* Table Pro area */
.proarea {
  background: var(--paper);
  border: 1px solid var(--sand-line);
  padding: 22px 20px;
  margin: 0 0 22px 0;
}
.proarea h3 { margin-top: 1.2em; }
.proarea h3:first-child { margin-top: 0; }
.grouprow, .historyrow {
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center;
  border: 1px solid var(--sand-line); background: #fff;
  padding: 10px 14px; margin: 0 0 8px 0;
}
.grouprow .gname { font-weight: 700; color: var(--pine); }
.grouprow .gplayers { color: var(--muted); }
.historyrow .hdate { font-weight: 700; color: var(--pine); }
.inlinerow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 12px 0; }
.inlinerow input[type="text"], .inlinerow input[type="email"] {
  font: inherit; font-size: 1.05rem;
  min-height: 52px; padding: 10px 12px;
  border: 1px solid var(--sand-line); background: #fff; color: var(--ink);
  border-radius: 2px; flex: 1 1 220px;
}
.inlinerow select {
  font: inherit; font-size: 1.05rem;
  min-height: 52px; padding: 10px 12px;
  border: 1px solid var(--sand-line); background: #fff; color: var(--ink);
  border-radius: 2px;
}
.restoremsg { min-height: 1.2em; color: var(--pine); font-weight: 600; }

/* Large print display mode (Table Pro): the whole keeper scales up so
   the running totals can be read from the far side of the table. */
.keeper.largeprint { font-size: 1.45rem; }
.keeper.largeprint .roundhead { font-size: 2.3rem; }
.keeper.largeprint .pip-input { font-size: 2.1rem; width: 168px; min-height: 72px; }
.keeper.largeprint .entryrow .entryname { font-size: 1.6rem; }
.keeper.largeprint .totalchip .totalnum { font-size: 2.4rem; }
.keeper.largeprint .btn { min-height: 64px; font-size: 1.25rem; }
.keeper.largeprint .winnerbanner { font-size: 2.1rem; }
.keeper.largeprint .dtable .bignum { font-size: 2rem; }

/* Domino faces and trains (Mexican Train 101 lesson, October 2026) */
.doms { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; align-items: center; }
.dom {
  display: inline-flex; flex-direction: row; padding: 0;
  background: linear-gradient(180deg, #fffdf6, #f3ecd9);
  border: 1px solid #c9bd9d; border-bottom-width: 3px; border-radius: 7px;
  font: inherit; color: var(--ink);
}
.dom .half {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  position: relative;
}
.dom .half + .half { border-left: 1px solid #c9bd9d; }
.dom.v { flex-direction: column; }
.dom.v .half + .half { border-left: none; border-top: 1px solid #c9bd9d; }
button.dom { cursor: pointer; min-height: 48px; }
button.dom:hover { border-color: var(--brass); }
button.dom.selected { border-color: var(--pine); box-shadow: 0 4px 0 rgba(30,58,47,0.35); transform: translateY(-3px); }
button.dom[disabled] { cursor: default; opacity: 0.8; }
.dpips { display: grid; grid-template-columns: repeat(3, 7px); grid-template-rows: repeat(3, 7px); gap: 2px; }
.dpips i { width: 7px; height: 7px; border-radius: 50%; background: transparent; }
.dpips i.on { background: var(--pine); }
.dpips i.on.red { background: #A62B1F; }
.dnum { font-family: "Fraunces", Georgia, serif; font-size: 1.25rem; font-weight: 600; color: var(--pine); }
.dom.back { background: var(--pine); border-color: var(--pine-dark); }
.dom.back .half { color: var(--sand); font-family: "Fraunces", Georgia, serif; font-size: 1.1rem; }
.trainline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.trainlabel { font-weight: 700; color: var(--pine); min-width: 118px; }
.marker {
  display: inline-block; background: #A62B1F; color: #fff; border-radius: 999px;
  padding: 2px 12px; font-size: 0.85rem; font-weight: 700;
}
.enginenote { font-size: 0.95rem; color: var(--muted); }
.dom.right { outline: 2px solid var(--pine); outline-offset: 1px; }
.dom.wrong { outline: 2px solid #A62B1F; outline-offset: 1px; }
