/* ═════════════════════════════════════════════════════
   Pages — User-facing page styles for Paper Podcasts
   Extracted from embedded <style> blocks + layout.css
   ═════════════════════════════════════════════════════ */


/* ── Full-bleed layout overrides ───────────────────── */

.hp,
.pd-hero,
.catalog-page,
.catalog-body,
.catalog-top,
.acct-page,
.acct-body,
.acct-top {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

#app-content > .hp,
#app-content > .pd-hero,
#app-content > .catalog-page,
#app-content > .catalog-body,
#app-content > .catalog-top,
#app-content > .acct-body,
#app-content > .acct-top {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

#app-content > .acct-page {
    max-width: 100%;
    margin: 0;
    margin-top: calc(-1 * var(--space-2xl));
    padding: 0 0 var(--space-2xl);
    background: linear-gradient(180deg,
        #FFE4D6 0%,
        #FFEAD8 20%,
        #FFF3ED 40%,
        var(--color-bg) 65%
    );
}

.catalog-body > *,
.catalog-top > *,
.acct-body > *,
.acct-top > * {
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}


/* ── Home ──────────────────────────────────────────── */

#app-content > .hp {
    max-width: 100%;
    margin: 0;
    margin-top: calc(-1 * var(--space-2xl));
    padding: 0 0 var(--space-2xl);
}

.hp-top {
    background: linear-gradient(180deg,
        #FFE4D6 0%,
        #FFEAD8 45%,
        #FFF3ED 75%,
        var(--color-bg) 100%
    );
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.hp-top::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(232, 99, 74, 0.08) 0%, transparent 70%);
    top: -250px;
    right: -150px;
    border-radius: 50%;
    pointer-events: none;
}

.hp-top::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 209, 102, 0.08) 0%, transparent 70%);
    bottom: -100px;
    left: -80px;
    border-radius: 50%;
    pointer-events: none;
}

.hp-top__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
    z-index: 1;
}

.hp-hero {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 3rem;
}

.hp-hero__text {
    flex: 1;
    min-width: 0;
}

.hp-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(232, 99, 74, 0.1);
    color: var(--color-accent);
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    margin-bottom: 1.5rem;
    animation: hp-fadeUp 0.6s ease both;
}

.hp-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.08;
    color: var(--color-primary);
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
    animation: hp-fadeUp 0.6s ease 0.1s both;
}

.hp-hero__title em {
    font-style: normal;
    color: var(--color-accent);
}

.hp-hero__subtitle {
    font-size: var(--text-lg);
    line-height: 1.6;
    color: var(--color-text-secondary);
    max-width: 440px;
    margin-bottom: 2rem;
    animation: hp-fadeUp 0.6s ease 0.2s both;
}

.hp-hero__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    animation: hp-fadeUp 0.6s ease 0.3s both;
}

.hp-hero__play-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-accent);
    color: #fff;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(232, 99, 74, 0.3);
}

.hp-hero__play-btn:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(232, 99, 74, 0.4);
    color: #fff;
}

.hp-hero__browse-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    text-decoration: none;
    color: var(--color-primary);
    background: rgba(26, 35, 50, 0.06);
    transition: all 0.25s ease;
}

.hp-hero__browse-btn:hover {
    background: rgba(26, 35, 50, 0.1);
    color: var(--color-primary);
}

.hp-hero__featured {
    flex-shrink: 0;
    animation: hp-fadeIn 0.8s ease 0.2s both;
}

.hp-hero__cover {
    display: block;
    width: 280px;
    height: 280px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    transform: rotate(3deg);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 24px 60px rgba(232, 99, 74, 0.18), 0 8px 24px rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

.hp-hero__cover:hover {
    transform: rotate(0deg) scale(1.03);
}

.hp-hero__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hp-hero__cover-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
}

.hp-hero__cover-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    border-radius: 24px;
}

.hp-hero__cover:hover .hp-hero__cover-play {
    background: rgba(0, 0, 0, 0.12);
}

.hp-hero__cover-play svg {
    width: 56px;
    height: 56px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}

.hp-hero__cover:hover .hp-hero__cover-play svg {
    opacity: 1;
    transform: scale(1);
}

