/* "Continue reading" card: one compact card, bottom-left, the same on desktop and mobile. The whole card opens the chapter
   (the title link is stretched over it); only the close button is separate. On mobile it sits above the bottom nav and
   leaves room for the round contact button on the right. */
.resume-card {
    position: fixed;
    left: calc(12px + env(safe-area-inset-left, 0px));
    bottom: calc(12px + var(--bottom-nav-height, 0px) + env(safe-area-inset-bottom, 0px));
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(320px, calc(100vw - 84px));
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-bg);
    color: var(--color-text-primary);
    box-shadow: 0 4px 16px rgb(0 0 0 / .18);
    opacity: 0;
    transform: translateY(10px);
    transition: transform .25s ease, opacity .2s ease;
}
.resume-card.is-ready { opacity: 1; transform: translateY(0); }
/* Slide past the card's own bottom offset (bottom nav + safe area) so it leaves the screen completely. */
.resume-card.is-hidden {
    transform: translateY(calc(100% + 12px + var(--bottom-nav-height, 0px) + env(safe-area-inset-bottom, 0px) + 12px));
    opacity: 0;
    pointer-events: none;
}
.resume-card.is-leaving { transition: none; }

.resume-card__cover {
    flex: 0 0 auto;
    width: 40px;
    aspect-ratio: 2 / 3;
    border-radius: 6px;
    object-fit: cover;
    background: var(--color-bg-tertiary);
}
.resume-card__body { display: grid; flex: 1 1 auto; gap: 2px; min-width: 0; }
.resume-card__title {
    overflow: hidden;
    color: var(--color-text-primary);
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.resume-card__title::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.resume-card__title:hover { color: var(--color-primary); }
.resume-card__meta { color: var(--color-text-secondary); font-size: .75rem; line-height: 1.4; }
.resume-card__cta { color: var(--color-primary); font-weight: 700; }
.resume-card__actions { display: contents; }
.resume-card__close {
    position: relative;
    z-index: 1;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: -8px -6px -8px 0;
    padding: 0;
    border: 0;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--color-text-secondary);
    cursor: pointer;
}
.resume-card__close:hover,
.resume-card__close:focus-visible { background: var(--color-bg-tertiary); color: var(--color-text-primary); }
@media (prefers-reduced-motion: reduce) { .resume-card { transition: none; } }
