/* Загрузка книги. Отдельный файл: к чату отношения не имеет,
   а переменные темы берёт из style.css. */

.ing {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 60px;
  padding-top: calc(20px + env(safe-area-inset-top));
}

.ing-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.ing-top h1 { margin: 0; font-size: 22px; }

.ing-back { color: var(--accent); text-decoration: none; font-size: 14px; }

.ing-denied {
  max-width: 400px;
  margin: 25dvh auto;
  text-align: center;
  color: var(--text-dim);
}

.ing-denied a { color: var(--accent); }

/* --------------------------------------------------------------- форма */

.ing-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ing-label {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 12px;
}

.ing-label:first-child { margin-top: 0; }

.ing-form input[type="text"],
.ing-form input[type="file"],
.ing-form textarea {
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;   /* меньше — iOS зумит страницу на фокусе */
}

.ing-form textarea { resize: vertical; line-height: 1.5; }

.ing-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.ing-submit {
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  cursor: pointer;
}

.ing-submit:disabled { opacity: .5; cursor: default; }

.ing-progress { font-size: 13px; color: var(--text-dim); }

/* ---------------------------------------------------------------- лог */

.ing-log {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ing-empty { color: var(--text-dim); font-size: 14px; margin: 0; }

.ing-chunk {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--text-dim);
}
.ing-chunk:first-child { margin-top: 0; border-top: 0; padding-top: 0; }

.ing-step {
  display: flex;
  gap: 8px;
  padding: 3px 0;
  font-size: 13px;
  line-height: 1.45;
}

.ing-step .tag {
  flex: none;
  min-width: 64px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding-top: 2px;
  color: var(--text-dim);
}

.ing-step .body { flex: 1; overflow-wrap: anywhere; }

.ing-step.read .tag { color: var(--text-dim); }
.ing-step.read .body { color: var(--text-dim); font-style: italic; }

.ing-step.ask .tag,
.ing-step.ask .body { color: var(--accent); }

.ing-step.recall .tag { color: var(--text-dim); }

.ing-step.note .tag { color: var(--text); }
.ing-step.note.new .tag::after { content: " •новое"; }
.ing-step.note.matched .tag::after { content: " •совпало"; }
.ing-step.note.conflict .tag::after { content: " •спор"; }
.ing-step.note.conflict .body { color: var(--danger); }

.ing-step.error .tag,
.ing-step.error .body { color: var(--danger); }

.ing-result {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-dim);
}
