/* Roleplayverse Home: editorial layout. All selectors are Home-scoped.
   The original .overlay-bg, including its 70% opacity, is untouched. */
.rv-home-page {
    --rv-home-red: #ce2842;
    --rv-home-dark-red: #9e102b;
    --rv-home-ink: #24232a;
    --rv-home-body: #46414b;
    --rv-home-muted: #625b65;
    --rv-home-line: #e8dce0;
    --rv-home-surface: #fff;
    color: var(--rv-home-ink);
}
.rv-home-page *, .rv-home-page *::before, .rv-home-page *::after { box-sizing: border-box; }
.rv-home-page a { text-decoration: none; }
.rv-home-page a:focus-visible { outline: 3px solid var(--rv-home-red); outline-offset: 3px; }
.rv-home-page .container { max-width: 1220px; }

/* The banner's image, overlay, title and description are preserved.
   This only balances its sizing and keeps its EXISTING caption visible on mobile. */
.rv-home-page .caraousel-banner .carousel-item > img {
    height: clamp(320px, 32vw, 430px);
    object-fit: cover;
}
.rv-home-page .caraousel-banner .carousel-caption {
    bottom: clamp(36px, 6vw, 75px);
    left: 14%;
    right: 14%;
    text-align: center;
}
.rv-home-page .caraousel-banner .carousel-caption h3 {
    color: #fff;
    font-size: clamp(1.85rem, 3.8vw, 3.5rem);
    font-weight: 700;
    line-height: 1.17;
    text-wrap: balance;
}
.rv-home-page .caraousel-banner .carousel-caption p {
    margin: 9px auto 0;
    max-width: 64ch;
    color: #fff;
    font-size: clamp(.9rem, 1.3vw, 1.08rem);
    font-weight: 500;
    line-height: 1.65;
}