.hp-hero__featured-meta {
    text-align: center;
    margin-top: 1rem;
    max-width: 280px;
}

.hp-hero__featured-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-accent);
    margin-bottom: 0.25rem;
}

.hp-hero__featured-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-primary);
    line-height: 1.3;
}

.hp-waveform {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 10px;
}

.hp-waveform__bar {
    width: 2px;
    background: var(--color-accent);
    border-radius: 1px;
    animation: hp-wave 1.2s ease-in-out infinite;
}

.hp-waveform__bar:nth-child(1) { height: 40%; animation-delay: 0s; }
.hp-waveform__bar:nth-child(2) { height: 70%; animation-delay: 0.2s; }
.hp-waveform__bar:nth-child(3) { height: 50%; animation-delay: 0.35s; }

.hp-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.hp-stat {
    text-align: center;
    animation: hp-fadeUp 0.5s ease both;
}

.hp-stat:nth-child(1) { animation-delay: 0.4s; }
.hp-stat:nth-child(2) { animation-delay: 0.5s; }
.hp-stat:nth-child(3) { animation-delay: 0.6s; }

.hp-stat__number {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-primary);
}

.hp-stat__label {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.hp-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.hp-shelf {
    padding: var(--space-xl) 0 var(--space-2xl);
}

.hp-shelf__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.hp-shelf__title {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-primary);
}

.hp-shelf__link {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

.hp-shelf__link:hover { opacity: 0.7; }

.hp-shelf__row {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.hp-shelf__row::-webkit-scrollbar { display: none; }

.hp-shelf-card {
    flex-shrink: 0;
    width: 200px;
    scroll-snap-align: start;
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.3s ease;
    animation: hp-fadeUp 0.5s ease both;
}

.hp-shelf-card:hover {
    transform: translateY(-4px);
    color: var(--color-text);
}

.hp-shelf-card__cover {
    width: 200px;
    height: 200px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.hp-shelf-card:hover .hp-shelf-card__cover {
    box-shadow: 0 8px 32px rgba(232, 99, 74, 0.18);
}

.hp-shelf-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.hp-shelf-card:hover .hp-shelf-card__cover img {
    transform: scale(1.06);
}

.hp-shelf-card__duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    color: #fff;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: var(--weight-medium);
}

.hp-shelf-card__title {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.2rem;
}

.hp-shelf-card__author {
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.hp-shelf-card__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 0 0 16px 16px;
    overflow: hidden;
}

.hp-shelf-card__progress-fill {
    height: 100%;
    background: var(--color-accent);
    border-radius: 0 0 16px 16px;
}

.hp-grid-section {
    padding: var(--space-md) 0 var(--space-2xl);
}

.hp-grid-section__title {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.hp-cta {
    background: linear-gradient(135deg, #FFF0EA, #FFE4D6, #FFF2F0);
    border-radius: 24px;
    padding: 3.5rem 2rem;
    text-align: center;
    margin: var(--space-md) 0 0;
    position: relative;
    overflow: hidden;
}

.hp-cta::before {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(232, 99, 74, 0.07), transparent 70%);
    top: -80px;
    right: -50px;
    border-radius: 50%;
    pointer-events: none;
}

.hp-cta__title {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    position: relative;
}

.hp-cta__text {
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    position: relative;
}

.hp-empty {
    text-align: center;
    padding: 5rem 2rem;
}

.hp-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #FFE8D6, #FFF0F0);
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.hp-empty__title {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.hp-empty__text {
    color: var(--color-text-muted);
    max-width: 400px;
    margin: 0 auto;
}

@keyframes hp-fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes hp-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes hp-wave {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1); }
}

@media (max-width: 767px) {
    .hp-top {
        padding: 2rem 0 1.5rem;
    }

    .hp-top__inner {
        padding: 0 var(--space-md);
    }

    .hp-hero {
        flex-direction: column-reverse;
        gap: 2rem;
        text-align: center;
        margin-bottom: 2rem;
    }

    .hp-hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hp-hero__actions {
        justify-content: center;
    }

    .hp-hero__cover {
        width: 200px;
        height: 200px;
        border-radius: 20px;
    }

    .hp-hero__cover-play svg {
        width: 44px;
        height: 44px;
    }

    .hp-hero__featured-meta {
        max-width: 200px;
        margin-left: auto;
        margin-right: auto;
    }

    .hp-stats {
        gap: 1.5rem;
    }

    .hp-stat__number {
        font-size: var(--text-xl);
    }

    .hp-content {
        padding: 0 var(--space-md);
    }

    .hp-shelf-card {
        width: 160px;
    }

    .hp-shelf-card__cover {
        width: 160px;
        height: 160px;
        border-radius: 12px;
    }

    .hp-shelf__row {
        margin-left: calc(-1 * var(--space-md));
        margin-right: calc(-1 * var(--space-md));
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hp-hero {
        gap: 2.5rem;
    }

    .hp-hero__cover {
        width: 220px;
        height: 220px;
    }

    .hp-hero__featured-meta {
        max-width: 220px;
    }
}


/* ── Catalog ───────────────────────────────────────── */

#app-content > .catalog-page {
    max-width: 100%;
    margin: 0;
    margin-top: calc(-1 * var(--space-2xl));
    padding: 0 0 var(--space-2xl);
    background: linear-gradient(180deg,
        #FFE4D6 0%,
        #FFEAD8 20%,
        #FFF3ED 40%,
        var(--color-bg) 65%
    );
}

.catalog-top {
    padding: 3rem 0 0;
    position: relative;
    overflow: hidden;
}

.catalog-top::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(232, 99, 74, 0.08) 0%, transparent 70%);
    top: -250px;
    right: -150px;
    border-radius: 50%;
    pointer-events: none;
}

