/* Ті самі токени, що в iOS (DesignSystem/Color+Tokens.swift): «вечірня бібліотека». */
:root {
  --canvas: #F5EEE3; --surface: #FFFAF2; --paper: #FBF5EA; --separator: #E0D3C0;
  --text: #2A1F17; --text-2: #6E5D4E; --accent: #A84824; --moss: #4E6B47; --brass: #B8892F;
  --radius: 14px; --gap: 16px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #17120E; --surface: #241C16; --paper: #2B231C; --separator: #3A2E25;
    --text: #F3E9DA; --text-2: #B8A691; --accent: #E07A4F; --moss: #8BAF7F; --brass: #D9AE55;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--canvas); color: var(--text);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}
h1, h2, .brand, .cover-title { font-family: "New York", ui-serif, Georgia, serif; }
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 4px; }
h2 { font-size: 21px; margin: 0 0 4px; }
a { color: var(--accent); }
.top, main, .foot { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.top { padding-top: 20px; padding-bottom: 8px; }
.brand { font-size: 22px; font-weight: 700; color: var(--text); text-decoration: none; }
main { padding-top: 16px; padding-bottom: 32px; }
.foot { color: var(--text-2); font-size: 13px; padding-bottom: 32px; }
.hero p, .author, .owner, .message p { color: var(--text-2); }
.download { display: flex; gap: var(--gap); align-items: center; flex-wrap: wrap;
  background: var(--surface); border-radius: var(--radius); padding: var(--gap); margin-top: 24px; }
.download p { margin: 0; }
.qr { background: #fff; border-radius: 8px; padding: 8px; flex: none; }
.book { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.info { flex: 1 1 260px; }
.cover { position: relative; width: 168px; aspect-ratio: 2 / 3; border-radius: 4px 10px 10px 4px; overflow: hidden;
  background: var(--brass); box-shadow: 0 8px 24px rgba(60, 35, 15, .25); display: flex; align-items: center;
  justify-content: center; padding: 12px; flex: none; }
.cover.small { width: 72px; padding: 6px; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-title { color: #fff; font-size: 17px; text-align: center; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.cover.small .cover-title { font-size: 10px; }
.facts { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { background: var(--paper); border: 1px solid var(--separator); border-radius: 999px; padding: 2px 10px;
  font-size: 14px; color: var(--text-2); }
.status { font-weight: 600; }
.status.ok { color: var(--moss); }
.actions { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.button { display: block; text-align: center; padding: 14px 16px; min-height: 48px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--separator); color: var(--text); font-weight: 600;
  text-decoration: none; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.shelf { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.shelf a { display: grid; grid-template-columns: 72px 1fr; grid-template-rows: auto 1fr; column-gap: 12px;
  padding: 8px; background: var(--surface); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.shelf .cover { grid-row: span 2; }
.shelf .title { font-weight: 600; }
.shelf .author { font-size: 14px; }
.empty, .loading { color: var(--text-2); }
@media (min-width: 640px) { .actions { flex-direction: row; flex-wrap: wrap; } .actions .button { flex: 1; } }
@media (prefers-reduced-motion: no-preference) { .button { transition: opacity .15s; } .button:active { opacity: .8; } }
[hidden] { display: none !important; }
