﻿:root {
  color-scheme: light;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.65;
  color: #000;
  background: #f5f4f0;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
.page { max-width: 1184px; height: 100dvh; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; }
.navigation { display: flex; align-items: center; gap: 24px; min-height: 40px; font-size: 1rem; }
.navigation a { text-decoration-thickness: 1px; text-underline-offset: 4px; }
.navigation a:hover { color: #444; }
.home { margin-right: auto; }
.current { text-decoration: none; }
.layout { display: grid; grid-template-columns: .62fr 1.38fr; gap: 48px; flex: 1; min-height: 0; padding: 64px 0; }
.introduction { min-width: 0; }
h1, h2, h3, p { margin: 0; }
h1, .year-heading { font-weight: 400; }
h1 { font-size: 2rem; line-height: 1.2; }
.introduction > p { margin-top: 22px; max-width: 320px; font-size: 1rem; line-height: 1.65; }
.library { min-width: 0; overflow-y: auto; scrollbar-width: none; padding: 3px; margin: -3px; }
.library::-webkit-scrollbar { display: none; }
.year + .year { margin-top: 40px; }
.year-heading { display: flex; align-items: center; gap: 16px; border-bottom: 1px solid #d9d9d1; padding-bottom: 12px; margin-bottom: 16px; color: #000; font-size: 1.25rem; }
.year-heading h2 { font: inherit; }
.count { color: #555; font-size: .875rem; }
.book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.book { position: relative; aspect-ratio: 2 / 3; overflow: hidden; border: 1px solid #00000018; background: #e5e2d9; isolation: isolate; }
.cover { display: block; width: 100%; height: 100%; transition: transform .5s ease; }
.book::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, #000000ed, #0000006b 55%, #0000002e); opacity: 0; transition: opacity .3s ease; z-index: 1; pointer-events: none; }
.book-details { position: absolute; inset: auto 0 0; padding: 16px; color: #fff; z-index: 2; opacity: 0; transform: translateY(12px); transition: opacity .3s ease, transform .3s ease; }
.book-details h3 { font-size: 1.5rem; line-height: 1.2; font-weight: 400; overflow-wrap: anywhere; }
.author { margin-top: 10px; font-size: .875rem; line-height: 1.5; color: #ffffffc9; }
.book:hover .cover, .book:focus .cover { transform: scale(1.05); }
.book:hover::after, .book:focus::after, .book:hover .book-details, .book:focus .book-details { opacity: 1; transform: none; }
a:focus-visible, .book:focus-visible, .library:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
::selection { background: #222; color: #fff; }
@media (min-width: 1280px) { .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1023px) {
  .page { height: auto; min-height: 100dvh; }
  .layout { grid-template-columns: 1fr; gap: 32px; padding: 48px 0; }
  .library { overflow: visible; }
  .introduction > p { max-width: none; }
  .introduction > p br { display: none; }
}
@media (max-width: 639px) {
  .page { padding: 12px; }
  .layout { padding: 32px 0; }
  .navigation { gap: 16px; font-size: .875rem; }
  .book-grid { grid-template-columns: 1fr; }
}
@media (hover: none) {
  .book::after, .book-details { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cover, .book::after, .book-details { transition: none; }
  .book:hover .cover, .book:focus .cover { transform: none; }
}

@media (max-width: 600px) {
  :root { font-size: 17px; }
  h1 { font-size: 1.8rem; }
}

.book-note { margin-top: 12px; font-size: .875rem; line-height: 1.5; color: #fff; white-space: pre-line; }
.book-details { max-height: 100%; overflow-y: auto; }

.cover-frame { position: relative; width: 100%; height: 100%; }
.cover-image { position: absolute; inset: 0; object-fit: cover; z-index: 1; }
.cover-fallback { position: absolute; inset: 0; z-index: 0; }

.cover-credit { padding-top: 12px; color: #777; font-size: .75rem; }

.favourites-intro { margin-top: 24px !important; }
.favourites { margin: 10px 0 0; padding-left: 1.25rem; color: #545950; line-height: 1.65; }
.favourites li { padding-left: .2rem; }

.navigation a { text-decoration: none; }
.navigation a:hover:not(.current) { text-decoration: underline; }
.navigation .current:hover { text-decoration: none; }

@media (max-width: 639px) {
  .navigation { flex-wrap: wrap; }
  .navigation .home { width: 100%; margin-right: 0; }
  .layout { gap: 28px; padding: 28px 0 48px; }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .book-details { padding: 9px; }
  .book-details h3 { font-size: 1rem; line-height: 1.18; }
  .book-details .author { margin-top: 5px; font-size: .72rem; line-height: 1.25; }
  .book-note { margin-top: 6px; font-size: .7rem; line-height: 1.25; }
}
