.lore-layout {
    display: flex;
    width: min(1100px, 90%);
    margin: 0 auto;
    padding: 40px 0;
    gap: 40px;
    align-items: flex-start;
}

/* ── Sidebar ──────────────────────────────────── */

.lore-sidebar {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
}

.lore-topic {
    border: 1px solid rgba(200, 164, 106, .3);
    background: var(--panel);
    backdrop-filter: blur(8px);
    margin-bottom: 8px;
}

.topic-header {
    width: 100%;
    background: none;
    border: none;
    color: var(--gold);
    font-family: var(--font-serif);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: .8rem;
    padding: 14px 18px;
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: .25s;
}

.topic-header::after {
    content: "›";
    font-size: 1.1rem;
    transition: transform .25s;
}

.lore-topic.active .topic-header::after {
    transform: rotate(90deg);
}

.topic-header:hover {
    background: rgba(200, 164, 106, .08);
    color: var(--gold-light);
}

.lore-topic.active .topic-header {
    color: var(--gold-light);
    background: rgba(200, 164, 106, .1);
}

.topic-list {
    display: none;
    list-style: none;
    border-top: 1px solid rgba(200, 164, 106, .2);
    padding: 8px 0;
}

.lore-topic.active .topic-list {
    display: block;
}

.topic-list a {
    display: block;
    padding: 8px 18px 8px 28px;
    color: #d9c19a;
    text-decoration: none;
    font-size: .9rem;
    transition: .2s;
    position: relative;
}

.topic-list a::before {
    content: "◆";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: .4rem;
    color: var(--gold);
    opacity: 0;
    transition: .2s;
}

.topic-list a:hover {
    color: var(--gold-light);
    padding-left: 32px;
}

.topic-list a:hover::before {
    opacity: 1;
}

.topic-list-empty {
    padding: 10px 18px;
    color: #666;
    font-style: italic;
    font-size: .85rem;
}

/* ── Content ──────────────────────────────────── */

.lore-content {
    flex: 1;
    min-width: 0;
}

.lore-region.hidden {
    display: none;
}

/* Panel chrome (background/border/backdrop-filter) and the corner-bracket
   ::before/::after accents are shared with .card — defined in style.css */
.lore-entry {
    position: relative;
    padding: 40px;
    margin-bottom: 30px;
    scroll-margin-top: 20px;
}

.lore-entry h2 {
    color: var(--gold-light);
    font-size: 2rem;
    letter-spacing: 4px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(200, 164, 106, .3);
}

.lore-entry p {
    color: #d9c19a;
    line-height: 1.8;
    font-size: 1rem;
}

/* Sub-heading within a lore entry */
.lore-entry h3 {
    color: var(--gold);
    font-size: 1.3rem;
    letter-spacing: 2px;
    margin: 28px 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(200, 164, 106, .25);
}

/* Epigraph / quote block */
.lore-quote {
    margin: 0 0 24px;
    padding: 4px 0 4px 22px;
    border-left: 2px solid rgba(200, 164, 106, .45);
}

.lore-quote p {
    font-style: italic;
    color: #c4ad83;
}

.lore-quote cite {
    display: block;
    margin-top: 10px;
    font-style: normal;
    text-align: right;
    color: var(--gold);
    font-size: .9rem;
}

.lore-placeholder {
    color: #666;
    font-style: italic;
    text-align: center;
    margin-top: 80px;
}

/* ── Responsive ───────────────────────────────── */

@media (max-width: 768px) {
    .lore-layout {
        width: auto;
        flex-direction: column;
        padding: 20px;
    }

    .lore-sidebar {
        width: 100%;
        position: static;
    }

    .lore-entry {
        padding: 24px 20px;
    }

    .lore-entry h2 {
        font-size: 1.6rem;
        letter-spacing: 2px;
    }
}

.god-list {
    list-style: none;
    padding: 4px 0 8px 0;
    margin: 0 0 0 16px;
    border-left: 1px solid rgba(200, 164, 106, .2);
}

.god-list.hidden {
    display: none;
}

.god-list a {
    display: block;
    padding: 5px 8px 5px 12px;
    color: #a89070;
    text-decoration: none;
    font-size: .85rem;
    transition: .2s;
}

.god-list a:hover {
    color: var(--gold-light);
}

.court-link {
    display: block;
    padding: 8px 18px 8px 28px;
    color: #d9c19a;
    text-decoration: none;
    font-size: .9rem;
    transition: .2s;
    position: relative;
}

.court-link:hover {
    color: var(--gold-light);
}

.court-section.hidden {
    display: none;
}

.lore-entry p + p {
    margin-top: 1rem;
}

/* ── God constellations ───────────────────────── */

.constellation {
    float: right;
    width: 150px;
    height: 150px;
    margin: 4px 0 18px 30px;
    opacity: .85;
    filter: drop-shadow(0 0 8px rgba(200, 164, 106, .25));
    shape-outside: circle(48%);
}

@media (max-width: 768px) {
    .constellation {
        width: 110px;
        height: 110px;
        margin: 4px 0 14px 20px;
    }
}