* { box-sizing: border-box; }
:root { color-scheme: dark; --gold: #e4bd69; --cream: #fff0cf; }
html { min-height: 100%; background: #100b08; }
body {
  margin: 0; min-height: 100vh; color: var(--cream);
  font-family: Georgia, 'Times New Roman', serif;
  background: radial-gradient(ellipse at 50% 0%, #392317 0%, #1b120d 52%, #080706 100%);
}
.page { width: min(100% - 28px, 1500px); margin: 0 auto; padding: 18px 0 24px; }
.date-message {
  min-height: 1.5em; margin: 0 0 13px; text-align: center; color: #f2dba9;
  font: 500 .92rem/1.5 system-ui, sans-serif; text-shadow: 0 2px 8px #000;
}
.library {
  position: relative; overflow: hidden; border: 1px solid #76502d; border-radius: 7px;
  background: #170e09; box-shadow: 0 22px 55px rgba(0,0,0,.7), 0 0 0 4px rgba(91,57,29,.35);
}
.bookcase { position: relative; width: 100%; line-height: 0; }
.shelf-art { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.book-hit {
  position: absolute; z-index: 2; display: block;
  width: 4.0%; height: 17%; min-width: 0; min-height: 0; padding: 0;
  transform: translate(-50%, -50%); border: 0; border-radius: 2px;
  color: transparent; background: transparent; box-shadow: none;
  font-size: 0; line-height: 0; text-shadow: none;
  cursor: pointer; transition: outline-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.book-hit:hover:not(:disabled) {
  z-index: 4; background: rgba(255,210,125,.10); outline: 1px solid rgba(255,218,147,.45);
}
.book-hit:focus-visible { outline: 2px solid #fff0bd; outline-offset: 1px; z-index: 5; }
.book-hit:disabled { cursor: default; }
.book-hit.unlocked { opacity: 1; filter: none; }
footer { padding: 14px 4px 2px; text-align: center; color: #d9b878; font: .82rem/1.4 system-ui,sans-serif; letter-spacing: .03em; text-shadow: 0 2px 7px #000; }
dialog { position: fixed; width: min(420px,calc(100% - 30px)); border: 1px solid #d5bd83; border-radius: 16px; padding: 30px 25px 25px; color: #26372f; background: #f7f0df; box-shadow: 0 20px 70px rgba(0,0,0,.65); text-align: center; }
dialog::backdrop { background: rgba(5,10,16,.8); backdrop-filter: blur(4px); }
.close { position: absolute; top: 8px; right: 13px; border: 0; background: transparent; color: #536056; font-size: 1.8rem; cursor: pointer; }
.dialog-day { color: #98783d; text-transform: uppercase; letter-spacing: .16em; font: .72rem system-ui,sans-serif; }
dialog h2 { margin: 8px 0 18px; font: 600 1.65rem Georgia,serif; }
.cover-placeholder { width: 180px; height: 235px; margin: 0 auto 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; color: #f8edcf; background: linear-gradient(145deg,#285746,#142f27); border: 5px double #d4b66f; box-shadow: 0 8px 18px rgba(0,0,0,.18); }
.cover-mark { font-size: 2.2rem; color: #e5cb8e; }
.cover-caption { font: 500 1rem Georgia,serif; }
.book-link { display: inline-block; padding: 12px 20px; border-radius: 30px; color: #fff8e8; background: #285746; text-decoration: none; font: 600 .95rem system-ui,sans-serif; }
.book-link:hover { background: #173c30; }
.book-link span { padding-left: 8px; }
.empty-note { color: #69766b; font: .83rem/1.5 system-ui,sans-serif; max-width: 300px; margin: 15px auto 0; }
@media (max-width: 700px) {
  .page { width: min(100% - 12px, 1500px); padding-top: 9px; }
  .date-message { margin-bottom: 8px; font-size: .76rem; }
  .book-hit { width: 5.0%; height: 17%; min-width: 0; min-height: 0; border-radius: 2px; }
  footer { padding-top: 10px; font-size: .69rem; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { transition: none !important; } }