.catalog-top::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 209, 102, 0.08) 0%, transparent 70%);
    bottom: -100px;
    left: -80px;
    border-radius: 50%;
    pointer-events: none;
}

.catalog-top__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
    z-index: 1;
}

.catalog-hero {
    text-align: center;
    padding-bottom: 2rem;
}

.catalog-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.catalog-hero__subtitle {
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.catalog-hero .search-form {
    justify-content: center;
    margin-top: 0;
}

.catalog-hero .search-input {
    max-width: 400px;
    border-radius: var(--radius-full);
    padding-left: 1.25rem;
}

.catalog-hero .btn {
    border-radius: var(--radius-full);
}

.catalog-body {
    padding-top: var(--space-xl);
}

.catalog-body > .podcast-grid {
    max-width: var(--container-wide);
}

.catalog-filters {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: var(--space-lg);
    position: relative;
}

.catalog-filters::-webkit-scrollbar {
    display: none;
}

.catalog-empty {
    text-align: center;
    padding: 4rem var(--space-xl);
}

.catalog-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--color-accent-light);
    border-radius: 50%;
    margin-bottom: var(--space-lg);
    color: var(--color-accent);
}

.catalog-empty__text {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-lg);
}

/* ── Catalog Shelves (Continue Listening + Category rows) ── */

.cat-shelf {
    margin-bottom: var(--space-xl);
}

.cat-shelf__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1rem;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

.cat-shelf__title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-primary);
}

.cat-shelf__link {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-accent);
    text-decoration: none;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.cat-shelf__link:hover { opacity: 0.7; }

.cat-shelf__row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

.cat-shelf__row::-webkit-scrollbar { display: none; }

.cat-shelf-card {
    flex-shrink: 0;
    width: 160px;
    scroll-snap-align: start;
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.3s ease;
    position: relative;
}

a.cat-shelf-card:hover,
.cat-shelf-card:hover {
    transform: translateY(-3px);
    color: var(--color-text);
}

.cat-shelf-card__link {
    display: block;
    text-decoration: none;
    color: var(--color-text);
}

.cat-shelf-card__link:hover {
    color: var(--color-text);
}

.cat-shelf-card__cover {
    width: 160px;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.cat-shelf-card:hover .cat-shelf-card__cover {
    box-shadow: 0 6px 20px rgba(232, 99, 74, 0.15);
}

.cat-shelf-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.cat-shelf-card:hover .cat-shelf-card__cover img {
    transform: scale(1.05);
}

.cat-shelf-card__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.cat-shelf-card__progress-fill {
    height: 100%;
    background: var(--color-accent);
}

.cat-shelf-card__duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    color: #fff;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: 0.6rem;
    font-weight: var(--weight-medium);
}

