/* =========================================================
   LORE / SANGUINE CHRONICLES — page-scoped CSS
   Scope: body.mbp-lore
   Canon:
   - Houses-aligned panel language
   - no inline CSS
   - single main container
   - desktop first
========================================================= */

body.mbp-lore{
    --max: 1280px;
}

body.mbp-lore .wrap{
    max-width: var(--max);
}

/* ---------------------------------------------------------
   HERO
--------------------------------------------------------- */

body.mbp-lore .hero{
    text-align:center;
    padding-top:26px;
    padding-bottom:22px;
}

body.mbp-lore .hero h1{
    margin:0 0 12px 0;
    color:#d6b062;
    text-shadow:
        0 0 10px rgba(214,176,98,.14),
        0 0 24px rgba(214,176,98,.06);
}

body.mbp-lore .hero p{
    max-width:860px;
    margin:0 auto;
    color:rgba(255,255,255,.76);
}

/* ---------------------------------------------------------
   MAIN PANEL
--------------------------------------------------------- */

body.mbp-lore .mbp-lore-shell{
    max-width:980px;
    margin:0 auto;
}

body.mbp-lore .mbp-lore-panel{
    margin-top:24px;
    margin-bottom:0;
    border:1px solid rgba(124,92,255,.12);
    border-radius:16px;
    background:
        linear-gradient(
            180deg,
            rgba(8,10,18,.88) 0%,
            rgba(6,8,15,.92) 100%
        );
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.03),
        0 12px 30px rgba(0,0,0,.22);
    overflow:visible;
}

body.mbp-lore .mbp-lore-panel > .inner{
    padding:0;
}

/* ---------------------------------------------------------
   TOP TOOLBAR
--------------------------------------------------------- */

body.mbp-lore .mbp-lore-toolbar{
    display:grid;
    grid-template-columns: 1fr auto;
    align-items:center;
    gap:18px;
    padding:14px 16px;
    border-bottom:1px solid rgba(255,255,255,.06);
    background:
        linear-gradient(180deg, rgba(255,255,255,.015), rgba(255,255,255,0));
}

body.mbp-lore .mbp-lore-toolbar-left{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

body.mbp-lore .mbp-lore-toolbar-right{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
    color:rgba(255,255,255,.52);
    font-size:12px;
    line-height:1;
    white-space:nowrap;
}

body.mbp-lore .mbp-lore-pill,
body.mbp-lore .mbp-lore-chip,
body.mbp-lore .mbp-lore-filter{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    min-height:32px;
    padding:0 12px;
    border-radius:999px;
    border:1px solid rgba(255,255,255,.10);
    background:rgba(255,255,255,.02);
    color:rgba(255,255,255,.78);
    font-size:12px;
    line-height:1;
    white-space:nowrap;
}

body.mbp-lore .mbp-lore-pill .mbp-ico,
body.mbp-lore .mbp-lore-chip .mbp-ico,
body.mbp-lore .mbp-lore-filter .mbp-ico{
    width:15px;
    height:15px;
    opacity:.95;
}

body.mbp-lore .mbp-lore-pill:hover,
body.mbp-lore .mbp-lore-chip:hover,
body.mbp-lore .mbp-lore-filter:hover{
    border-color:rgba(155,123,255,.30);
    background:rgba(255,255,255,.04);
    color:rgba(255,255,255,.92);
}

body.mbp-lore .mbp-lore-pill-live{
    color:#66da7b;
    border-color:rgba(102,218,123,.24);
    background:rgba(102,218,123,.08);
    box-shadow:0 0 0 1px rgba(102,218,123,.05);
}

body.mbp-lore .mbp-lore-pill-active{
    color:#d6b062;
    border-color:rgba(166,128,44,.28);
    background:
        linear-gradient(180deg, rgba(44,31,10,.72), rgba(23,17,8,.84));
}

/* ---------------------------------------------------------
   FILTER DROPDOWN
--------------------------------------------------------- */

body.mbp-lore .mbp-lore-filter-wrap{
    position:relative;
    display:inline-flex;
    align-items:center;
}

body.mbp-lore .mbp-lore-filter{
    position:relative;
    cursor:pointer;
    transition:
        border-color .18s ease,
        background-color .18s ease,
        color .18s ease,
        box-shadow .18s ease;
}

body.mbp-lore .mbp-lore-filter:focus-visible{
    outline:none;
    border-color:rgba(166,128,44,.38);
    box-shadow:
        0 0 0 1px rgba(166,128,44,.10),
        0 0 0 4px rgba(166,128,44,.08);
}

body.mbp-lore .mbp-lore-filter[aria-expanded="true"]{
    color:#efe0b1;
    border-color:rgba(166,128,44,.34);
    background:
        linear-gradient(180deg, rgba(44,31,10,.82), rgba(23,17,8,.92));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.03),
        0 0 0 1px rgba(166,128,44,.08);
}

