
html.home-reader-open,
html.home-reader-open body {
    overflow: hidden;
}

.home-reader {
    position: fixed;
    inset: 0;
    z-index: 9990;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(var(--t-glow-rgb), 0.14), transparent 60%),
        rgba(var(--t-panel-rgb), 0.62);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    animation: hr-fade 0.3s ease both;
}

.home-reader-scroll {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: clamp(14px, 4vw, 48px) clamp(10px, 3vw, 32px) 64px;
    box-sizing: border-box;
    cursor: zoom-out;
}

    .home-reader.is-closing {
        animation: hr-fade-out 0.24s ease forwards;
    }

        .home-reader.is-closing .home-reader-card {
            animation: hr-card-out 0.24s ease forwards;
        }

@keyframes hr-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hr-fade-out { to { opacity: 0; } }
@keyframes hr-card-in {
    from { opacity: 0; transform: translateY(28px) scale(0.97); }
    to { opacity: 1; transform: none; }
}
@keyframes hr-card-out { to { opacity: 0; transform: translateY(16px) scale(0.98); } }

.home-reader-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(860px, 100%);
    margin: 0 auto;
    padding: clamp(22px, 5vw, 52px) clamp(20px, 5vw, 60px) clamp(26px, 4vw, 40px);
    box-sizing: border-box;
    border-radius: 28px;
    border: 1px solid rgba(var(--t-accent-rgb), 0.25);
    background:
        radial-gradient(ellipse at 50% -10%, rgba(var(--t-glow-rgb), 0.16), transparent 55%),
        rgba(var(--t-panel-rgb), 0.94);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.92);
    font-family: Muli, system-ui, sans-serif;
    text-align: left;
    cursor: auto;
    animation: hr-card-in 0.5s cubic-bezier(.2, .8, .2, 1) both;
}

.home-reader-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.home-reader .home-reader-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto !important;
    margin: 0 !important;
    padding: 9px 16px !important;
    border-radius: 999px;
    border: 1px solid rgba(var(--t-accent-rgb), 0.45);
    background: rgba(var(--t-panel-rgb), 0.6);
    color: var(--t-accent);
    font-family: Muli, sans-serif;
    font-size: 14px !important;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}

    .home-reader .home-reader-back:hover {
        background: var(--t-accent);
        color: rgba(var(--t-panel-rgb), 1);
    }

    .home-reader .home-reader-back:focus-visible {
        outline: 2px solid var(--t-accent);
        outline-offset: 3px;
    }

.home-reader .home-reader-back-bottom {
    align-self: center;
    margin-top: 26px !important;
    padding: 11px 22px !important;
    font-size: 15px !important;
}

.home-reader-cover {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 20px;
    margin: 0 0 26px;
    cursor: zoom-in;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.home-reader-title {
    margin: 0 0 10px;
    height: auto !important;
    font-family: Muli, sans-serif;
    font-size: clamp(26px, 3.4vw, 38px) !important;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: #fff;
    text-align: left;
}

.home-reader .read-cay {
    display: block;
    margin: 0 0 24px;
    font-size: 13px;
    opacity: 0.75;
}

.home-reader .inner-text {
    display: block !important;
    -webkit-line-clamp: unset !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal;
    font-family: Muli, system-ui, sans-serif;
    font-size: clamp(17px, 1.6vw, 19px) !important;
    line-height: 1.9;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.92);
    text-align: left;
    animation: hr-card-in 0.6s ease 0.1s both;
}

    .home-reader .inner-text a {
        color: var(--t-accent);
    }

    .home-reader .inner-text img,
    .home-reader .inner-text video,
    .home-reader .inner-text iframe {
        display: block;
        max-width: 100% !important;
        margin: 18px auto;
        border-radius: 14px;
    }

    .home-reader .inner-text img,
    .home-reader .inner-text video {
        height: auto !important;
    }

        .home-reader .inner-text img.img-left,
        .home-reader .inner-text video.img-left {
            margin-left: 0;
            margin-right: auto;
        }

    .home-reader .inner-text img {
        cursor: zoom-in;
        transition: box-shadow 0.25s ease;
    }

        .home-reader .inner-text img:hover {
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(var(--t-accent-rgb), 0.45);
        }

.home-reader-loading {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 40px 0;
}

    .home-reader-loading span {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: var(--t-accent);
        animation: hr-dot 1s ease-in-out infinite;
    }

        .home-reader-loading span:nth-child(2) { animation-delay: 0.15s; }
        .home-reader-loading span:nth-child(3) { animation-delay: 0.3s; }

@keyframes hr-dot {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-6px); }
}

.home-reader-error {
    padding: 24px 0;
    text-align: center;
    opacity: 0.85;
}

.home-reader-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 3px;
    width: 0;
    z-index: 9995;
    background: linear-gradient(90deg, var(--t-accent), rgba(var(--t-glow-rgb), 1));
    box-shadow: 0 0 12px rgba(var(--t-glow-rgb), 0.7);
    pointer-events: none;
}

.home-reader .home-reader-totop {
    position: absolute;
    right: 18px;
    bottom: 22px;
    z-index: 9995;
    width: 46px !important;
    height: 46px;
    margin: 0 !important;
    padding: 0 !important;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(var(--t-accent-rgb), 0.55);
    background: rgba(var(--t-panel-rgb), 0.9);
    color: var(--t-accent);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px) scale(0.9);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease, color 0.2s ease;
}

    .home-reader .home-reader-totop svg {
        width: 22px;
        height: 22px;
        margin: 0;
    }

    .home-reader .home-reader-totop.is-visible {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .home-reader .home-reader-totop:hover {
        background: var(--t-accent);
        color: rgba(var(--t-panel-rgb), 1);
    }

@media (max-width: 600px) {
    .home-reader-scroll {
        padding: 10px 8px 40px;
    }

    .home-reader-card {
        border-radius: 22px;
    }

    .home-reader-cover {
        max-height: 260px;
        border-radius: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-reader,
    .home-reader-card,
    .home-reader .inner-text {
        animation: none !important;
    }
}
