/* Cờ Vua Phiêu Lưu Ký — kệ đọc và trang lật */

.plk-lead {
    max-width: 42rem;
    margin: 0 auto;
}

.plk-shelf {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 22px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.plk-book {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    min-width: 0;
    position: relative;
}

.plk-book img {
    width: 100%;
    height: auto;
    aspect-ratio: 1000 / 1415;
    object-fit: cover;
    object-position: center top;
    border-radius: 4px 16px 16px 4px;
    background: #fff;
    box-shadow: 10px 14px 28px rgba(30, 41, 59, 0.16);
}

.plk-book:hover img {
    transform: translateY(-3px);
    box-shadow: 12px 18px 32px rgba(30, 41, 59, 0.2);
}

.plk-book:focus-visible {
    outline: 3px solid #0284c7;
    outline-offset: 4px;
    border-radius: 8px;
}

.plk-book strong {
    font-family: "Baloo 2", "Be Vietnam Pro", "Segoe UI", sans-serif;
    font-size: 1.05rem;
    line-height: 1.3;
    color: var(--stream-ink, #1e293b);
}

.plk-book span {
    color: var(--stream-muted, #64748b);
    font-size: 0.95rem;
}

.plk-soon {
    margin: 18px 0 0;
    color: var(--stream-muted, #64748b);
}

.plk-book--read {
    position: relative;
}

.plk-book--read::after {
    content: "Đã đọc";
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #0f172a;
    background: rgba(253, 230, 138, 0.92);
    padding: 4px 8px;
    border-radius: 6px;
}

.plk-next,
.plk-after {
    margin-top: 28px;
    padding: 22px 22px 20px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(30, 41, 59, 0.06);
}

.plk-after {
    margin: 8px 0 22px;
}

.plk-next h2,
.plk-after h2 {
    margin: 0 0 8px;
    font-size: 1.25rem;
}

.plk-next-lead,
.plk-next-note {
    margin: 0 0 14px;
    color: var(--stream-muted, #64748b);
    max-width: 52ch;
}

.plk-next-note {
    margin: 14px 0 0;
    font-size: 0.95rem;
}

.plk-next-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
}

.plk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    line-height: 1.2;
}

.plk-btn--primary {
    background: #0284c7;
    color: #fff;
}

.plk-btn--primary:hover {
    background: #0369a1;
}

.plk-btn--ghost {
    background: #f8fafc;
    color: #0f172a;
    border-color: rgba(148, 163, 184, 0.55);
}

.plk-btn--ghost:hover {
    background: #f1f5f9;
}

.plk-btn--muted {
    background: #f1f5f9;
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.35);
    cursor: not-allowed;
    pointer-events: none;
}

.plk-files {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(30, 41, 59, 0.06);
}

.plk-files li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px 18px;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.plk-files li:last-child {
    border-bottom: 0;
}

.plk-files a {
    font-weight: 700;
    text-decoration: none;
}

.plk-files a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.plk-files .plk-size {
    color: var(--stream-muted, #64748b);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.plk-note {
    max-width: 62ch;
    color: var(--stream-muted, #64748b);
    margin: 0 0 14px;
}

.plk-reader {
    max-width: 760px;
}

.plk-reader img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto 18px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(30, 41, 59, 0.12);
}

.plk-read-head .plk-back {
    margin-bottom: 8px;
}

.plk-pager {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 8px;
}

.plk-pager a {
    font-weight: 700;
    text-decoration: none;
}

.plk-pager a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

body.plk ::selection {
    background: #fde68a;
    color: #1e293b;
}

@media (max-width: 800px) {
    .plk-shelf {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 14px;
    }

    .plk-files li {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .plk-files .plk-size {
        grid-column: 2;
    }
}

@media (max-width: 520px) {
    .plk-shelf {
        grid-template-columns: minmax(0, 1fr);
        max-width: 420px;
        margin-inline: auto;
    }
}