.cat-shelf-card__completed {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(22, 163, 74, 0.9);
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.cat-shelf-card__title {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.15rem;
}

.cat-shelf-card__author {
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* Dismiss button */
.cat-shelf-card__dismiss {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s, transform 0.2s;
    z-index: 2;
    padding: 0;
    line-height: 1;
}

.cat-shelf-card--dismissable:hover .cat-shelf-card__dismiss {
    opacity: 1;
}

.cat-shelf-card__dismiss:hover {
    background: rgba(220, 38, 38, 0.85);
    transform: scale(1.1);
}

/* Touch devices: always show dismiss */
@media (hover: none) {
    .cat-shelf-card__dismiss {
        opacity: 1;
        background: rgba(0, 0, 0, 0.5);
    }
}

/* Remove animation */
.cat-shelf-card--removing {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

/* Divider before "All Episodes" grid */
.cat-shelf__divider {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border-light);
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

@media (max-width: 767px) {
    .cat-shelf-card {
        width: 140px;
    }

    .cat-shelf-card__cover {
        width: 140px;
        height: 140px;
    }

    .cat-shelf__header {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }

    .cat-shelf__row {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }

    .cat-shelf__divider {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }
}


.podcast-card-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.podcast-card-progress__fill {
    height: 100%;
    background: var(--color-accent);
}

.podcast-card-completed {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(22, 163, 74, 0.9);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.podcast-card-cover:has(.podcast-card-completed) img {
    filter: saturate(0) opacity(0.65);
}

.podcast-card:hover .podcast-card-cover:has(.podcast-card-completed) img {
    filter: saturate(1) opacity(1);
}

.cat-shelf-card__cover:has(.cat-shelf-card__completed) img {
    filter: saturate(0) opacity(0.65);
}

.cat-shelf-card:hover .cat-shelf-card__cover:has(.cat-shelf-card__completed) img {
    filter: saturate(1) opacity(1);
}

/* From layout.css */
.catalog-page h1 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-lg);
}

.catalog-header {
    margin-bottom: var(--space-xl);
}

.search-form {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.search-input {
    flex: 1;
    max-width: 480px;
}

.search-results-info {
    margin-bottom: var(--space-xl);
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

@media (max-width: 767px) {
    .catalog-top {
        padding: 2rem 0 0;
    }

    .catalog-top__inner {
        padding: 0 var(--space-md);
    }

    .catalog-hero .search-form {
        flex-direction: column;
    }

    .catalog-hero .search-input {
        max-width: none;
    }

    .catalog-top > *,
    .acct-top > * {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }

    .search-form {
        flex-direction: column;
    }

    .search-input {
        max-width: none;
    }

    .catalog-filters {
        margin-left: calc(-1 * var(--space-md));
        margin-right: calc(-1 * var(--space-md));
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }

    .category-filter {
        flex-wrap: nowrap;
        padding-right: var(--space-md);
    }

    .pd-hero,
    .catalog-hero,
    .acct-hero,
    .pricing-hero {
        margin-left: calc(-1 * var(--space-md));
        margin-right: calc(-1 * var(--space-md));
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }
}


/* ── Podcast Detail ────────────────────────────────── */

.pd-hero {
    position: relative;
    margin-top: calc(-1 * var(--space-2xl));
    overflow: hidden;
    background: var(--color-primary);
}

.pd-hero__img {
    width: 100%;
    height: min(50vh, 440px);
}

.pd-hero__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.pd-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 30%, rgba(0,0,0,0.65) 100%);
    display: flex;
    align-items: flex-end;
}

.pd-hero__content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg) var(--space-xl);
    width: 100%;
    color: #fff;
}

.pd-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: var(--space-xs);
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.pd-hero__author {
    font-size: var(--text-lg);
    color: rgba(255,255,255,0.85);
    margin-bottom: var(--space-sm);
}

.pd-hero__author a {
    color: rgba(255,255,255,0.85);
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,0.4);
    text-underline-offset: 2px;
}

.pd-hero__author a:hover {
    color: #fff;
}

