/**
 * Pitch & Pixel - Encyclopaedia Styles (Era 1: Win95)
 * v1.0 (2026-04-27)
 */

/* ============== HINT (pre-lock) ============== */
.lex-hint {
    position: fixed;
    z-index: 99998;
    background: #ffffe1;
    border: 1px solid #707070;
    box-shadow: 1px 1px 0 #00000033;
    padding: 4px 8px;
    font-family: "MS Sans Serif", Tahoma, sans-serif;
    font-size: 11px;
    color: #222;
    pointer-events: none;
    max-width: 220px;
    line-height: 1.35;
}
.lex-hint.hidden { display: none; }
.lex-hint-title { font-weight: bold; display: block; }
.lex-hint-cta { color: #666; font-size: 10px; display: block; margin-top: 1px; }

/* ============== TOOLTIP (locked) ============== */
.lex-tooltip {
    position: fixed;
    z-index: 99999;
    width: 360px;
    max-height: 480px;
    background: #c0c0c0;
    border: 2px outset #ffffff;
    box-shadow: 2px 2px 0 #00000055;
    font-family: "MS Sans Serif", Tahoma, sans-serif;
    font-size: 12px;
    color: #1a1a1a;
    display: flex;
    flex-direction: column;
}
.lex-tooltip.hidden { display: none; }

.lex-anim-in {
    animation: lex-fade-in 150ms ease-out;
}
.lex-anim-out {
    animation: lex-fade-out 150ms ease-in;
    opacity: 0;
}
@keyframes lex-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes lex-fade-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

.lex-tt-header {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(90deg, #000080, #1084d0);
    color: #fff;
    padding: 3px 4px;
    font-weight: bold;
    font-size: 12px;
}
.lex-tt-icon { font-size: 14px; }
.lex-tt-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lex-tt-back, .lex-tt-close {
    background: #c0c0c0;
    border: 1px outset #fff;
    width: 18px;
    height: 18px;
    line-height: 14px;
    font-size: 11px;
    color: #1a1a1a;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}
.lex-tt-back:active, .lex-tt-close:active { border-style: inset; }
.lex-tt-back.hidden { display: none; }

.lex-tt-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 10px;
    line-height: 1.45;
    background: #ffffff;
    color: #000;
    border: 1px inset #808080;
    margin: 4px;
}
.lex-tt-body p { margin: 0 0 6px 0; }
.lex-tt-body ul { margin: 4px 0 8px 18px; padding: 0; }
.lex-tt-body li { margin-bottom: 3px; }
.lex-tt-body h4 { margin: 8px 0 4px 0; font-size: 12px; color: #000080; }
.lex-tt-body code {
    background: #f0f0f0;
    border: 1px solid #ccc;
    padding: 0 3px;
    font-family: "Lucida Console", monospace;
    font-size: 11px;
}
.lex-tt-short {
    font-style: italic;
    color: #404040;
    margin-bottom: 8px !important;
    padding-bottom: 4px;
    border-bottom: 1px dashed #b0b0b0;
}
.lex-tt-source { color: #888; font-size: 10px; margin-top: 8px; }
.lex-tt-source code { background: #fffde7; }

.lex-tt-seealso {
    padding: 4px 8px;
    background: #d4d0c8;
    border-top: 1px solid #808080;
    font-size: 11px;
    line-height: 1.6;
}
.lex-tt-seealso:empty { display: none; }
.lex-seealso-label {
    color: #555;
    font-weight: bold;
    margin-right: 4px;
}

.lex-tt-footer {
    padding: 4px 8px 6px;
    background: #d4d0c8;
    border-top: 1px solid #808080;
    text-align: right;
    font-size: 11px;
}
.lex-tt-open-modal {
    color: #000080;
    cursor: pointer;
    text-decoration: underline;
}
.lex-tt-open-modal:hover { color: #1084d0; }

/* ============== LINKS & CHIPS ============== */
.lex-link {
    color: #000080;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}
.lex-link:hover { color: #1084d0; background: #ffff80; }
.lex-broken {
    color: #c00;
    text-decoration: line-through dashed;
    font-style: italic;
}

.lex-chip {
    display: inline-block;
    padding: 2px 6px;
    margin: 1px 2px;
    background: #ffffff;
    border: 1px outset #fff;
    border-radius: 0;
    color: #000080;
    text-decoration: none;
    cursor: pointer;
    font-size: 11px;
}
.lex-chip:hover { background: #ffff80; }
.lex-chip:active { border-style: inset; }

/* ============== MODAL (full view) ============== */
.lex-modal.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
}
.lex-modal.hidden { display: none; }

.lex-modal-window {
    background: #c0c0c0;
    border: 2px outset #fff;
    box-shadow: 2px 2px 0 #00000088;
    display: flex;
    flex-direction: column;
}
.lex-modal-window > .title-bar {
    background: linear-gradient(90deg, #000080, #1084d0);
    color: #fff;
    padding: 3px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}
.lex-modal-window .title-bar .controls button {
    background: #c0c0c0;
    border: 1px outset #fff;
    width: 22px;
    height: 20px;
    line-height: 14px;
    color: #1a1a1a;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    padding: 0;
}
.lex-modal-window .title-bar .controls button:active { border-style: inset; }

.lex-modal-body {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    overflow: hidden;
}
.lex-modal-toolbar {
    display: flex;
    gap: 6px;
    align-items: center;
}
.lex-nav-btn {
    width: 30px;
    padding: 2px 4px;
}
.lex-nav-btn[disabled] { color: #888; cursor: default; }
.lex-search {
    flex: 1;
    padding: 3px 6px;
    border: 1px inset #808080;
    background: #fff;
    font-family: "MS Sans Serif", Tahoma, sans-serif;
    font-size: 12px;
}
.lex-modal-count {
    font-size: 11px;
    color: #555;
    min-width: 80px;
    text-align: right;
}

.lex-modal-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 6px;
    flex: 1;
    overflow: hidden;
}

.lex-modal-sidebar {
    overflow-y: auto;
    background: #fff;
    border: 1px inset #808080;
    padding: 4px 8px;
}
.lex-cat-block { margin-bottom: 8px; }
.lex-cat-title {
    font-size: 11px;
    text-transform: uppercase;
    color: #000080;
    margin: 6px 0 3px 0;
    padding-bottom: 2px;
    border-bottom: 1px solid #b0b0b0;
}
.lex-cat-entries {
    list-style: none;
    padding: 0;
    margin: 0;
}
.lex-cat-entries li { margin: 0; }
.lex-cat-entry {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 4px;
    cursor: pointer;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 11px;
    border: 1px solid transparent;
}
.lex-cat-entry:hover { background: #d8e6ff; }
.lex-cat-entry.active {
    background: #000080;
    color: #fff;
    border-color: #000;
}
.lex-cat-icon { width: 16px; text-align: center; }
.lex-cat-name { flex: 1; overflow: hidden; text-overflow: ellipsis; }

.lex-modal-content {
    overflow-y: auto;
    background: #fff;
    border: 1px inset #808080;
    padding: 14px 18px;
}

.lex-welcome h2 { margin: 0 0 10px 0; color: #000080; }
.lex-welcome p { margin: 0 0 8px 0; line-height: 1.5; }
.lex-welcome ul { margin: 4px 0 10px 18px; padding: 0; line-height: 1.6; }
.lex-meta { color: #666; font-size: 11px; margin-top: 12px; font-style: italic; }

.lex-entry { font-family: "MS Sans Serif", Tahoma, sans-serif; line-height: 1.5; }
.lex-entry-header {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #000080;
    padding-bottom: 6px;
    margin-bottom: 10px;
}
.lex-entry-icon { font-size: 24px; }
.lex-entry-title { margin: 0; font-size: 18px; color: #000080; }
.lex-entry-short {
    font-style: italic;
    color: #404040;
    margin: 0 0 12px 0;
    padding: 8px 10px;
    background: #f4f4f4;
    border-left: 3px solid #1084d0;
}
.lex-entry-body p { margin: 0 0 8px 0; }
.lex-entry-body ul { margin: 4px 0 10px 22px; }
.lex-entry-body li { margin-bottom: 4px; }
.lex-entry-body h4 { margin: 14px 0 4px 0; color: #000080; font-size: 13px; }
.lex-entry-body code {
    background: #f0f0f0;
    border: 1px solid #ccc;
    padding: 0 4px;
    font-family: "Lucida Console", monospace;
    font-size: 11px;
}
.lex-entry-seealso {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed #b0b0b0;
}
.lex-entry-source {
    margin-top: 14px;
    color: #888;
    font-size: 11px;
}

/* ============== TOPBAR HELP BUTTON ============== */
#btn-lex-help {
    min-width: 30px;
    padding: 2px 6px;
    margin-right: 4px;
    font-weight: bold;
    color: #000080;
}
#btn-lex-help:hover { color: #1084d0; }

/* Mobile */
@media (max-width: 760px) {
    .lex-tooltip { width: 92vw; max-width: 360px; }
    .lex-modal-window { width: 96vw !important; }
    .lex-modal-grid { grid-template-columns: 1fr; }
    .lex-modal-sidebar { max-height: 30vh; }
}

/* ============================================================
   ERA THEMES — Lexikon Tooltip + Modal
   v0.9.11.43 (2026-04-29)
   Era 1 (Win95) = default above. E2/E3/E4 below.
   ============================================================ */

/* ============== ERA 2: XP / Luna ============== */
body.era-e2 .lex-hint {
    background: #ffffe1;
    border: 1px solid #b48a00;
    box-shadow: 1px 2px 5px rgba(0,0,0,0.25);
    font-family: Tahoma, "Segoe UI", sans-serif;
    border-radius: 3px;
    padding: 5px 9px;
}
body.era-e2 .lex-tooltip {
    background: #ece9d8;
    border: 1px solid #0a246a;
    border-radius: 6px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 4px 12px rgba(0,0,0,.3);
    font-family: Tahoma, "Segoe UI", sans-serif;
    color: #1a1a1a;
}
body.era-e2 .lex-tt-header {
    background: linear-gradient(180deg, #2a4a8a 0%, #0a2a6a 100%);
    border-radius: 5px 5px 0 0;
    padding: 4px 7px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
    font-family: Tahoma, sans-serif;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.4);
}
body.era-e2 .lex-tt-back,
body.era-e2 .lex-tt-close {
    background: linear-gradient(180deg, #f4f3ee, #d4d0c0);
    border: 1px solid #6a6a6a;
    border-radius: 3px;
    color: #1a1a1a;
    width: 20px;
    height: 18px;
}
body.era-e2 .lex-tt-back:hover,
body.era-e2 .lex-tt-close:hover { background: linear-gradient(180deg, #ffffff, #e0dccb); }
body.era-e2 .lex-tt-back:active,
body.era-e2 .lex-tt-close:active { background: linear-gradient(180deg, #c8c4b4, #d4d0c0); }
body.era-e2 .lex-tt-body {
    background: #fff;
    border: 1px solid #b0a890;
    border-radius: 3px;
    margin: 5px;
}
body.era-e2 .lex-tt-body h4 { color: #0a2a6a; }
body.era-e2 .lex-tt-body code {
    background: #fffbe7;
    border: 1px solid #d8c878;
    border-radius: 2px;
}
body.era-e2 .lex-tt-seealso,
body.era-e2 .lex-tt-footer {
    background: #ece9d8;
    border-top: 1px solid #b0a890;
}
body.era-e2 .lex-tt-open-modal { color: #0a2a6a; }
body.era-e2 .lex-tt-open-modal:hover { color: #6aaaee; }

body.era-e2 .lex-link { color: #0a2a6a; font-weight: 500; }
body.era-e2 .lex-link:hover { color: #6aaaee; background: #fffbe7; }
body.era-e2 .lex-chip {
    background: linear-gradient(180deg, #ffffff, #e8e4d2);
    border: 1px solid #a09680;
    border-radius: 3px;
    color: #0a2a6a;
}
body.era-e2 .lex-chip:hover { background: linear-gradient(180deg, #ffffff, #fff8d8); border-color: #6aaaee; }

body.era-e2 .lex-modal-window {
    background: #ece9d8;
    border: 1px solid #0a246a;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.4);
}
body.era-e2 .lex-modal-window > .title-bar {
    background: linear-gradient(180deg, #2a4a8a 0%, #0a2a6a 100%);
    border-radius: 7px 7px 0 0;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.4);
}
body.era-e2 .lex-modal-window .title-bar .controls button {
    background: linear-gradient(180deg, #f4f3ee, #d4d0c0);
    border: 1px solid #6a6a6a;
    border-radius: 3px;
}
body.era-e2 .lex-search {
    background: #fff;
    border: 1px solid #b0a890;
    border-radius: 3px;
    font-family: Tahoma, sans-serif;
    padding: 4px 7px;
}
body.era-e2 .lex-modal-sidebar,
body.era-e2 .lex-modal-content {
    background: #fff;
    border: 1px solid #b0a890;
    border-radius: 3px;
}
body.era-e2 .lex-cat-title { color: #0a2a6a; }
body.era-e2 .lex-cat-entry:hover { background: #d8e6ff; }
body.era-e2 .lex-cat-entry.active {
    background: linear-gradient(180deg, #2a4a8a, #0a2a6a);
    color: #fff;
    border-color: #0a2a6a;
}
body.era-e2 .lex-welcome h2,
body.era-e2 .lex-entry-title { color: #0a2a6a; }
body.era-e2 .lex-entry-header { border-bottom-color: #0a2a6a; }
body.era-e2 .lex-entry-short { border-left-color: #6aaaee; background: #f4f8ff; }
body.era-e2 .lex-entry-body h4 { color: #0a2a6a; }
body.era-e2 #btn-lex-help { color: #0a2a6a; font-weight: bold; }
body.era-e2 #btn-lex-help:hover { color: #6aaaee; }


/* ============== ERA 3: Material / Flat ============== */
body.era-e3 .lex-hint {
    background: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 12px;
    border-radius: 4px;
    padding: 6px 10px;
    color: #212121;
}
body.era-e3 .lex-hint-cta { color: #757575; }
body.era-e3 .lex-tooltip {
    background: #fafafa;
    border: none;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #212121;
}
body.era-e3 .lex-tt-header {
    background: #2196f3;
    border-radius: 4px 4px 0 0;
    padding: 8px 12px;
    color: #fff;
    text-shadow: none;
    font-weight: 500;
}
body.era-e3 .lex-tt-back,
body.era-e3 .lex-tt-close {
    background: transparent;
    border: none;
    border-radius: 50%;
    color: #fff;
    width: 22px;
    height: 22px;
    line-height: 22px;
    transition: background 0.15s;
}
body.era-e3 .lex-tt-back:hover,
body.era-e3 .lex-tt-close:hover { background: rgba(255,255,255,0.2); }
body.era-e3 .lex-tt-body {
    background: #fff;
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 12px 14px;
}
body.era-e3 .lex-tt-body h4 { color: #1565c0; font-weight: 500; }
body.era-e3 .lex-tt-body code {
    background: #f5f5f5;
    border: none;
    border-radius: 3px;
    padding: 2px 4px;
    font-family: "Roboto Mono", "Consolas", monospace;
}
body.era-e3 .lex-tt-short {
    color: #555;
    border-bottom: 1px solid #e0e0e0;
}
body.era-e3 .lex-tt-source { color: #9e9e9e; }
body.era-e3 .lex-tt-seealso,
body.era-e3 .lex-tt-footer {
    background: #fafafa;
    border-top: 1px solid #e0e0e0;
}
body.era-e3 .lex-tt-open-modal { color: #1565c0; text-decoration: none; font-weight: 500; }
body.era-e3 .lex-tt-open-modal:hover { color: #2196f3; text-decoration: underline; }

body.era-e3 .lex-link { color: #1565c0; text-decoration: none; font-weight: 500; }
body.era-e3 .lex-link:hover { color: #2196f3; background: transparent; text-decoration: underline; }
body.era-e3 .lex-chip {
    background: #e3f2fd;
    border: none;
    border-radius: 12px;
    color: #1565c0;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 500;
}
body.era-e3 .lex-chip:hover { background: #bbdefb; }

body.era-e3 .lex-modal-window {
    background: #fafafa;
    border: none;
    border-radius: 4px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.2);
}
body.era-e3 .lex-modal-window > .title-bar {
    background: #2196f3;
    border-radius: 4px 4px 0 0;
    padding: 10px 14px;
    text-shadow: none;
}
body.era-e3 .lex-modal-window .title-bar .controls button {
    background: transparent;
    border: none;
    border-radius: 50%;
    color: #fff;
    width: 26px;
    height: 26px;
}
body.era-e3 .lex-modal-window .title-bar .controls button:hover {
    background: rgba(255,255,255,0.2);
}
body.era-e3 .lex-search {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-family: Roboto, sans-serif;
    padding: 6px 10px;
    transition: border-color 0.15s;
}
body.era-e3 .lex-search:focus { border-color: #2196f3; outline: none; }
body.era-e3 .lex-modal-sidebar,
body.era-e3 .lex-modal-content {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}
body.era-e3 .lex-cat-title {
    color: #757575;
    font-weight: 500;
    border-bottom: 1px solid #e0e0e0;
}
body.era-e3 .lex-cat-entry { border-radius: 4px; transition: background 0.15s; }
body.era-e3 .lex-cat-entry:hover { background: #e3f2fd; }
body.era-e3 .lex-cat-entry.active {
    background: #2196f3;
    color: #fff;
    border-color: transparent;
}
body.era-e3 .lex-welcome h2,
body.era-e3 .lex-entry-title { color: #1565c0; font-weight: 500; }
body.era-e3 .lex-entry-header { border-bottom: 2px solid #2196f3; }
body.era-e3 .lex-entry-short { border-left-color: #2196f3; background: #f5f5f5; }
body.era-e3 .lex-entry-body h4 { color: #1565c0; font-weight: 500; }
body.era-e3 .lex-nav-btn {
    background: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #1565c0;
}
body.era-e3 .lex-nav-btn:hover { background: #e3f2fd; }
body.era-e3 #btn-lex-help { color: #1565c0; font-weight: 500; }
body.era-e3 #btn-lex-help:hover { color: #2196f3; background: rgba(33,150,243,0.08); border-radius: 4px; }


/* ============== ERA 4: Glass-Dark ============== */
body.era-e4 .lex-hint {
    background: rgba(30,41,59,0.92);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    border: 1px solid rgba(102,126,234,0.25);
    border-radius: 8px;
    color: #e2e8f0;
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 16px rgba(102,126,234,0.18);
    padding: 6px 10px;
}
body.era-e4 .lex-hint-cta { color: #94a3b8; }
body.era-e4 .lex-tooltip {
    background: rgba(30,41,59,0.85);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border: 1px solid rgba(102,126,234,0.25);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.55), 0 0 24px rgba(102,126,234,0.18);
    color: #e2e8f0;
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
}
body.era-e4 .lex-tt-header {
    background: linear-gradient(135deg, rgba(102,126,234,0.4) 0%, rgba(167,139,250,0.3) 100%);
    border-radius: 13px 13px 0 0;
    border-bottom: 1px solid rgba(102,126,234,0.2);
    color: #f1f5f9;
    text-shadow: none;
    padding: 8px 12px;
}
body.era-e4 .lex-tt-icon { color: #22d3ee; }
body.era-e4 .lex-tt-back,
body.era-e4 .lex-tt-close {
    background: rgba(102,126,234,0.15);
    border: 1px solid rgba(102,126,234,0.3);
    border-radius: 6px;
    color: #e2e8f0;
    transition: all 0.15s;
}
body.era-e4 .lex-tt-back:hover,
body.era-e4 .lex-tt-close:hover {
    background: rgba(102,126,234,0.3);
    border-color: rgba(167,139,250,0.5);
    color: #fff;
}
body.era-e4 .lex-tt-body {
    background: rgba(15,23,42,0.6);
    border: 1px solid rgba(102,126,234,0.15);
    border-radius: 8px;
    margin: 6px;
    color: #cbd5e1;
}
body.era-e4 .lex-tt-body h4 { color: #a78bfa; font-weight: 600; }
body.era-e4 .lex-tt-body code {
    background: rgba(34,211,238,0.12);
    border: 1px solid rgba(34,211,238,0.2);
    border-radius: 4px;
    color: #67e8f9;
    font-family: "JetBrains Mono", "Fira Code", monospace;
}
body.era-e4 .lex-tt-short {
    color: #94a3b8;
    border-bottom: 1px dashed rgba(102,126,234,0.2);
}
body.era-e4 .lex-tt-source { color: #64748b; }
body.era-e4 .lex-tt-source code { background: rgba(167,139,250,0.12); color: #c4b5fd; border-color: rgba(167,139,250,0.2); }
body.era-e4 .lex-tt-seealso,
body.era-e4 .lex-tt-footer {
    background: rgba(15,23,42,0.5);
    border-top: 1px solid rgba(102,126,234,0.15);
    color: #cbd5e1;
}
body.era-e4 .lex-seealso-label { color: #94a3b8; }
body.era-e4 .lex-tt-open-modal { color: #22d3ee; text-decoration: none; }
body.era-e4 .lex-tt-open-modal:hover { color: #67e8f9; text-shadow: 0 0 8px rgba(34,211,238,0.4); }

body.era-e4 .lex-link {
    color: #22d3ee;
    text-decoration: none;
    border-bottom: 1px dotted rgba(34,211,238,0.4);
    font-weight: 500;
}
body.era-e4 .lex-link:hover {
    color: #67e8f9;
    background: rgba(34,211,238,0.08);
    text-shadow: 0 0 8px rgba(34,211,238,0.4);
}
body.era-e4 .lex-broken { color: #f87171; }
body.era-e4 .lex-chip {
    background: rgba(102,126,234,0.15);
    border: 1px solid rgba(102,126,234,0.3);
    border-radius: 10px;
    color: #a78bfa;
    padding: 2px 8px;
    transition: all 0.15s;
}
body.era-e4 .lex-chip:hover {
    background: rgba(167,139,250,0.25);
    border-color: rgba(167,139,250,0.5);
    color: #c4b5fd;
}

body.era-e4 .lex-modal.modal-overlay {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
body.era-e4 .lex-modal-window {
    background: rgba(30,41,59,0.85);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border: 1px solid rgba(102,126,234,0.25);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.55), 0 0 24px rgba(102,126,234,0.18);
    color: #e2e8f0;
}
body.era-e4 .lex-modal-window > .title-bar {
    background: linear-gradient(135deg, rgba(102,126,234,0.4) 0%, rgba(167,139,250,0.3) 100%);
    border-radius: 13px 13px 0 0;
    border-bottom: 1px solid rgba(102,126,234,0.2);
    color: #f1f5f9;
    text-shadow: none;
    padding: 10px 14px;
}
body.era-e4 .lex-modal-window .title-bar .controls button {
    background: rgba(102,126,234,0.15);
    border: 1px solid rgba(102,126,234,0.3);
    border-radius: 6px;
    color: #e2e8f0;
}
body.era-e4 .lex-modal-window .title-bar .controls button:hover {
    background: rgba(167,139,250,0.3);
    border-color: rgba(167,139,250,0.5);
    color: #fff;
}
body.era-e4 .lex-search {
    background: rgba(15,23,42,0.6);
    border: 1px solid rgba(102,126,234,0.25);
    border-radius: 8px;
    color: #e2e8f0;
    font-family: "Inter", system-ui, sans-serif;
    padding: 6px 10px;
    transition: all 0.15s;
}
body.era-e4 .lex-search:focus {
    outline: none;
    border-color: rgba(34,211,238,0.5);
    box-shadow: 0 0 12px rgba(34,211,238,0.2);
}
body.era-e4 .lex-search::placeholder { color: #64748b; }
body.era-e4 .lex-modal-count { color: #94a3b8; }
body.era-e4 .lex-modal-sidebar,
body.era-e4 .lex-modal-content {
    background: rgba(15,23,42,0.6);
    border: 1px solid rgba(102,126,234,0.15);
    border-radius: 8px;
    color: #cbd5e1;
}
body.era-e4 .lex-cat-title {
    color: #a78bfa;
    border-bottom: 1px solid rgba(102,126,234,0.2);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}
body.era-e4 .lex-cat-entry {
    color: #cbd5e1;
    border-radius: 6px;
    transition: all 0.15s;
}
body.era-e4 .lex-cat-entry:hover {
    background: rgba(102,126,234,0.12);
    color: #f1f5f9;
}
body.era-e4 .lex-cat-entry.active {
    background: linear-gradient(135deg, rgba(102,126,234,0.4), rgba(167,139,250,0.3));
    color: #fff;
    border-color: rgba(102,126,234,0.5);
    box-shadow: 0 0 12px rgba(102,126,234,0.25);
}
body.era-e4 .lex-welcome h2,
body.era-e4 .lex-entry-title {
    color: #a78bfa;
    font-weight: 600;
}
body.era-e4 .lex-entry-header { border-bottom: 2px solid rgba(167,139,250,0.4); }
body.era-e4 .lex-entry-short {
    border-left: 3px solid #22d3ee;
    background: rgba(34,211,238,0.08);
    color: #cbd5e1;
}
body.era-e4 .lex-entry-body h4 { color: #a78bfa; }
body.era-e4 .lex-entry-source { color: #64748b; }
body.era-e4 .lex-entry-seealso { border-top: 1px dashed rgba(102,126,234,0.25); }
body.era-e4 .lex-meta { color: #64748b; }
body.era-e4 .lex-nav-btn {
    background: rgba(102,126,234,0.15);
    border: 1px solid rgba(102,126,234,0.3);
    border-radius: 6px;
    color: #a78bfa;
}
body.era-e4 .lex-nav-btn:hover {
    background: rgba(102,126,234,0.25);
    color: #c4b5fd;
}
body.era-e4 .lex-nav-btn[disabled] { color: #475569; opacity: 0.5; }
body.era-e4 #btn-lex-help {
    color: #22d3ee;
    background: rgba(34,211,238,0.1);
    border: 1px solid rgba(34,211,238,0.25);
    border-radius: 6px;
    font-weight: 600;
}
body.era-e4 #btn-lex-help:hover {
    color: #67e8f9;
    background: rgba(34,211,238,0.2);
    box-shadow: 0 0 12px rgba(34,211,238,0.3);
}