/* Editorial welcome: all the original description wording is kept. */
.rv-home-intro {
    padding: clamp(52px, 6.5vw, 100px) 0 clamp(42px, 6vw, 84px);
    background: #fff;
}
.rv-home-intro-grid {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    gap: clamp(24px, 6vw, 100px);
    align-items: center;
}
.rv-home-kicker {
    margin: 0 0 12px;
    color: var(--rv-home-dark-red);
    font-size: .73rem;
    font-weight: 800;
    line-height: 1.45;
    letter-spacing: .1em;
}
.rv-home-intro-heading h2 {
    margin: 0;
    max-width: 14ch;
    color: var(--rv-home-ink);
    font-size: clamp(2.45rem, 4.2vw, 4.35rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.035em;
    overflow-wrap: anywhere;
}
.rv-home-intro-description h3 {
    margin: 0;
    color: #39333d;
    font-size: clamp(1.01rem, 1.4vw, 1.22rem);
    font-weight: 400;
    line-height: 1.85;
}
.rv-home-intro-description h3 b { color: var(--rv-home-dark-red); font-weight: 700 !important; }
.rv-home-intro-actions { display: flex; gap: 11px; flex-wrap: wrap; margin-top: 28px; }
.rv-home-primary-action, .rv-home-secondary-action {
    display: inline-flex;
    min-height: 45px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--rv-home-red);
    border-radius: 9px;
    padding: 10px 17px;
    font-size: .86rem;
    font-weight: 700;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.rv-home-primary-action, .rv-home-primary-action:visited { background: var(--rv-home-red); color: #fff; }
.rv-home-primary-action:hover { background: var(--rv-home-dark-red); border-color: var(--rv-home-dark-red); color: #fff; }
.rv-home-secondary-action, .rv-home-secondary-action:visited { background: #fff; color: var(--rv-home-dark-red); }
.rv-home-secondary-action:hover { background: #fff2f5; color: var(--rv-home-dark-red); }
.rv-home-intro-actions i { font-size: 1.16rem; }

/* Shared section typography and actions */
.rv-home-discover { background: #fff; }
.rv-home-discover-section { padding: clamp(29px, 3.4vw, 47px) 0; }
.rv-home-stories-section { background: #fff7f8; }
.rv-home-characters-section { background: #fff; }
.rv-home-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 15px 22px;
    margin-bottom: 19px;
}
.rv-home-section-heading h2 {
    margin: 0 0 8px;
    color: var(--rv-home-ink);
    font-size: clamp(1.9rem, 2.3vw, 2.7rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.025em;
}
.rv-home-section-intro {
    margin: 0;
    color: var(--rv-home-body);
    font-size: .97rem;
    font-weight: 400;
    line-height: 1.65;
}
.rv-home-section-link, .rv-home-section-link:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid #d5aeb7;
    border-radius: 9px;
    background: #fff;
    color: var(--rv-home-dark-red);
    font-size: .82rem;
    font-weight: 700;
    white-space: nowrap;
    transition: background-color .18s, color .18s, border-color .18s;
}
.rv-home-section-link:hover { background: var(--rv-home-red); border-color: var(--rv-home-red); color: #fff; }
.rv-home-section-link i, .rv-home-inline-link i { font-size: 1.25rem; }
.rv-home-inline-link, .rv-home-inline-link:visited {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
    color: var(--rv-home-dark-red);
    font-size: .84rem;
    font-weight: 800;
}
.rv-home-inline-link:hover { color: var(--rv-home-red); }

/* Home discovery: each story cover gets the same image slot. The artwork
   fills the slot instead of leaving white bands for unusual aspect ratios.
   Existing story card widths remain unchanged. */
.rv-home-story-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 265px));
    justify-content: center;
    align-items: stretch;
    grid-auto-rows: 1fr;
    gap: 16px;
}
.rv-home-story-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--rv-home-line);
    border-radius: 14px;
    transition: border-color .18s ease;
}
.rv-home-story-card:hover { border-color: #ce8898; }
.rv-home-story-cover {
    display: block;
    width: 100%;
    height: 160px;
    flex: 0 0 160px;
    min-width: 0;
    overflow: hidden;
    background: #f7f0f2;
}
.rv-home-story-cover img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: center;
}
.rv-home-story-card:hover .rv-home-story-cover img { transform: none; }
.rv-home-story-copy {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    min-height: 136px;
    padding: 11px 13px;
}
.rv-home-story-status {
    display: inline-block;
    margin: 0 0 5px;
    padding: 3px 7px;
    border: 1px solid #e9cbd1;
    border-radius: 6px;
    background: #fff4f6;
    color: var(--rv-home-dark-red);
    font-size: .67rem;
    font-weight: 700;
}
.rv-home-story-copy h3, .rv-home-character-copy h3 {
    min-width: 0;
    margin: 0 0 5px;
    color: var(--rv-home-ink);
    font-size: clamp(.94rem, 1.05vw, 1.12rem);
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.rv-home-story-copy h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.rv-home-story-copy h3 a, .rv-home-character-copy h3 a { color: inherit; }
.rv-home-story-copy h3 a:hover, .rv-home-character-copy h3 a:hover { color: var(--rv-home-dark-red); }
.rv-home-story-excerpt, .rv-home-character-excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
    margin: 0 0 6px;
    color: var(--rv-home-body);
    font-size: .79rem;
    line-height: 1.4;
}
.rv-home-story-excerpt { -webkit-line-clamp: 1; }

/* Keep the existing 2-column, 500px-wide character cards. Four characters
   form two equal-height rows; portrait photos fill their entire left column. */
.rv-home-character-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 500px));
    align-items: stretch;
    grid-auto-rows: 160px;
    justify-content: center;
    gap: 16px;
}
.rv-home-character-card {
    display: grid;
    grid-template-columns: minmax(0, 170px) minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    align-items: stretch;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--rv-home-line);
    border-radius: 14px;
    background: #fff;
    transition: border-color .18s ease;
}
.rv-home-character-card:hover { border-color: #ce8898; }
.rv-home-character-photo {
    display: block;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: #f7f0f2;
}
.rv-home-character-photo img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: center;
}
.rv-home-character-card:hover .rv-home-character-photo img { transform: none; }
.rv-home-character-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    justify-content: flex-start;
    padding: 12px 14px;
}
.rv-home-character-copy h3 { margin-bottom: 4px; }
.rv-home-character-nickname { color: var(--rv-home-muted); font-size: .74rem; margin: 0 0 6px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }
.rv-home-character-copy h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.rv-home-character-excerpt { -webkit-line-clamp: 2; font-size: .77rem; }