.pd-hero__meta {
    display: flex;
    gap: var(--space-lg);
    font-size: var(--text-sm);
    color: rgba(255,255,255,0.7);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.pd-hero__actions {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    flex-wrap: wrap;
    margin-top: var(--space-sm);
}

.pd-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-accent);
    color: #fff;
    padding: 0.85rem 2rem;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(232, 99, 74, 0.3);
}

.pd-play-btn:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(232, 99, 74, 0.4);
    color: #fff;
}

.pd-play-btn svg {
    flex-shrink: 0;
}

#app-content > .pd-body {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-xl);
}

.pd-section {
    margin-bottom: var(--space-2xl);
}

.pd-section__title {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-md);
}

.pd-description {
    font-family: var(--font-serif);
    line-height: var(--leading-loose);
    color: var(--color-text-secondary);
}

.pd-description h3 {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    margin: var(--space-lg) 0 var(--space-sm);
    color: var(--color-text);
}

.pd-description h3:first-child {
    margin-top: 0;
}

.pd-description strong {
    font-weight: var(--weight-semibold);
    color: var(--color-text);
}

.pd-description a {
    color: var(--color-accent);
    text-decoration: underline;
}

.pd-description ul {
    padding-left: var(--space-lg);
    margin: var(--space-sm) 0;
}

.pd-description li {
    margin-bottom: var(--space-xs);
}

.pd-completed-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: #4ade80;
    padding: 0.4rem 0.9rem;
    background: rgba(74, 222, 128, 0.15);
    border-radius: var(--radius-full);
}

.pd-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255,255,255,0.2);
    z-index: 2;
    overflow: hidden;
}

.pd-progress-bar__fill {
    height: 100%;
    background: var(--color-accent);
    transition: width 0.3s ease;
}

.pd-hero .pd-access-prompt {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius-xl);
}

.pd-hero .pd-access-prompt p {
    font-size: var(--text-sm);
    color: rgba(255,255,255,0.85);
    margin-bottom: var(--space-md);
}

.pd-hero .credit-cost-badge,
.pd-hero .purchase-badge,
.pd-hero .subscription-badge {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    backdrop-filter: blur(4px);
}

.pd-hero .podcast-lang-selector label {
    color: rgba(255,255,255,0.7);
}

.pd-hero .podcast-lang-dropdown {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.25);
    color: #fff;
}

.pd-hero .podcast-categories {
    margin-bottom: var(--space-md);
}

.pd-hero .btn-outline {
    border-color: rgba(255,255,255,0.5);
    color: #fff;
}

.pd-hero .btn-outline:hover {
    background: rgba(255,255,255,0.1);
}

/* Old podcast detail classes from layout.css */
.podcast-detail {
    max-width: 900px;
}

.podcast-hero {
    display: flex;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.podcast-hero-cover {
    flex-shrink: 0;
    width: 260px;
    height: 260px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.podcast-hero-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.podcast-hero-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.podcast-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-sm);
}

.podcast-author {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
}

.podcast-meta {
    display: flex;
    gap: var(--space-lg);
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

.podcast-actions {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
    flex-wrap: wrap;
}

.access-prompt {
    background: var(--color-bg-alt);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
}

.access-prompt p {
    margin-bottom: var(--space-md);
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.access-prompt .btn + .btn {
    margin-left: var(--space-sm);
}

.podcast-lang-selector {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.podcast-lang-selector label {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-text-secondary);
}

.podcast-lang-dropdown {
    padding: 4px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    background: var(--color-surface);
    color: var(--color-text);
}

.podcast-section {
    margin-bottom: var(--space-2xl);
}

.podcast-section h2 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border-light);
}

.podcast-description {
    line-height: var(--leading-loose);
    color: var(--color-text-secondary);
}

.podcast-description h3 {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    margin: var(--space-lg) 0 var(--space-sm);
    color: var(--color-text);
}

.podcast-description h3:first-child {
    margin-top: 0;
}

.podcast-description strong {
    font-weight: var(--weight-semibold);
    color: var(--color-text);
}

.podcast-description a {
    color: var(--color-accent);
    text-decoration: underline;
}

.podcast-description ul {
    padding-left: var(--space-lg);
    margin: var(--space-sm) 0;
}

