/* Gap-fill maker. Phone first: the article frame is 311 px on a phone and 700 px on a computer. */

h1 { font-size: 1.25rem; }
h2 { font-size: 1.0625rem; margin: 0 0 10px; }
textarea {
  width: 100%; min-height: 9rem; padding: 10px 12px; font: inherit; font-size: 0.9375rem; line-height: 1.45;
  color: var(--text); border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; resize: vertical;
}
.modes { display: grid; gap: 0 10px; }
.options { display: grid; gap: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9375rem; cursor: pointer; }
.check input { margin: 4px 0 0; flex: none; accent-color: var(--accent); }

.click-panel { margin: 0 0 18px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.click-line { margin: 0 0 8px; line-height: 2; overflow-wrap: anywhere; }
.word {
  padding: 1px 3px; margin: 0; border: 1px solid transparent; border-radius: 4px; background: var(--accent-soft);
  font: inherit; color: var(--text); cursor: pointer; line-height: 1.5; max-width: 100%; overflow-wrap: anywhere;
}
.word.on { background: var(--accent); color: #fff; }
.fixed { color: var(--muted); }

.out { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.note { margin: 0 0 10px; padding: 10px 12px; border-radius: 8px; background: #fff4e5; color: #7a4100; font-size: 0.9375rem; }
.speaker { font-weight: 600; }
.sheet-line { margin: 0 0 8px; overflow-wrap: anywhere; }
.blank { white-space: nowrap; font-weight: 600; color: var(--accent); }
.box { margin: 0 0 12px; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 8px; line-height: 2; }
.box-title { font-weight: 700; margin-right: 6px; }
.box-word { display: inline-block; margin-right: 10px; white-space: nowrap; }
.key-title { margin-top: 18px; }
.key { margin: 0; padding-left: 1.4rem; }
.key li { margin: 0 0 4px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 16px; }
.actions .button { border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.button.secondary { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
.copied { font-size: 0.875rem; color: var(--muted); }
.length { margin: 12px 0 0; font-size: 0.9375rem; color: var(--muted); }
.cta { margin: 18px 0 0; }
/* The text Copy reads, kept out of sight. */
.copy-source { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; min-height: 0; opacity: 0; }

[hidden] { display: none !important; }

@media (min-width: 600px) {
  h1 { font-size: 1.375rem; }
  .modes { grid-template-columns: 1fr 1fr; }
}

/* Print: the worksheet and the key, nothing else; the key on its own page. */
@media print {
  .no-print, .copy-source { display: none !important; }
  .tool, .out { border: 0; padding: 0; background: #fff; }
  .blank { color: #000; }
  .key-title { break-before: page; }
}
