.lore-layout {
    display: flex;
    padding: 40px 60px;
    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: Georgia, "Times New Roman", 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;
}

.lore-entry {
    position: relative;
    background: var(--panel);
    border: 1px solid rgba(200, 164, 106, .35);
    backdrop-filter: blur(8px);
    padding: 40px;
    margin-bottom: 30px;
    scroll-margin-top: 20px;
}

.lore-entry::before,
.lore-entry::after {
    content: "";
    position: absolute;
    width: 40px;
    height: 40px;
    pointer-events: none;
}

.lore-entry::before {
    top: 10px;
    left: 10px;
    border-top: 2px solid var(--gold);
    border-left: 2px solid var(--gold);
}

.lore-entry::after {
    bottom: 10px;
    right: 10px;
    border-bottom: 2px solid var(--gold);
    border-right: 2px solid var(--gold);
}

.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;
}

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

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

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

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

.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;
}