.podcast-description li {
    margin-bottom: var(--space-xs);
}

.article-reference {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm) var(--space-md);
    padding: var(--space-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
}

.article-link {
    font-weight: var(--weight-medium);
    color: var(--color-accent);
    text-decoration: none;
}

.article-link:hover {
    text-decoration: underline;
}

.license-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

@media (max-width: 767px) {
    .pd-hero__img {
        height: 280px;
    }

    .pd-hero__overlay {
        background: linear-gradient(to bottom, transparent 15%, rgba(0,0,0,0.75) 100%);
    }

    .pd-hero__content {
        padding: 0 var(--space-md) var(--space-lg);
    }

    .pd-hero__title {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
    }

    #app-content > .pd-body {
        padding: var(--space-lg) var(--space-md);
    }

    /* Old layout.css podcast classes */
    .podcast-hero {
        flex-direction: column;
        gap: var(--space-lg);
    }

    .podcast-hero-cover {
        width: 100%;
        max-width: 300px;
        height: auto;
        aspect-ratio: 1;
        margin: 0 auto;
    }

    .podcast-title {
        font-size: var(--text-2xl);
    }

    .podcast-meta {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .podcast-hero-cover {
        width: 200px;
        height: 200px;
    }
}


/* ── Comments ──────────────────────────────────────── */

.comment {
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-border-light);
}

.comment:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xs);
}

.comment-author {
    font-family: var(--font-heading);
    font-weight: var(--weight-semibold);
    font-size: var(--text-sm);
}

.comment-time {
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.comment-body {
    color: var(--color-text-secondary);
    line-height: var(--leading-normal);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.comment-form {
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border-light);
}

.comment-login-prompt {
    margin-top: var(--space-lg);
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.comment-count {
    font-weight: var(--weight-normal);
    color: var(--color-text-muted);
}


/* ── Account Dashboard ─────────────────────────────── */

.acct-top {
    padding: 2.5rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.acct-top::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(232, 99, 74, 0.08) 0%, transparent 70%);
    top: -250px;
    right: -150px;
    border-radius: 50%;
    pointer-events: none;
}

.acct-top::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 209, 102, 0.08) 0%, transparent 70%);
    bottom: -100px;
    left: -80px;
    border-radius: 50%;
    pointer-events: none;
}

.acct-top__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
    z-index: 1;
}

.acct-greeting {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    color: var(--color-primary);
}

.acct-greeting em {
    font-style: normal;
    color: var(--color-accent);
}

.acct-greeting-sub {
    color: var(--color-text-secondary);
    margin-top: 0.25rem;
}

.acct-quick-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.acct-stat {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.acct-stat__number {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    color: var(--color-accent);
}

.acct-stat__label {
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
}

.acct-nav-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.acct-nav-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    text-decoration: none;
    color: var(--color-text);
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.acct-nav-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-warm);
    color: var(--color-text);
}

.acct-nav-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--color-accent-light);
    color: var(--color-accent);
    border-radius: var(--radius-md);
    font-size: var(--text-lg);
    flex-shrink: 0;
}

.acct-nav-card__text {
    flex: 1;
    min-width: 0;
}

.acct-nav-card__title {
    display: block;
    font-family: var(--font-heading);
    font-weight: var(--weight-semibold);
    font-size: var(--text-base);
}

.acct-nav-card__desc {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acct-nav-card__arrow {
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.acct-review-link {
    text-align: center;
}

@media (max-width: 767px) {
    .acct-top {
        padding: 1.5rem 0 1.5rem;
        text-align: center;
    }

    .acct-top__inner {
        padding: 0 var(--space-md);
    }

    .acct-quick-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
        margin-top: var(--space-lg);
    }

    .acct-stat {
        padding: var(--space-sm);
    }

    .acct-nav-grid {
        grid-template-columns: 1fr;
    }

    .acct-nav-card {
        padding: var(--space-md);
    }

    .acct-body {
        padding-top: var(--space-md);
    }
}


/* ── Account Sub-pages (shared) ────────────────────── */

.acct-sub-hero {
    background: none;
    padding: 1.5rem 0;
    position: relative;
    overflow: hidden;
}

.acct-back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
    position: relative;
    z-index: 1;
}

