/* Shared public/member hierarchy and contrast. No admin-side layout overrides. */
body.rv-member-page {
    --rv-member-gradient: linear-gradient(to right, #ce2842 0%, #a60a15 50%, #7f080f 100%);
    --rv-member-header-gradient: var(--rv-member-gradient);
    --rv-member-tab-gradient: var(--rv-member-gradient);
    --rv-member-tab-ink: #fff;
    --rv-member-tab-soft: linear-gradient(110deg, #fff7f8, #f9e5ea);
    --rv-member-tab-hover: linear-gradient(110deg, #fff0f3, #f2d5dd);
    --rv-member-tab-muted: #78283b;
    --rv-member-tab-line: #e8c9d1;
}

/* Headers and in-page navigation share the primary button's brand palette. */
body.rv-member-page :is(.rv-member-hero, .story-explorer-heading, .rv-character-heading, .rv-story-hero, .sg-archive-hero, .sg-masthead, .rv-dashboard-hero, .rv-fc-hero, .rv-terms-hero, .rv-taxonomy-hero, .rv-calendar-hero) {
    background-image: var(--rv-member-header-gradient) !important;
}
body.rv-member-page .content-wrapper :is(.nav-pills .nav-link, .nav-tabs .nav-link, .rv-character-nav a, .rv-story-jump a, .rv-list-tabs .btn, .cr-tab, .rv-taxonomy-switch-link):not(.disabled) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px !important;
    padding: 3px 11px 5px !important;
    border: 1px solid var(--rv-member-tab-line);
    border-radius: 6px;
    background: var(--rv-member-tab-soft) !important;
    color: var(--rv-member-tab-muted) !important;
    font-size: .8125rem !important;
    line-height: 20px;
    font-weight: 500;
    text-decoration: none;
}
body.rv-member-page .content-wrapper :is(.nav-pills .nav-link, .nav-tabs .nav-link, .rv-character-nav a, .rv-story-jump a, .rv-list-tabs .btn, .cr-tab, .rv-taxonomy-switch-link):not(.disabled):hover {
    background: var(--rv-member-tab-hover) !important;
}
body.rv-member-page .content-wrapper :is(.nav-pills .nav-link, .nav-tabs .nav-link, .rv-character-nav a, .rv-story-jump a, .rv-list-tabs .btn, .cr-tab, .rv-taxonomy-switch-link):not(.disabled):is(.active, .is-active, [aria-current="location"], [aria-current="page"]) {
    background: var(--rv-member-tab-gradient) !important;
    color: var(--rv-member-tab-ink) !important;
    border-color: transparent;
    font-weight: 600;
}

/* Mekar Putih retains its white/silver identity with a visible icy gradient. */
body.rv-member-page .story-mekar-putih {
    --rv-member-header-gradient: linear-gradient(110deg, #ffffff 0%, #e3eff8 45%, #b5cfdf 100%);
    --rv-member-tab-gradient: linear-gradient(110deg, #ffffff 0%, #dfedf7 45%, #b2ccdf 100%);
    --rv-member-tab-ink: #173649;
    --rv-member-tab-soft: linear-gradient(110deg, #ffffff, #edf4f9);
    --rv-member-tab-hover: linear-gradient(110deg, #f9fdff, #d4e5f0);
    --rv-member-tab-muted: #31566d;
    --rv-member-tab-line: #b6ccdc;
}

.rv-member-breadcrumb {
    --rv-crumb-text: #51505a;
    margin: 0 0 20px;
    padding: 0;
    width: 100%;
    font-size: .84rem;
    line-height: 1.65;
    font-weight: 600;
    color: #322e35;
}
.rv-member-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 9px;
    row-gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.rv-member-breadcrumb li { display: inline-flex; align-items: center; min-width: 0; overflow-wrap: anywhere; }
.rv-member-breadcrumb li + li::before {
    content: '/';
    color: #a69aa1;
    margin-right: 9px;
    font-weight: 400;
}
.rv-member-breadcrumb a,
.rv-character .rv-member-breadcrumb a,
.rv-story .rv-member-breadcrumb a {
    color: var(--rv-crumb-text) !important;
    text-decoration: none;
    font-weight: 500;
}
.rv-member-breadcrumb a:hover,
.rv-member-breadcrumb a:focus-visible,
.rv-character .rv-member-breadcrumb a:hover,
.rv-story .rv-member-breadcrumb a:hover {
    color: #a60a15 !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.rv-member-breadcrumb [aria-current="page"] {
    color: #861429;
    font-weight: 700;
}
/* Match the site's existing navigation clearance on every public/member page. */
.layout-without-menu .content-wrapper > :is(.container, .container-fluid, main) {
    color: #272b34;
    font-weight: 400;
}
.layout-without-menu .content-wrapper > :is(.container, .container-fluid, main) .text-muted {
    color: #555b66 !important;
}
.layout-without-menu .content-wrapper > :is(.container, .container-fluid, main) .fw-light {
    font-weight: 400 !important;
}
.layout-without-menu .content-wrapper > :is(.container, .container-fluid, main) .card-text {
    color: #30323a;
}
/* Red brand treatment shared by the public story and character entry pages. */
.rv-member-hero,
.story-explorer .story-explorer-heading {
    max-width: none;
    width: 100%;
    padding: 26px 30px;
    border: 1px solid #9b1729;
    border-radius: 12px;
    background-color: #a60a15;
    background-image: linear-gradient(112deg, #df4058 0%, #bc253b 42%, #760914 100%);
    box-shadow: 0 12px 32px rgba(107, 9, 29, .12);
    color: #fff;
}
.rv-member-hero h1,
.story-explorer .story-explorer-heading h1,
.story-explorer .story-explorer-heading .h1 {
    color: #fff !important;
    font-weight: 700;
    line-height: 1.28;
}
.rv-member-hero p,
.story-explorer .story-explorer-heading p,
.story-explorer .story-explorer-heading .text-primary,
.story-explorer .story-explorer-heading .text-muted {
    color: #fff !important;
    opacity: .93;
}
.rv-member-hero { margin-bottom: 23px; }
.rv-member-hero h1 { font-size: clamp(1.55rem, 3vw, 2.25rem); margin: 0 0 6px; }
.rv-member-hero p { margin: 0; font-size: .86rem; }
#character-rankings .cr-metric-caption,
#character-rankings .cr-list-meta a,
#character-rankings .cr-nickname,
.story-explorer .story-explorer-type,
.story-explorer .story-explorer-alias {
    color: #4e515b;
}
/* Mekar Putih is the only story-specific palette exception. */
html.mekar-putih-page .rv-member-breadcrumb a,
html.mekar-putih-page .rv-story .rv-member-breadcrumb a {
    color: #315971 !important;
}
html.mekar-putih-page .rv-member-breadcrumb [aria-current="page"] {
    color: #173a52;
}
html.mekar-putih-page .rv-member-breadcrumb li + li::before { color: #6888a0; }
html[data-rpv-reader-theme="dark"] .chapter-reader-page .rv-member-breadcrumb a { color: #c7d7e5 !important; }
html[data-rpv-reader-theme="dark"] .chapter-reader-page .rv-member-breadcrumb [aria-current="page"] { color: #eff7ff; }
@media (max-width: 575.98px) {
    .rv-member-breadcrumb { font-size: .78rem; margin-bottom: 16px; }
    .rv-member-hero, .story-explorer .story-explorer-heading { padding: 22px 20px; }
}
