feat: add codex / lore book with 364 entries

Implements a full in-game Codex panel that tracks lore discovery across
seven categories: bosses (72), quests (95), zones (18), equipment (65),
adventurer tiers (32), upgrades (57), and prestige upgrades (25).

Lore entries unlock automatically as players progress — existing
completions are retroactively and silently added on first load. New
discoveries trigger a toast notification and badge counter on the
Codex tab.
This commit is contained in:
2026-03-07 01:17:45 -08:00
committed by Naomi Carrigan
parent b0ed976a1d
commit fd286cd29f
11 changed files with 3838 additions and 6 deletions
+169
View File
@@ -2151,3 +2151,172 @@ body {
margin: 0;
line-height: 1.5;
}
/* ===================== CODEX PANEL ===================== */
.codex-progress {
background: var(--colour-surface-2);
border: 1px solid var(--colour-border);
border-radius: var(--radius);
margin-bottom: 1.25rem;
padding: 0.75rem 1rem;
}
.codex-progress-text {
color: var(--colour-text-muted);
font-size: 0.85rem;
margin-bottom: 0.5rem;
}
.codex-progress-bar {
background: var(--colour-bg);
border-radius: 4px;
height: 8px;
overflow: hidden;
width: 100%;
}
.codex-progress-fill {
background: linear-gradient(90deg, var(--colour-essence), var(--colour-accent-light));
border-radius: 4px;
height: 100%;
transition: width 0.4s ease;
}
.codex-zone {
margin-bottom: 1rem;
}
.codex-zone-header {
align-items: center;
color: var(--colour-accent-light);
display: flex;
font-size: 1rem;
font-weight: 700;
gap: 0.5rem;
margin-bottom: 0.5rem;
}
.codex-zone-count {
background: var(--colour-surface-2);
border: 1px solid var(--colour-border);
border-radius: 12px;
color: var(--colour-text-muted);
font-size: 0.75rem;
font-weight: 400;
margin-left: auto;
padding: 0.1rem 0.5rem;
}
.codex-entries {
display: flex;
flex-direction: column;
gap: 0.35rem;
}
.codex-entry {
border: 1px solid var(--colour-border);
border-radius: var(--radius);
overflow: hidden;
}
.codex-entry.locked {
opacity: 0.5;
}
.codex-entry.unlocked {
border-color: var(--colour-essence);
}
.codex-entry-header {
align-items: center;
background: var(--colour-surface-2);
border: none;
color: var(--colour-text);
cursor: pointer;
display: flex;
gap: 0.5rem;
padding: 0.5rem 0.75rem;
text-align: left;
width: 100%;
}
.codex-entry.unlocked .codex-entry-header:hover {
background: var(--colour-surface);
}
.codex-entry.locked .codex-entry-header {
cursor: default;
}
.codex-lock {
color: var(--colour-text-muted);
flex-shrink: 0;
font-size: 0.85rem;
}
.codex-entry-title {
flex: 1;
font-size: 0.9rem;
font-weight: 600;
}
.codex-entry.locked .codex-entry-title {
color: var(--colour-text-muted);
font-style: italic;
}
.codex-source-badge {
background: var(--colour-surface);
border: 1px solid var(--colour-border);
border-radius: 4px;
color: var(--colour-text-muted);
font-size: 0.7rem;
padding: 0.1rem 0.35rem;
}
.codex-chevron {
color: var(--colour-text-muted);
flex-shrink: 0;
font-size: 0.7rem;
transition: transform 0.2s ease;
}
.codex-entry-content {
background: var(--colour-bg);
border-top: 1px solid var(--colour-essence);
color: var(--colour-text-muted);
font-size: 0.85rem;
line-height: 1.6;
padding: 0.6rem 0.75rem;
}
/* Codex toast — uses a different accent from achievement toast */
.codex-toast {
align-items: center;
animation: slide-in-right 0.35s ease-out;
background: var(--colour-surface);
border: 1px solid var(--colour-essence);
border-radius: var(--radius);
box-shadow: 0 4px 20px rgba(0,0,0,0.4);
cursor: pointer;
display: flex;
gap: 0.75rem;
max-width: 280px;
padding: 0.75rem 1rem;
}
/* Tab notification badge */
.tab-badge {
background: var(--colour-essence);
border-radius: 10px;
color: #fff;
display: inline-block;
font-size: 0.65rem;
font-weight: 700;
line-height: 1;
margin-left: 0.35rem;
min-width: 16px;
padding: 0.2rem 0.35rem;
text-align: center;
vertical-align: middle;
}