.acct-back-link:hover {
    color: var(--color-accent);
}

.acct-sub-title {
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 800;
    color: var(--color-primary);
    margin-top: var(--space-xs);
    position: relative;
    z-index: 1;
}

.acct-sub-content {
    padding-top: var(--space-lg);
}

@media (max-width: 767px) {
    .acct-sub-hero {
        padding: 1rem 0;
    }

    .acct-sub-content {
        padding-top: var(--space-md);
    }
}


/* ── Account: Profile ──────────────────────────────── */

.acct-profile-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-xl);
    border: 1px solid var(--color-border-light);
    margin-bottom: var(--space-xl);
}

.acct-profile-card h2 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border-light);
}

/* Profile page limits sub-content width */
.acct-sub-content--profile {
    max-width: 600px;
}

@media (max-width: 767px) {
    .acct-sub-content--profile {
        max-width: none;
    }

    .acct-profile-card {
        padding: var(--space-md);
    }
}


/* ── Account: Credits ──────────────────────────────── */

.acct-credit-section {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-xl);
    border: 1px solid var(--color-border-light);
    margin-bottom: var(--space-xl);
}

.acct-credit-section h2 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border-light);
}

.acct-credit-cards {
    display: none;
}

.acct-credit-card {
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
}

.acct-credit-card:last-child {
    margin-bottom: 0;
}

.acct-credit-card__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xs) 0;
}

.acct-credit-card__label {
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    font-weight: var(--weight-medium);
}

.acct-credit-card__value {
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
}

.acct-credit-card--muted {
    opacity: 0.5;
}

.acct-promo-section {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-xl);
    border: 1px solid var(--color-border-light);
}

.acct-promo-section h3 {
    font-size: var(--text-base);
    margin-bottom: var(--space-md);
}

.acct-promo-form {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-start;
}

.acct-promo-form .form-input {
    flex: 1;
}

.acct-promo-link {
    margin-top: var(--space-lg);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

/* Credits page limits sub-content width */
.acct-sub-content--credits {
    max-width: 700px;
}

@media (max-width: 767px) {
    .acct-sub-content--credits {
        max-width: none;
    }

    .acct-credit-section {
        padding: var(--space-md);
    }

    .acct-credit-section .table {
        display: none;
    }

    .acct-credit-cards {
        display: block;
    }

    .acct-promo-section {
        padding: var(--space-md);
    }
}


/* ── Account: Library ──────────────────────────────── */

.acct-library-count {
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
    font-size: var(--text-sm);
}

.library-item__progress {
    height: 3px;
    background: var(--color-border-light);
    border-radius: 2px;
    overflow: hidden;
    margin-top: var(--space-xs);
}

.library-item__progress-fill {
    height: 100%;
    background: var(--color-accent);
    border-radius: 2px;
}

.library-item__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    margin-top: var(--space-xs);
}

.library-item__badge--completed {
    color: #16a34a;
    background: rgba(22, 163, 74, 0.1);
}

.library-item__badge--progress {
    color: var(--color-accent);
    background: rgba(232, 99, 74, 0.1);
}

@media (max-width: 767px) {
    .library-grid {
        grid-template-columns: 1fr;
    }
}


/* ── Account: Stats ────────────────────────────────── */

.acct-stats-section {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-xl);
    border: 1px solid var(--color-border-light);
    margin-bottom: var(--space-xl);
}

.acct-stats-section h2 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border-light);
}

/* Stats page limits sub-content width */
.acct-sub-content--stats {
    max-width: 700px;
}

@media (max-width: 767px) {
    .acct-sub-content--stats {
        max-width: none;
    }

    .acct-stats-section {
        padding: var(--space-md);
    }

    .user-monthly-chart canvas {
        max-height: 140px;
    }
}


/* ── Account: History ──────────────────────────────── */

.history-progress-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: var(--weight-semibold);
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.history-progress-badge--completed {
    color: #16a34a;
    background: rgba(22, 163, 74, 0.1);
}

.history-progress-badge--progress {
    color: var(--color-accent);
    background: rgba(232, 99, 74, 0.1);
}

