﻿:root {
  --bg: #f4f2eb;
  --card: #fffdf8;
  --ink: #202124;
  --accent: #1f6f78;
  --muted: #616161;
  --line: #dfd9c9;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "Arial", sans-serif;
  background: radial-gradient(circle at top right, #e8efe6 0%, var(--bg) 50%);
  color: var(--ink);
}
.container {
  max-width: 860px;
  margin: 32px auto;
  padding: 0 16px 40px;
}
h1 { margin-bottom: 8px; }
.subtitle { color: var(--muted); margin-top: 0; }
.hint {
  margin: 6px 0 8px;
  color: var(--muted);
  font-size: 14px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin: 14px 0;
}
input[type="file"], input, select {
  width: 100%;
  margin: 8px 0;
  border: 1px solid #c8c8c8;
  padding: 10px;
  border-radius: 6px;
  background: #fff;
}
button {
  background: var(--accent);
  color: white;
  border: 0;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-compact {
  padding: 0 12px;
  font-size: 13px;
  line-height: 1;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hidden {
  display: none;
}

#readBookBtn {
  margin-top: 8px;
}
.result {
  margin-top: 10px;
  white-space: pre-wrap;
  font-size: 14px;
}
.suggestions {
  margin: 8px 0 0;
  padding-left: 18px;
}
.suggestions li {
  margin: 4px 0;
}
.quote {
  padding: 8px;
  border-left: 3px solid var(--accent);
  background: #f8faf8;
  margin: 8px 0;
}

.quote-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-start;
}

.quote-actions .btn-compact {
  width: fit-content;
  min-width: 0;
  padding: 0 10px;
  white-space: nowrap;
}

.reader-container {
  max-width: 1100px;
}

.reader-toolbar {
  display: flex;
  gap: 8px;
  margin: 8px 0 12px;
}

.reader-text {
  background: #fbfbfb;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  padding: 14px;
  max-height: 72vh;
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: 16px;
}

.reader-hit {
  background: #ffe88a;
  color: #2d2400;
  padding: 0 2px;
  border-radius: 3px;
}

.pager {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.pager button:disabled {
  opacity: 0.45;
  cursor: default;
}

.inline-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}

.inline-controls select,
.inline-controls button {
  margin: 0;
}

.inline-controls select {
  height: 42px;
}

.inline-controls .btn-compact {
  height: 34px;
  white-space: nowrap;
}

label {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}
