/* Палитра Claude: сливочный фон, чернильный текст, одна терракотовая кнопка.
   Тёмная тема — по системной настройке. Крупные элементы, одна колонка. */
:root {
  --bg: #FAF9F5;
  --fg: #141413;
  --muted: #6E6D66;
  --card: #F0EEE6;
  --card-border: #E0DED4;
  --bar: #D3D0C4;
  --accent: #B85635;
  --accent-fg: #FFFFFF;
  --accent-sub: rgba(255, 255, 255, 0.94);
  --ok: #3B6D11;
  --danger: #A32D2D;
  --install: #2F7D4F;
  --install-fg: #FFFFFF;
  --hint-bg: #FAEEDA;
  --hint-fg: #633806;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #262624;
    --fg: #E5E4DF;
    --muted: #A9A79F;
    --card: #30302E;
    --card-border: #45443F;
    --bar: #4A4944;
    --accent: #D97757;
    --accent-fg: #141413;
    --accent-sub: rgba(20, 20, 19, 0.78);
    --ok: #97C459;
    --danger: #F09595;
    --install: #3B6D11;
    --install-fg: #FFFFFF;
    --hint-bg: #633806;
    --hint-fg: #FAEEDA;
  }
}

* { box-sizing: border-box; }
html { color-scheme: light dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 20px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}
main { max-width: 560px; margin: 0 auto; padding: 20px 16px 40px; }
.screen { display: flex; flex-direction: column; gap: 16px; }
.big { font-size: 26px; margin: 24px 0 0; }
[hidden] { display: none !important; }

.hint {
  background: var(--hint-bg); color: var(--hint-fg);
  padding: 14px 16px; font-size: 19px; text-align: center;
}

