[data-bookshelf][hidden], #bookshelfPage [hidden], #shelfEditModal [hidden] { display: none !important; }
.shelf-heading { padding: 24px 0 16px; }
.shelf-heading h1 { font-family: var(--display-font); font-size: 32px; font-weight: 500; margin: 0 0 8px; }
.shelf-heading p, .shelf-item time { color: var(--text-muted); font-size: 13px; }
.shelf-tools { display: flex; gap: 12px; align-items: end; }
.shelf-tools label { flex: 1; font-size: 12px; color: var(--text-muted); }
.shelf-tools input, #shelfName { display: block; width: 100%; margin-top: 6px; min-height: 44px; padding: 12px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; font-size: 16px; }
.shelf-month { position: relative; margin: 28px 0 38px; padding-left: 18px; border-left: 1px solid var(--border); }
.shelf-month h2 { font-size: 15px; font-weight: 600; color: var(--text-muted); margin-bottom: 22px; }
.shelf-month h2::before { content: ''; position: absolute; left: -5px; top: 6px; width: 9px; height: 9px; background: var(--primary); border-radius: 50%; }
.shelf-rack { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 26px 22px; }
.shelf-item { min-width: 0; }
.shelf-cover { display: flex; flex-direction: column; align-items: start; text-align: start; width: 100%; aspect-ratio: 3/4; min-height: 205px; padding: 22px 17px 17px 22px; border: 0; border-left: 6px solid var(--book-fold); border-radius: 2px 6px 6px 2px; background: var(--saved-cover); color: var(--saved-ink); box-shadow: 4px 4px 0 var(--border), 0 14px 18px -12px var(--book-shadow); cursor: pointer; transition: transform .2s; overflow-wrap: anywhere; }
.shelf-cover:hover { transform: translateY(-4px); }
.shelf-cover:focus-visible { outline: 3px solid var(--primary); outline-offset: 5px; }
.shelf-cover strong { font-family: var(--display-font); font-size: 20px; font-weight: 500; line-height: 1.5; margin: 22px 0 auto; padding-bottom: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.shelf-cover > small:first-child { font-size: 9px; letter-spacing: 1.5px; }
.shelf-cover span, .shelf-cover > small:last-child { font-size: 10px; line-height: 1.6; }
.shelf-item time { display: block; margin: 16px 0 0; font-size: 11px; }
.shelf-actions { display: flex; justify-content: space-between; gap: 6px; border-bottom: 3px solid var(--border); }
.shelf-actions button { min-height: 44px; border: none; background: transparent; color: var(--text-muted); font: inherit; font-size: 12px; cursor: pointer; }
#shelfStatus { color: var(--text-muted); line-height: 1.8; }
.shelf-reader { position: fixed; inset: 0; z-index: 150; display: flex; flex-direction: column; background: var(--bg); }
.shelf-reader-bar { display: flex; align-items: center; gap: 18px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); border-bottom: 1px solid var(--border); }
.shelf-reader-bar strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.shelf-reader-bar button { flex: none; min-height: 44px; }
.shelf-reader iframe { flex: 1; width: 100%; border: 0; min-height: 0; }
#shelfEditModal .modal-card { width: min(420px, 92vw); }
#shelfEditMessage { overflow-wrap: anywhere; line-height: 1.8; }
.shelf-edit-actions { display: flex; gap: 12px; margin-top: 18px; }
@media (max-width: 400px) { .shelf-rack { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; } .shelf-cover { padding: 17px 10px 14px; min-height: 190px; } .shelf-cover strong { font-size: 17px; } .shelf-month { padding-left: 12px; } }
@media (prefers-reduced-motion: reduce) { .shelf-cover { transition: none; } }
