/* Books shelf page. Phone first; the shelf grows into a grid on wider screens. */

.shelf-page {
    --paper: #f6f1e6;
    --ink: #2a2520;
    --ink-soft: #6b6157;
    background: var(--paper);
    color: var(--ink);
    min-height: 70vh;
    padding: 2.5rem 16px 4rem;
}

.shelf-intro {
    max-width: 640px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.shelf-intro h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 2.6rem;
    margin: 0 0 0.5rem;
    color: var(--ink);
}

.shelf-intro p {
    color: var(--ink-soft);
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0;
}

.shelf {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    gap: 2rem;
}

.shelf-book {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
}

.shelf-cover {
    flex: 0 0 auto;
    width: 118px;
    aspect-ratio: 2 / 3;
    border-radius: 2px 6px 6px 2px;
    background: var(--cloth, #23395b);
    color: #f3ead6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.8rem 0.6rem 0.8rem 1rem;
    box-sizing: border-box;
    text-align: center;
    position: relative;
    box-shadow:
        inset 6px 0 0 rgba(0, 0, 0, 0.18),
        inset 7px 0 0 rgba(255, 255, 255, 0.08),
        0 1px 2px rgba(0, 0, 0, 0.2),
        0 10px 24px -8px rgba(0, 0, 0, 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.shelf-cover-img {
    object-fit: cover;
    padding: 0;
}

.shelf-book:hover .shelf-cover,
.shelf-book:focus-visible .shelf-cover {
    transform: translateY(-4px) rotate(-1deg);
}

.shelf-cover-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 1.15rem;
    line-height: 1.1;
    letter-spacing: 0.02em;
    overflow-wrap: anywhere;
}

.shelf-cover-sub {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 0.72rem;
    line-height: 1.25;
    opacity: 0.9;
}

.shelf-cover-rule {
    width: 28px;
    border-top: 1px solid currentColor;
    opacity: 0.6;
    margin: 0.2rem 0;
}

.shelf-cover-author {
    font-size: 0.55rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.shelf-info {
    min-width: 0;
}

.shelf-info h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 1.6rem;
    line-height: 1.15;
    margin: 0;
    color: var(--ink);
}

.shelf-sub {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.15rem;
    margin: 0.15rem 0 0;
}

.shelf-author {
    color: var(--ink-soft);
    margin: 0.4rem 0 0;
}

.shelf-desc {
    line-height: 1.55;
    margin: 0.6rem 0 0;
}

.shelf-meta {
    color: var(--ink-soft);
    font-size: 0.9rem;
    margin: 0.6rem 0 0;
}

.shelf-read {
    display: inline-block;
    margin-top: 0.9rem;
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--ink);
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
}

.shelf-book:hover .shelf-read {
    background: var(--ink);
    color: var(--paper);
}

.shelf-empty {
    text-align: center;
    color: var(--ink-soft);
}

@media (min-width: 640px) {
    .shelf-cover { width: 150px; }
    .shelf-cover-title { font-size: 1.4rem; }
    .shelf-cover-sub { font-size: 0.85rem; }
    .shelf-cover-author { font-size: 0.62rem; }
}

@media (min-width: 900px) {
    .shelf {
        grid-template-columns: repeat(auto-fit, minmax(380px, 460px));
        justify-content: center;
    }
}

/* Friends-only lock screen */
.lock-card {
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lock-card h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 1.9rem;
    line-height: 1.15;
    margin: 1.5rem 0 0;
    color: var(--ink);
}

.lock-note {
    color: var(--ink-soft);
    line-height: 1.55;
    margin: 1rem 0 0;
}

.lock-form {
    width: 100%;
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    text-align: left;
}

.lock-label {
    font-weight: 600;
    font-size: 0.95rem;
}

.lock-input {
    font: inherit;
    font-size: 1.1rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #bfb4a3;
    border-radius: 10px;
    background: #fffdf8;
    color: var(--ink);
    min-height: 48px;
}

.lock-input:focus {
    outline: 2px solid var(--ink);
    outline-offset: 1px;
}

.lock-error {
    color: #8a2a1a;
    margin: 0;
    font-size: 0.95rem;
}

.lock-button {
    align-self: center;
    background: none;
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
}

.lock-back {
    margin-top: 1.75rem;
    color: var(--ink-soft);
    text-decoration: none;
}

.shelf-lock {
    display: inline-block;
    margin-left: 0.4rem;
    font-size: 0.85rem;
    color: var(--ink-soft);
}