.book { display: flex; gap: 14px; align-items: center; }
.book img { width: 96px; height: 96px; border-radius: 14px; object-fit: cover; flex: none; background: var(--bar); }
.book-title {
  font-family: Georgia, "Noto Serif", "Times New Roman", serif; font-size: 20px; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.book-author { color: var(--muted); font-size: 16px; margin-top: 3px; }

button {
  font: inherit; color: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: transform 0.12s ease, filter 0.12s ease;
}
button:active { transform: scale(0.98); filter: brightness(0.92); }
@media (prefers-reduced-motion: reduce) { button { transition: none; } button:active { transform: none; } }

.play {
  display: flex; align-items: center; gap: 20px;
  width: 100%; min-height: 128px; padding: 20px 24px;
  border: 0; border-radius: 22px;
  background: var(--accent); color: var(--accent-fg);
  text-align: left;
}
.play-icon { width: 44px; height: 44px; flex: none; position: relative; }
.play-icon svg {
  width: 44px; height: 44px; display: block; fill: currentColor;
  position: absolute; inset: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.play .icon-pause { opacity: 0; transform: scale(0.7); }
.play.playing .icon-pause { opacity: 1; transform: scale(1); }
.play.playing .icon-play { opacity: 0; transform: scale(0.7); }
.play-label { display: flex; flex-direction: column; gap: 4px; }
.play-label b { font-size: 30px; font-weight: 500; }
.play-label small { font-size: 19px; color: var(--accent-sub); }

.chapter-title { font-size: 18px; color: var(--muted); min-height: 1.4em; }

/* Ползунок: тонкая полоса, но зона касания 40px; перемотка применяется при отпускании. */
.progress .seek { padding: 14px 0; margin: -14px 0; touch-action: none; cursor: pointer; }
.progress .bar { position: relative; height: 12px; border-radius: 6px; background: var(--bar); }
.progress #bar-fill { height: 100%; width: 0; border-radius: 6px; background: var(--accent); transition: width 0.3s linear; }
.progress .thumb {
  position: absolute; top: 50%; left: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--bg); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transform: translate(-50%, -50%); transition: left 0.3s linear, transform 0.12s ease;
}
.progress .seek.dragging #bar-fill, .progress .seek.dragging .thumb { transition: none; }
.progress .seek.dragging .thumb { transform: translate(-50%, -50%) scale(1.2); }
@media (prefers-reduced-motion: reduce) { .progress #bar-fill, .progress .thumb { transition: none; } }
.progress .times { display: flex; justify-content: space-between; font-size: 16px; color: var(--muted); margin-top: 6px; }

.row { display: flex; gap: 12px; }
.row .btn { flex: 1; }

.btn {
  min-height: 68px; padding: 12px 18px;
  border: 1px solid var(--card-border); border-radius: 18px;
  background: var(--card); color: var(--fg);
  font-size: 21px; font-weight: 500;
}
.btn.wide { width: 100%; }
.btn.danger { color: var(--danger); }
.btn.install { background: var(--install); border-color: var(--install); color: var(--install-fg); }
.btn.download { background: transparent; border: 2px solid var(--accent); color: var(--accent); }
.btn.quiet {
  background: transparent; border-color: transparent; color: var(--muted);
  min-height: 52px; font-weight: 400; font-size: 19px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn.quiet svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.18s ease; }
.btn.skip { display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn.skip svg { width: 28px; height: 28px; fill: currentColor; flex: none; }

.more-row { display: flex; flex-direction: column; gap: 8px; }
.account { font-size: 19px; color: var(--muted); text-align: center; padding: 4px 0; }
.status.left { text-align: left; margin-top: 2px; }
.foot { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; }
.more-label { font-size: 16px; color: var(--muted); }
.seg { display: flex; gap: 6px; }
.seg button {
  flex: 1; min-height: 56px; padding: 8px 6px;
  border: 1px solid var(--card-border); border-radius: 14px;
  background: var(--card); color: var(--fg); font-size: 18px; font-weight: 500;
}
.seg button.on { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn:disabled { opacity: 0.6; cursor: default; }

.status { font-size: 17px; color: var(--muted); min-height: 1.4em; text-align: center; }
.status.error { color: var(--danger); }
.status .ok { color: var(--ok); }
.status svg, .list svg.check { width: 20px; height: 20px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.status svg { margin-right: 6px; }
.list svg.check { margin-left: 8px; color: var(--ok); }

.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.list .part {
  font-family: Georgia, "Noto Serif", "Times New Roman", serif; font-size: 19px; color: var(--muted);
  padding: 14px 4px 0;
}
.list .part:first-child { padding-top: 4px; }
.list > li > button {
  width: 100%; min-height: 76px; padding: 14px 16px;
  border: 1px solid var(--card-border); border-radius: 16px;
  background: var(--card); color: var(--fg);
  text-align: left; display: flex; flex-direction: column; gap: 3px;
}
.list > li > button b { font-size: 21px; font-weight: 500; }
.list > li > button span { font-size: 16px; color: var(--muted); }
.list > li > button.current { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.list > li > button.current span { color: var(--accent-sub); }
.list > li > button.done { color: var(--muted); }
.list > li > button.done b { font-weight: 400; }
.list .mini-bar { display: block; height: 5px; border-radius: 3px; background: var(--bar); margin-top: 8px; overflow: hidden; }
.list .mini-bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.list > li > button.current .mini-bar { background: rgba(0, 0, 0, 0.18); }
.list > li > button.current .mini-bar i { background: var(--accent-fg); }

.books > li > button { flex-direction: row; align-items: center; gap: 14px; min-height: 96px; }
.books > li > button img, .books .book-cover-empty { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; background: var(--bar); }
.books > li > button div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.books > li > button b { font-family: Georgia, "Noto Serif", "Times New Roman", serif; font-size: 19px; font-weight: 400; line-height: 1.25; }

/* Настройки → «На телефоне»: карточка книги с кнопкой, удаление через подтверждение на месте. */
.storage li {
  border: 1px solid var(--card-border); border-radius: 16px; background: var(--card);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 12px;
}
.storage .row-main { display: flex; align-items: center; gap: 12px; }
.storage .row-main > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.storage b { font-family: Georgia, "Noto Serif", "Times New Roman", serif; font-size: 18px; font-weight: 400; line-height: 1.25; }
.storage span { font-size: 16px; color: var(--muted); }
.storage .btn.small { min-height: 48px; padding: 8px 14px; font-size: 18px; flex: none; background: var(--bg); }
.storage .confirm { display: flex; flex-direction: column; gap: 12px; }
.storage .confirm p { margin: 0; font-size: 18px; line-height: 1.35; }
.storage .confirm .btn { min-height: 56px; font-size: 19px; background: var(--bg); }
