/* Sealed Draw — generator, reveal, and key-maker styles.
   kit/base.css carries the house language; this adds only what the three
   functional pages need. No new palette: --readout-warn is the
   dark-surface rendering of the kit's --warn, the treatment base.css
   already applies to --pass and --fail inside the readout. */

:root {
  --readout-warn: #ffc46b;
}

.readout .r-value.warn { color: var(--readout-warn); }

/* ---------- Roster ---------- */

.roster {
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.5;
  width: 100%;
  min-height: 9.5rem;
  resize: vertical;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
}

.field-help {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: 0.35rem 0 0;
}

.field-label {
  display: block;
  font-weight: 620;
  font-size: 0.92rem;
  margin: 0 0 0.3rem;
}

/* ---------- Rule builder ---------- */

.rule-group { margin: 1.1rem 0 0; }

.rule-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0.4rem 0;
}

.rule-row input[type="text"] { flex: 1 1 11rem; min-width: 0; }

.rule-row .drop-rule {
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
}

.rule-row .drop-rule:hover { border-color: var(--fail); color: var(--fail); }

.unmatched {
  font-size: 0.8rem;
  color: var(--fail);
  flex-basis: 100%;
  margin: 0;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.88rem;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}

/* ---------- Mode + budget ---------- */

.mode-set {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  margin: 1.1rem 0 0;
}

.mode-set legend {
  font-weight: 620;
  font-size: 0.92rem;
  padding: 0 0.35rem;
}

.mode-opt { display: block; margin: 0.35rem 0; font-size: 0.92rem; }
.mode-opt .sub { display: block; color: var(--ink-soft); font-size: 0.85rem; margin-left: 1.5rem; }

.budget {
  margin: 0.9rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.budget-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
  margin: 0.25rem 0;
  max-width: 22rem;
}

.budget-bar > span {
  display: block;
  height: 100%;
  background: var(--accent);
  width: 0;
}

.budget.over .budget-bar > span { background: var(--fail); }
.budget.over { color: var(--fail); }

/* ---------- Send list ---------- */

.send-list { list-style: none; padding: 0; margin: 0.75rem 0 0; }

.send-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.7rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 0.55rem 0.7rem;
  margin: 0.35rem 0;
}

.send-row .who { font-weight: 640; flex: 1 1 9rem; min-width: 0; overflow-wrap: anywhere; }

.send-row .masked {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
  flex: 1 1 15rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.send-row .fp {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  color: var(--ink-soft);
}

.send-row .btn { font-size: 0.82rem; padding: 0.32rem 0.65rem; }

.send-row .tick {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--pass);
  min-width: 3.6rem;
}

.send-row.sent { background: var(--pass-soft); }

/* ---------- Reveal (/open/) ---------- */

/* Fixed height from first paint: this is the page where a layout jump
   lands under the reader's thumb. */
.reveal-area {
  min-height: 12rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 1.1rem;
  text-align: center;
}

.reveal-for {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0 0 0.75rem;
}

.reveal-name {
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  font-weight: 780;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0.2rem 0;
  overflow-wrap: anywhere;
}

.reveal-meta { font-size: 0.9rem; color: var(--ink-soft); margin: 0.5rem 0 0; }

.paste-box {
  font-family: var(--mono);
  font-size: 0.85rem;
  width: 100%;
  min-height: 4.5rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  resize: vertical;
}

/* ---------- Key maker (/code/) ---------- */

.code-out {
  font-family: var(--mono);
  font-size: 0.85rem;
  word-break: break-all;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.6rem 0.7rem;
  margin: 0.4rem 0;
}

/* ---------- Paper slips ----------
   Screen-hidden, populated only when the organizer asks to print, and
   emptied again on afterprint. The one path that puts the mapping on a
   surface, open for exactly as long as the print dialog is. */

.paper { display: none; }

@media print {
  /* Hide MAIN, not a list of its children. #paper lives outside main, so
     this leaves exactly the sheet on the page. Naming children instead
     left #results — the send list, every masked link, the draw ID — on
     the printout beside the fold-over slips, and any section added later
     would have joined it silently.

     Scoped to .prints-sheets, which only the generator sets. draw.css is
     also loaded by /open/ and /code/, and neither has a #paper container:
     an unscoped rule turned Ctrl-P on the key maker into a blank sheet,
     on the page that tells a participant to save their keep link (red
     team, 2026-08-05). */
  .prints-sheets .site-header, .prints-sheets .site-footer,
  .prints-sheets main { display: none !important; }

  .prints-sheets .paper { display: block; }

  .slip {
    border: 1px dashed #888;
    padding: 8mm 8mm 14mm;
    margin: 0 0 6mm;
    break-inside: avoid;
    page-break-inside: avoid;
    font-family: var(--sans);
  }

  .slip .slip-for { font-size: 16pt; font-weight: 700; }
  .slip .slip-fold {
    border-top: 1px dashed #888;
    margin: 6mm 0 0;
    padding: 4mm 0 0;
    font-size: 9pt;
    color: #444;
  }
  .slip .slip-gives { font-size: 14pt; font-weight: 700; color: #000; }
}