/* Equalize section heights on desktop, including when only one of the
   showcases exists. Cards themselves remain compact and unchanged in width. */
@media (min-width: 992px) {
    .rv-home-discover { display: grid; grid-auto-rows: 1fr; }
    .rv-home-discover > .rv-home-discover-section { display: flex; align-items: center; }
    .rv-home-discover > .rv-home-discover-section > .container { width: 100%; }
}

/* Original feature images are 900×465px. Keep each card narrow enough for 2× screens. */
.rv-home-archive { padding: clamp(44px, 5vw, 70px) 0 clamp(38px, 5vw, 68px); background: #fff; }
.rv-home-archive-heading { margin-bottom: 24px; }
.rv-home-feature-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.rv-home-feature { grid-column: span 4; min-width: 0; }
.rv-home-feature--lead { grid-column: span 4; }
.rv-home-feature .card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--rv-home-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: none !important;
    transition: border-color .18s ease;
}
.rv-home-feature .card:hover { border-color: #ce8898; box-shadow: none !important; }
.rv-home-feature .card-img-top {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 900 / 465;
    object-fit: contain;
    border-radius: 0;
    background: #f4e8ec;
}
.rv-home-feature--lead .card-img-top { height: auto; }
.rv-home-feature .card-body { padding: 20px 19px 12px; }
.rv-home-feature .card-title {
    margin: 0 0 11px;
    color: var(--rv-home-ink);
    font-size: 1.06rem;
    font-weight: 800;
    line-height: 1.35;
}
.rv-home-feature--lead .card-title { font-size: 1.35rem; }
.rv-home-feature .card-text {
    margin: 0;
    color: var(--rv-home-body);
    font-size: .87rem;
    font-weight: 400;
    line-height: 1.75;
}
.rv-home-feature .card-footer {
    margin-top: auto;
    padding: 6px 19px 22px !important;
    border: 0;
    background: transparent;
}
.rv-home-feature .card-footer .btn, .rv-home-feature .card-footer .btn:visited {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-height: 39px;
    border: 1px solid var(--rv-home-red);
    border-radius: 8px;
    padding: 8px 14px !important;
    background: #fff;
    color: var(--rv-home-dark-red);
    font-size: .82rem;
    font-weight: 700;
    box-shadow: none !important;
}
.rv-home-feature .card-footer .btn:hover,
.rv-home-feature .card-footer .btn:focus-visible { background: var(--rv-home-red); color: #fff; border-color: var(--rv-home-red); }
.rv-home-feature .card-footer .btn i { font-size: 1.15rem; }

@media (max-width: 1199.98px) {
    .rv-home-page .container { max-width: 960px; }
    .rv-home-feature, .rv-home-feature--lead, .rv-home-feature:not(.rv-home-feature--lead) { grid-column: span 6; }
}
@media (max-width: 991.98px) {
    .rv-home-page .container { max-width: 720px; }
    .rv-home-intro-grid { grid-template-columns: 1fr; gap: 22px; }
    .rv-home-intro-heading h2 { max-width: none; }
    .rv-home-story-grid { grid-template-columns: repeat(3, minmax(0, 215px)); }
    .rv-home-story-cover { height: 155px; flex-basis: 155px; }
    .rv-home-character-grid { grid-template-columns: minmax(0, 620px); }
}
@media (max-width: 767.98px) {
    .rv-home-page .container { max-width: 540px; }
    .rv-home-feature-grid { max-width: 450px; margin-inline: auto; }
    /* On tablets and phones: one full row per story, like Characters. */
    .rv-home-story-grid { grid-template-columns: minmax(0, 540px); max-width: 540px; margin-inline: auto; }
    .rv-home-story-card { flex-direction: row; height: 168px; min-height: 0; }
    .rv-home-story-cover { width: 35%; height: 100%; flex: 0 0 35%; }
    .rv-home-story-copy { min-height: 0; padding: 12px 14px; }
    .rv-home-character-grid { max-width: 540px; margin-inline: auto; }
    .rv-home-page .caraousel-banner .carousel-item > img { height: 355px; }
    .rv-home-page .caraousel-banner .carousel-caption { display: block !important; left: 11%; right: 11%; bottom: 50px; }
    .rv-home-page .caraousel-banner .carousel-caption h3 { font-size: clamp(1.5rem, 6vw, 2.15rem); }
    .rv-home-page .caraousel-banner .carousel-caption p { font-size: .86rem; line-height: 1.55; }
    .rv-home-feature { grid-column: span 6; }
    .rv-home-feature--lead { grid-column: span 12; }
    .rv-home-feature--lead .card-img-top { height: auto; }
}
@media (max-width: 575.98px) {
    .rv-home-page .container { max-width: 100%; padding-left: 17px; padding-right: 17px; }
    .rv-home-page .caraousel-banner .carousel-item > img { height: 340px; }
    .rv-home-intro { padding-top: 43px; padding-bottom: 39px; }
    .rv-home-intro-heading h2 { font-size: 2.42rem; }
    .rv-home-intro-description h3 { font-size: .98rem; line-height: 1.75; }
    .rv-home-intro-actions { margin-top: 20px; }
    .rv-home-primary-action, .rv-home-secondary-action { font-size: .79rem; padding: 9px 12px; }
    .rv-home-discover-section { padding: 29px 0; }
    .rv-home-section-heading { display: block; margin-bottom: 17px; }
    .rv-home-section-heading h2 { font-size: 1.75rem; }
    .rv-home-section-intro { font-size: .88rem; }
    .rv-home-section-link { margin-top: 15px; min-height: 38px; padding: 7px 12px; font-size: .78rem; }
    .rv-home-story-grid, .rv-home-character-grid, .rv-home-feature-grid { gap: 13px; }
    .rv-home-story-grid { grid-template-columns: minmax(0, 1fr); max-width: 540px; margin-inline: auto; }
    .rv-home-story-card { height: 164px; }
    .rv-home-story-cover { width: 35%; height: 100%; flex-basis: 35%; }
    .rv-home-story-copy { min-height: 0; padding: 11px 12px; }
    .rv-home-story-copy h3 { font-size: .94rem; margin-bottom: 5px; }
    .rv-home-story-status { margin-bottom: 5px; font-size: .67rem; }
    .rv-home-story-excerpt { -webkit-line-clamp: 1; font-size: .75rem; margin-bottom: 6px; }
    .rv-home-character-grid { grid-auto-rows: 160px; }
    .rv-home-character-card { grid-template-columns: minmax(0, 35%) minmax(0, 1fr); }
    .rv-home-character-copy { padding: 11px 12px; }
    .rv-home-character-copy h3 { font-size: .95rem; }
    .rv-home-character-excerpt { font-size: .74rem; -webkit-line-clamp: 2; }
    .rv-home-character-nickname { font-size: .71rem; }
    .rv-home-inline-link { font-size: .76rem; }
    .rv-home-archive { padding: 38px 0 42px; }
    .rv-home-feature, .rv-home-feature:not(.rv-home-feature--lead) { grid-column: span 12; }
    .rv-home-feature .card { display: flex; flex-direction: column; min-height: 0; }
    .rv-home-feature .card-img-top { width: 100%; height: auto; aspect-ratio: 900 / 465; object-fit: contain; }
    .rv-home-feature .card-body { padding: 17px 17px 7px; }
    .rv-home-feature .card-title, .rv-home-feature--lead .card-title { font-size: .98rem; }
    .rv-home-feature .card-text { font-size: .83rem; line-height: 1.65; }
    .rv-home-feature .card-footer { padding: 4px 17px 18px !important; }
    .rv-home-feature .card-footer .btn { min-height: 34px; padding: 6px 10px !important; font-size: .76rem; }
}
@media (max-width: 359.98px) {
    .rv-home-story-grid { grid-template-columns: minmax(0, 1fr); }
    .rv-home-story-card { height: 160px; }
    .rv-home-story-cover { width: 33%; height: 100%; flex-basis: 33%; }
    .rv-home-character-grid { grid-auto-rows: 160px; }
    .rv-home-character-card { grid-template-columns: minmax(0, 33%) minmax(0, 1fr); }
    .rv-home-character-excerpt { -webkit-line-clamp: 2; }
    .rv-home-feature .card { display: flex; }
    .rv-home-page .caraousel-banner .carousel-caption { left: 12%; right: 12%; }
}
@media (prefers-reduced-motion: reduce) {
    .rv-home-page .rv-home-story-cover img,
    .rv-home-page .rv-home-character-photo img,
    .rv-home-page .rv-home-feature .card,
    .rv-home-page .rv-home-section-link { transition: none; }
}

/* The featured quote now follows the entire Explore navigation. */
.rv-home-quote-wrapper { padding-top: clamp(30px, 4.5vw, 60px); }

.rv-home-quote-section {
    margin: 0 0 clamp(26px, 3.5vw, 42px);
    background: #fff;
}
.rv-home-quote-panel {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(115deg, #ce2842 0%, #a60a15 72%, #7f080f 100%);
    color: #fff;
    padding: clamp(27px, 5vw, 56px);
    box-shadow: none;
}
.rv-home-quote-content { position: relative; z-index: 1; max-width: 940px; }
.rv-home-quote-kicker {
    margin: 0 0 18px;
    color: #ffe1e7;
    font-size: .77rem;
    font-weight: 800;
    letter-spacing: .1em;
}
.rv-home-featured-quote {
    margin: 0;
    max-width: 32ch;
    color: #fff;
    font-size: clamp(1.43rem, 2.5vw, 2.6rem);
    font-weight: 650;
    line-height: 1.46;
    letter-spacing: -.017em;
    overflow-wrap: anywhere;
}
.rv-home-quote-attribution,
.rv-home-quote-attribution:visited {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    margin-top: 24px;
    color: #fff;
}
.rv-home-quote-attribution:hover { color: #fff; }
.rv-home-quote-attribution img,
.rv-home-quote-avatar-placeholder {
    display: flex;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,.74);
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    background: rgba(255,255,255,.15);
}
.rv-home-quote-avatar-placeholder i { font-size: 25px; }
.rv-home-quote-person { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rv-home-quote-person strong { font-size: .95rem; font-weight: 750; line-height: 1.4; }
.rv-home-quote-person > span { font-size: .79rem; color: #ffe3e8; }
.rv-home-quote-person i { vertical-align: middle; font-size: 1rem; }
.rv-home-quote-mark {
    position: absolute;
    right: 3%;
    bottom: -100px;
    font: 340px/1 Georgia, serif;
    color: rgba(255,255,255,.08);
    pointer-events: none;
}
@media (max-width: 575.98px) {
    .rv-home-quote-section { margin-bottom: 30px; }
    .rv-home-quote-panel { border-radius: 12px; padding: 27px 23px; }
    .rv-home-featured-quote { font-size: 1.35rem; max-width: 100%; }
    .rv-home-quote-mark { font-size: 230px; bottom: -65px; }
}