@media (max-width: 767px) {
    .history-title {
        white-space: normal;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .history-item {
        min-height: 56px;
    }
}


/* ── Account: Devices ──────────────────────────────── */

.device-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.device-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-fast);
}

.device-item.is-current {
    border-color: var(--color-accent);
    background: linear-gradient(135deg, rgba(232, 99, 74, 0.03) 0%, var(--color-surface) 100%);
}

.device-item.is-revoked {
    opacity: 0.5;
}

.device-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--color-accent-light);
    color: var(--color-accent);
    border-radius: var(--radius-md);
    font-size: var(--text-lg);
    flex-shrink: 0;
}

.device-meta {
    flex: 1;
    min-width: 0;
}

.device-name {
    display: block;
    font-family: var(--font-heading);
    font-weight: var(--weight-semibold);
    font-size: var(--text-base);
    color: var(--color-text);
}

.device-detail {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-top: 2px;
}

.device-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: var(--weight-semibold);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    white-space: nowrap;
    margin-top: 4px;
}

.device-badge--current {
    color: var(--color-accent);
    background: rgba(232, 99, 74, 0.1);
}

.device-badge--revoked {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

.device-actions {
    flex-shrink: 0;
}

.device-actions form {
    margin: 0;
}

.device-revoke-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.device-revoke-btn:hover {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.3);
}

.device-count-note {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
}

@media (max-width: 767px) {
    .device-item {
        flex-wrap: wrap;
        padding: var(--space-md);
    }

    .device-actions {
        width: 100%;
        margin-top: var(--space-xs);
    }

    .device-revoke-btn {
        width: 100%;
        justify-content: center;
    }
}


/* ── Legacy Account Styles (from layout.css) ───────── */

.account-page h1 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-xl);
}

.account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
}

.account-section {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-xl);
}

.account-section h2 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border-light);
}

.account-section--full {
    grid-column: 1 / -1;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.profile-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-label {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    font-weight: var(--weight-medium);
}

.profile-value {
    font-weight: var(--weight-medium);
}

.credits-summary {
    margin-bottom: var(--space-lg);
}

.credit-badge {
    display: inline-block;
    padding: var(--space-sm) var(--space-md);
    background: var(--color-accent-light);
    color: var(--color-accent);
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
}

.credit-badge--subscription { background: var(--color-success-bg); color: var(--color-success); }
.credit-badge--unlimited { background: var(--color-success-bg); color: var(--color-success); }
.credit-badge--empty { background: var(--color-danger-bg); color: var(--color-danger); }

.credits-cta {
    margin-top: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.history-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    color: var(--color-text);
    text-decoration: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.history-item:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-warm);
}

.history-duration {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
}

.history-cover {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.history-meta {
    flex: 1;
    min-width: 0;
}

.history-title {
    display: block;
    font-weight: var(--weight-medium);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-author {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.history-date {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .account-grid {
        grid-template-columns: 1fr;
    }

    .account-section {
        padding: var(--space-md);
    }
}


/* ── Pricing ───────────────────────────────────────── */

.pricing-hero {
    background: linear-gradient(150deg, #FFF6F0 0%, #FFE4D6 40%, #FFF0EE 70%, #FFF5FF 100%);
    padding: 3rem 0 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pricing-hero::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(232, 99, 74, 0.06) 0%, transparent 70%);
    top: -180px;
    right: -80px;
    border-radius: 50%;
    pointer-events: none;
}

.pricing-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.pricing-hero__subtitle {
    color: var(--color-text-secondary);
    max-width: 520px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.pricing-current {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
    text-align: center;
}

.pricing-section__desc {
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.pricing-per-credit {
    color: var(--color-text-muted);
    font-size: 0.85em;
}

.pricing-promo-form {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
    max-width: 400px;
}

.pricing-promo-form .form-group {
    flex: 1;
    margin-bottom: 0;
}

@media (max-width: 767px) {
    .pricing-hero {
        padding: 2rem 0 1.5rem;
    }
}


/* ── Promo result states (JS class toggling) ───────── */

.promo-result--loading {
    color: var(--color-text-muted);
}

.promo-result--success {
    color: var(--color-success);
    font-weight: 600;
}

.promo-result--error {
    color: var(--color-danger);
}
