/* Ebooks and comics: the text bench (src/text/text.css) with a file in and a
   book, a reader or a download out. Loaded only on /ebook-tools/ pages. */

body[data-scope="ebook"] main { grid-template-columns: 232px minmax(0, 1fr); align-items: stretch; }
body[data-scope="ebook"] main > .sidenav { align-self: start; }
@media (max-width: 1200px) { body[data-scope="ebook"] main { grid-template-columns: 208px minmax(0, 1fr); } }
@media (max-width: 860px) { body[data-scope="ebook"] main { grid-template-columns: 1fr; } }
body[data-scope="ebook"] .tb-dot { background: var(--kind-ebook); box-shadow: 0 0 0 4px var(--kind-ebook-soft); }

/* A file goes in, so the drop box is small and the result gets the room. */
body[data-scope="ebook"] .tb[data-layout="side"] .tb-panes:has(.tb-in) { grid-template-columns: minmax(240px, 0.6fr) minmax(0, 1.6fr); }
@media (max-width: 1000px) {
  body[data-scope="ebook"] .tb[data-layout="side"] .tb-panes:has(.tb-in) { grid-template-columns: minmax(0, 1fr); }
}
body[data-scope="ebook"] .tb-custom-out { max-height: none; }

/* Shared pieces for the ebook tools: a book card, a details form, a report. */
.eb-card { display: flex; gap: 18px; align-items: flex-start; }
.eb-cover { width: 120px; flex: none; border-radius: 6px; box-shadow: 0 6px 18px rgba(35, 33, 29, .18); background: var(--panel-2); }
.eb-meta h3 { margin: 0 0 4px; font-size: 19px; line-height: 1.25; }
.eb-meta p { margin: 0 0 4px; color: var(--text-2); font-size: 14px; }
.eb-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.eb-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-top: 16px; }
.eb-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.eb-form .eb-wide { grid-column: 1 / -1; }
.eb-form input, .eb-form textarea, .eb-form select {
  font: inherit; font-weight: 400; font-size: 14px; color: var(--text); padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
}
.eb-form textarea { min-height: 90px; resize: vertical; }
@media (max-width: 640px) { .eb-form { grid-template-columns: 1fr; } }
.eb-report { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; }
.eb-report li { padding: 8px 12px; border-radius: 10px; background: var(--panel-2); }
.eb-report li.is-fix { background: #e7f3e9; color: #1d5c2a; }
.eb-report li.is-warn { background: #fdf1df; color: #7a4a00; }
.eb-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin-top: 14px; }
.eb-pages figure { margin: 0; font-size: 11px; color: var(--muted); text-align: center; }
.eb-pages img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; background: var(--panel-2); display: block; margin-bottom: 4px; }
