/* Shared Character Funnel card palette with the admin catalog. */
.story-catalog-wrapper {
    --cf-catalog-control-size: 48px;
}

/* This stylesheet is loaded only by /stories. Let the rainbow meet the hero. */
#header-main-wrapper {
    border-bottom-width: 0;
}

/* Warm brand colors, ending in blue without the former green stop. */
.cf-catalog-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 64px 32px 60px;
    color: #fff;
    background: linear-gradient(180deg, #fc9942 0%, #e525d7 30%, #4361e9 100%);
}

.cf-catalog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, #17204447 0%, #17204447 60%, #17204400 100%);
    pointer-events: none;
}

.cf-catalog-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    align-items: center;
    gap: 40px;
    max-width: 1120px;
    margin: 0 auto;
}

.cf-catalog-hero-copy {
    min-width: 0;
    padding: 12px 0;
}

.cf-catalog-hero-badge {
    display: inline-block;
    max-width: 100%;
    padding: 8px 18px;
    border: 1px solid #ffffff5c;
    border-radius: 999px;
    background: #1521478c;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.cf-catalog-hero-title {
    margin: 16px 0 12px;
    color: #fff;
    font-family: inherit;
    font-size: clamp(36px, 4.5vw, 60px);
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -.025em;
    text-shadow: 0 2px 12px #17204426;
    overflow-wrap: anywhere;
}

.cf-catalog-hero-subtitle {
    max-width: 630px;
    margin: 0;
    color: #fff;
    font-size: clamp(18px, 1.8vw, 22px);
    font-weight: 600;
    line-height: 1.8;
    text-wrap: pretty;
    overflow-wrap: anywhere;
}

.cf-catalog-hero-art {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.cf-catalog-hero-mascot {
    display: block;
    width: auto;
    height: clamp(240px, 23vw, 310px);
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 12px 14px #1720442e);
}

@media (max-width: 639px) {
    .cf-catalog-hero {
        padding: 40px 20px 34px;
    }

    .cf-catalog-hero-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        text-align: center;
    }

    .cf-catalog-hero-copy {
        padding: 0;
    }

    .cf-catalog-hero-title {
        margin: 14px 0 8px;
    }

    .cf-catalog-hero-subtitle {
        margin: 0 auto;
        font-size: 18px;
    }

    .cf-catalog-hero-mascot {
        height: 168px;
    }

    .cf-catalog-hero::before {
        background: #17204429;
    }
}

.story-catalog-wrapper .cf-catalog-card {
    min-width: 0;
}

.story-catalog-wrapper .cf-catalog-art {
    isolation: isolate;
    background: radial-gradient(ellipse at 48% 120%, #f4e2c7 0, transparent 60%), #fbf7f0;
}

.story-catalog-wrapper .cf-catalog-card:nth-child(3n + 2) .cf-catalog-art {
    background: radial-gradient(ellipse at 48% 120%, #dce9e2 0, transparent 60%), #f3f7f4;
}

.story-catalog-wrapper .cf-catalog-card:nth-child(3n) .cf-catalog-art {
    background: radial-gradient(ellipse at 48% 120%, #e5e2f2 0, transparent 60%), #f6f5fa;
}

.story-catalog-wrapper .cf-catalog-art::before {
    content: '';
    position: absolute;
    z-index: -1;
    bottom: -20px;
    width: 145px;
    height: 145px;
    border-radius: 50%;
    background: #ffffff70;
    pointer-events: none;
}

.story-catalog-wrapper .cf-catalog-image {
    width: 100%;
    height: 160px;
    padding: 0 32px;
    object-fit: contain;
    filter: drop-shadow(0 6px 5px #483e2b0d);
}

.story-catalog-wrapper .cf-catalog-filter,
.story-catalog-wrapper .cf-catalog-action,
.story-catalog-wrapper .cf-catalog-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--cf-catalog-control-size);
    font-size: 14px;
    line-height: 1.5;
    touch-action: manipulation;
}

.story-catalog-wrapper .cf-catalog-filters {
    gap: 8px;
}

.story-catalog-wrapper .cf-catalog-filter {
    flex-shrink: 0;
    padding: 12px 16px;
    white-space: nowrap;
}

.story-catalog-wrapper .cf-catalog-action {
    gap: 10px;
    padding: 12px 16px;
    text-align: center;
    overflow-wrap: anywhere;
}

.story-catalog-wrapper .cf-catalog-action i {
    flex-shrink: 0;
}

.story-catalog-wrapper .cf-catalog-search input:is([type="text"], [type="search"]) {
    min-height: var(--cf-catalog-control-size);
    font-size: 16px;
}

.story-catalog-wrapper .cf-catalog-search i {
    top: 50%;
    transform: translateY(-50%);
}

.story-catalog-wrapper .cf-catalog-pagination {
    flex-wrap: wrap;
    gap: 8px;
}

.story-catalog-wrapper .cf-catalog-pagination a {
    min-width: var(--cf-catalog-control-size);
    padding: 10px;
}

#cf-catalog-app [hidden] {
    display: none !important;
}

.story-catalog-wrapper .cf-catalog-filter[aria-current="true"] {
    background: #f59e0b;
    color: #fff;
    box-shadow: 0 2px 4px #17204414;
}

.story-catalog-wrapper .cf-catalog-filter[data-access="free"][aria-current="true"] {
    background: #059669;
}

.story-catalog-wrapper .cf-catalog-filter[data-access="member"][aria-current="true"] {
    background: #2563eb;
}

.story-catalog-wrapper .cf-catalog-filter[data-access="paid"][aria-current="true"] {
    background: #9333ea;
}

.cf-catalog-load-state {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
    text-align: center;
}

#cf-catalog-status {
    flex-basis: 100%;
    min-height: 24px;
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.cf-catalog-utility {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--cf-catalog-control-size);
    padding: 12px 20px;
    border: 1px solid #d9dfe8;
    border-radius: 12px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    touch-action: manipulation;
}

.cf-catalog-utility:hover {
    background: #f1f5f9;
}

.cf-catalog-utility:disabled {
    cursor: wait;
    opacity: .6;
}

.cf-catalog-utility:focus-visible {
    outline: 3px solid #f4b956;
    outline-offset: 3px;
}

#cf-catalog-sentinel {
    height: 1px;
    pointer-events: none;
}

.story-catalog-wrapper :is(.cf-catalog-filter, .cf-catalog-action, .cf-catalog-pagination a):focus-visible {
    outline: 3px solid #f4b956;
    outline-offset: 3px;
}

@media (pointer: coarse), (max-width: 1024px) {
    .story-catalog-wrapper {
        --cf-catalog-control-size: 52px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .story-catalog-wrapper *,
    .story-catalog-wrapper *::before,
    .story-catalog-wrapper *::after {
        animation: none !important;
        transition: none !important;
    }

    .story-catalog-wrapper .cf-catalog-image {
        transform: none !important;
    }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .story-catalog-wrapper .cf-catalog-card:hover .cf-catalog-image {
        transform: translateY(-3px) scale(1.04);
    }
}