body.mbp-lore .mbp-lore-filter[aria-expanded="true"] .mbp-ico{
    transform:rotate(180deg);
}

body.mbp-lore .mbp-lore-filter .mbp-ico{
    transition:transform .18s ease;
}

body.mbp-lore .mbp-lore-filter-menu{
    position:absolute;
    top:calc(100% + 8px);
    left:0;
    z-index:40;
    min-width:190px;
    padding:8px 0;
    border-radius:14px;
    border:1px solid rgba(166,128,44,.28);
    background:
        linear-gradient(
            180deg,
            rgba(18,13,10,.97) 0%,
            rgba(10,8,12,.98) 100%
        );
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.03),
        0 18px 36px rgba(0,0,0,.42),
        0 0 0 1px rgba(166,128,44,.06);
    opacity:0;
    visibility:hidden;
    transform:translateY(-4px);
    pointer-events:none;
    transition:
        opacity .18s ease,
        transform .18s ease,
        visibility .18s ease;
}

body.mbp-lore .mbp-lore-filter-wrap.is-open .mbp-lore-filter-menu{
    opacity:1;
    visibility:visible;
    transform:translateY(0);
    pointer-events:auto;
}

body.mbp-lore .mbp-lore-filter-option{
    display:flex;
    align-items:center;
    gap:10px;
    width:100%;
    min-height:38px;
    padding:0 14px;
    border:0;
    background:transparent;
    color:rgba(230,220,198,.82);
    font-size:13px;
    line-height:1;
    text-align:left;
    cursor:pointer;
    transition:
        background-color .16s ease,
        color .16s ease;
}

body.mbp-lore .mbp-lore-filter-option:hover{
    background:rgba(214,176,98,.08);
    color:#f2dfb2;
}

body.mbp-lore .mbp-lore-filter-option:focus-visible{
    outline:none;
    background:rgba(214,176,98,.10);
    color:#f2dfb2;
}

body.mbp-lore .mbp-lore-filter-option.is-active{
    color:#d6b062;
}

body.mbp-lore .mbp-lore-filter-option-check{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:14px;
    height:14px;
    flex:0 0 14px;
    color:#d6b062;
    opacity:0;
    transition:opacity .16s ease;
}

body.mbp-lore .mbp-lore-filter-option.is-active .mbp-lore-filter-option-check{
    opacity:1;
}

body.mbp-lore .mbp-lore-filter-option-label{
    display:inline-flex;
    align-items:center;
    min-width:0;
    letter-spacing:.02em;
    text-transform:uppercase;
    font-family:"Cinzel", serif;
    font-size:13px;
}

/* ---------------------------------------------------------
   CHRONICLE LIST
--------------------------------------------------------- */

body.mbp-lore .mbp-lore-list{
    display:flex;
    flex-direction:column;
    gap:0;
}

body.mbp-lore .mbp-lore-row{
    display:grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items:start;
    gap:14px;
    padding:14px 16px 12px 16px;
}

body.mbp-lore .mbp-lore-row + .mbp-lore-row{
    border-top:1px solid rgba(255,255,255,.05);
}

body.mbp-lore .mbp-lore-row-ico{
    display:flex;
    align-items:center;
    justify-content:center;
    padding-top:2px;
    color:#e04d4d;
}

body.mbp-lore .mbp-lore-row-ico .mbp-ico{
    width:15px;
    height:15px;
    opacity:1;
}

body.mbp-lore .mbp-lore-row-content{
    min-width:0;
}

body.mbp-lore .mbp-lore-line{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:6px;
    font-size:13px;
    line-height:1.45;
    color:rgba(240,235,226,.92);
}

body.mbp-lore .mbp-lore-line strong{
    font-weight:600;
    color:#efe6d2;
}

body.mbp-lore .mbp-lore-line a{
    text-decoration:none;
}

body.mbp-lore .mbp-lore-line a:hover{
    text-decoration:underline;
}

body.mbp-lore .mbp-lore-sep{
    opacity:.42;
}

