/* Roomful Charades' pages (/charades/, the rules page and the set pages): the word picker, the word lists, and the printable
   word cards and score sheet. Loaded after site.css and gamenight.css on those pages only (tools/build_charades.py). */

.charades-page ul:not([class]), .charades-page ol.steps { padding-left: 1.3em; }
.charades-page ul:not([class]) li { margin: 6px 0; }

/* ---------- The word picker ---------- */
.picker { margin: 28px 0 10px; padding: 18px 20px 20px; border: 2px solid rgba(255, 246, 229, 0.16); border-radius: 20px; background: var(--night); max-width: 40em; }
.picker h2 { margin-top: 0; }
.picker p { color: var(--paper-dim); }
.picker-options { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 22px; margin: 6px 0 14px; }
.picker-options label[for="pickSet"] { flex-basis: 100%; margin-bottom: -6px; font-weight: 650; }
.picker-options select { min-width: 14em; }
.picker-levels { display: flex; flex-wrap: wrap; gap: 6px 16px; border: 0; margin: 0; padding: 0; }
.picker-levels legend { float: left; margin-right: 6px; font-weight: 650; }
.picker-levels label { display: inline-flex; gap: 6px; align-items: center; min-height: 44px; font-weight: 600; cursor: pointer; } /* a 44 px target (P9) */
.picker-levels input { width: 1.2em; height: 1.2em; }
.picker-card {
  display: grid; place-items: center; width: 100%; min-height: 9.5rem; padding: 18px; box-sizing: border-box;
  border: 3px dashed var(--paper-dim); border-radius: 18px; background: var(--deep); color: var(--paper);
  font: inherit; cursor: pointer; text-align: center;
}
.picker-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.picker-card.shown { border-style: solid; border-color: var(--accent); background: var(--paper); color: var(--ink); }
.picker-cover { font-size: 1.3rem; font-weight: 750; color: var(--paper-dim); }
.picker-word { display: grid; gap: 4px; justify-items: center; }
.picker-word[hidden] { display: none; }
.picker-emoji { font-size: 2.6rem; line-height: 1.1; }
.picker-emoji:empty { display: none; }
.picker-text { font-size: clamp(2rem, 7vw, 3rem); font-weight: 850; line-height: 1.1; overflow-wrap: anywhere; text-wrap: balance; }
.picker-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 14px; }
.picker-left { color: var(--paper-dim); font-size: 0.95rem; }

/* ---------- Word lists ---------- */
.word-list { list-style: none; padding: 0; margin: 10px 0 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.word-list li { display: flex; gap: 8px; align-items: center; background: var(--night); border: 2px solid rgba(255, 246, 229, 0.12); border-radius: 12px; padding: 8px 12px; font-weight: 650; }
.word-list .emoji { font-size: 1.35rem; line-height: 1; }
.print-buttons .btn { white-space: normal; }

/* ---------- Printing: word cards (24 to a US Letter page) and the score sheet. Print only. ---------- */
.print-only { display: none; }
@media print {
  .charades-page main > *:not(.print-only) { display: none !important; }
  .print-only { display: block; }
  .wc-sheet, .score-sheet { display: none; }
  body:not([data-print]) #cards-all, body[data-print="all"] #cards-all, body[data-print="easy"] #cards-easy, body[data-print="sheet"] #sheet { display: block; }
  .wc-page {
    list-style: none; margin: 0 auto; padding: 0; width: 7.7in; height: 10.1in; box-sizing: border-box;
    display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(6, 1fr);
    break-after: page; page-break-after: always;
  }
  .wc-page:last-child { break-after: auto; page-break-after: auto; }
  .wc-page li {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.05in;
    border: 1px dashed #777; margin: -0.5px; padding: 0.1in; text-align: center; overflow: hidden; break-inside: avoid;
  }
  .wc-emoji { font-size: 24pt; line-height: 1; }
  .wc-emoji:empty { display: none; }
  .wc-word { font-size: 15pt; font-weight: 800; line-height: 1.15; color: #111; overflow-wrap: anywhere; }
  .wc-dots { position: absolute; right: 0.08in; bottom: 0.05in; font-size: 7pt; color: #666; letter-spacing: 0.05em; }
  .score-sheet { width: 7.7in; margin: 0 auto; color: #111; }
  .score-sheet h2 { font-size: 20pt; margin: 0 0 0.08in; color: #111; }
  .score-sheet p { font-size: 11pt; margin: 0 0 0.15in; color: #333; }
  .score-sheet table { width: 100%; border-collapse: collapse; font-size: 11pt; }
  .score-sheet th, .score-sheet td { border: 1.5px solid #111; padding: 0.05in; text-align: center; }
  .score-sheet tbody tr { height: 1.6in; }
  .score-sheet .team { width: 1.9in; text-align: left; vertical-align: top; font-weight: 700; }
  .score-sheet .total { width: 0.8in; }
  .score-sheet .sheet-foot { margin-top: 0.15in; font-size: 8pt; color: #666; }
}