body.mbp-lore .mbp-lore-time{
    margin-top:5px;
    font-size:11px;
    line-height:1.2;
    color:rgba(255,255,255,.42);
}

/* ---------------------------------------------------------
   INLINE AVATARS / TOKENS
--------------------------------------------------------- */

body.mbp-lore .mbp-lore-avatar{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:22px;
    height:22px;
    border-radius:999px;
    overflow:hidden;
    border:1px solid rgba(255,255,255,.16);
    background:rgba(255,255,255,.04);
    vertical-align:middle;
    box-shadow:0 4px 10px rgba(0,0,0,.30);
}

body.mbp-lore .mbp-lore-avatar img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

body.mbp-lore .mbp-lore-avatar.mbp-species-vampire{
    border-color:rgba(227,77,77,.40);
}

body.mbp-lore .mbp-lore-avatar.mbp-species-lycan{
    border-color:rgba(231,196,79,.38);
}

body.mbp-lore .mbp-lore-avatar.mbp-species-witch{
    border-color:rgba(150,109,255,.42);
}

body.mbp-lore .mbp-lore-token{
    display:inline-flex;
    align-items:center;
    gap:5px;
    min-height:22px;
    padding:0 7px;
    border-radius:999px;
    background:rgba(255,255,255,.03);
    border:1px solid rgba(255,255,255,.08);
    color:rgba(255,255,255,.88);
    font-size:11px;
    line-height:1;
    white-space:nowrap;
}

body.mbp-lore .mbp-lore-token.mbp-token-vampire{
    color:#ff7261;
}

body.mbp-lore .mbp-lore-token.mbp-token-lycan{
    color:#f0c54b;
}

body.mbp-lore .mbp-lore-token.mbp-token-witch{
    color:#b088ff;
}

body.mbp-lore .mbp-lore-token.mbp-token-bloodline{
    color:#6ce6ef;
}

/* ---------------------------------------------------------
   FOOT NOTE / BOTTOM
--------------------------------------------------------- */

body.mbp-lore .mbp-lore-footnote{
    max-width:980px;
    margin:18px auto 0 auto;
    text-align:center;
    color:rgba(255,255,255,.44);
    font-size:12px;
    font-style:italic;
    line-height:1.5;
}

/* ---------------------------------------------------------
   EMPTY STATE
--------------------------------------------------------- */

body.mbp-lore .mbp-lore-empty{
    padding:36px 20px;
    text-align:center;
    color:rgba(255,255,255,.70);
    font-size:14px;
    line-height:1.6;
}

/* ---------------------------------------------------------
   EVENT COLORS
--------------------------------------------------------- */

body.mbp-lore .mbp-lore-row-event-blood{
    --mbp-lore-accent:#e04d4d;
}

body.mbp-lore .mbp-lore-row-event-rise{
    --mbp-lore-accent:#9f6bff;
}

body.mbp-lore .mbp-lore-row-event-oath{
    --mbp-lore-accent:#f0b84d;
}

body.mbp-lore .mbp-lore-row-event-blood .mbp-lore-row-ico,
body.mbp-lore .mbp-lore-row-event-blood a{
    color:#e04d4d;
}

body.mbp-lore .mbp-lore-row-event-rise .mbp-lore-row-ico,
body.mbp-lore .mbp-lore-row-event-rise a{
    color:#9f6bff;
}

body.mbp-lore .mbp-lore-row-event-oath .mbp-lore-row-ico,
body.mbp-lore .mbp-lore-row-event-oath a{
    color:#f0b84d;
}

/* ---------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------- */

@media (max-width: 980px){
    body.mbp-lore .mbp-lore-shell{
        max-width:100%;
    }

    body.mbp-lore .mbp-lore-toolbar{
        grid-template-columns:1fr;
        align-items:start;
    }

    body.mbp-lore .mbp-lore-toolbar-right{
        justify-content:flex-start;
    }
}

@media (max-width: 640px){
    body.mbp-lore .hero{
        padding-bottom:18px;
    }

    body.mbp-lore .mbp-lore-row{
        grid-template-columns:1fr;
        gap:8px;
        padding:14px 14px 12px 14px;
    }

    body.mbp-lore .mbp-lore-row-ico{
        justify-content:flex-start;
        padding-top:0;
    }

    body.mbp-lore .mbp-lore-line{
        font-size:12px;
        line-height:1.5;
    }

    body.mbp-lore .mbp-lore-toolbar{
        padding:12px 14px;
    }

    body.mbp-lore .mbp-lore-filter-menu{
        min-width:180px;
    }
}