/* Loaded last so legacy page styles cannot reintroduce the old purple theme. */
body.lx-world {
    --bg-app: #E8E0D2;
    --bg-paper: #F7F0E4;
    --bg-paper-deep: #EFE3D0;
    --ink: #2B211A;
    --muted-ink: #746758;
    --wood-dark: #2A211B;
    --wood-mid: #5A3E29;
    --leather-brown: #7A5434;
    --leather-blue: #1F3A46;
    --leather-green: #4F6658;
    --brass: #B8955B;
    --border-soft: #CDBFA9;
    --shadow-soft: rgba(43, 33, 26, 0.18);
    --app-base: var(--bg-app);
    --app-surface: var(--bg-paper);
    --app-section: var(--bg-paper-deep);
    --app-text: var(--ink);
    --app-muted: var(--muted-ink);
    --app-primary: var(--leather-green);
    --app-sub-accent: var(--brass);
    --app-border: var(--border-soft);
    --lx-ivory: var(--bg-app);
    --lx-surface: var(--bg-paper);
    --lx-surface-alt: var(--bg-paper-deep);
    --lx-ink: var(--ink);
    --lx-ink-mid: #4A3A2E;
    --lx-muted: var(--muted-ink);
    --lx-faint: #9B8D7A;
    --lx-green: var(--leather-green);
    --lx-green-mid: #3B5045;
    --lx-green-soft: #E1E4D9;
    --lx-green-btn: var(--leather-green);
    --lx-gold: var(--brass);
    --lx-gold-soft: #EADBC0;
    --lx-sidebar-bg: var(--wood-dark);
    --lx-sidebar-fg: #D6C9B4;
    --lx-sidebar-active: #F6EBD9;
    --lx-sidebar-hover: #3B2D23;
    --lx-line: var(--border-soft);
    --lx-line-soft: #DDD1BE;
    --bs-primary: #4F6658;
    --bs-primary-rgb: 79, 102, 88;
}

body.lx-world,
body.lx-world .page:not(.page--landing),
body.lx-world .page:not(.page--landing) main,
body.lx-world .page:not(.page--landing) .content,
body.lx-world .container,
body.lx-world .container-fluid {
    background-color: var(--lx-ivory) !important;
    background-image:
        radial-gradient(circle at 18% 8%, rgba(255, 250, 238, 0.42), transparent 34%),
        radial-gradient(circle at 82% 92%, rgba(92, 62, 38, 0.10), transparent 42%),
        repeating-linear-gradient(117deg, rgba(82, 59, 39, 0.018) 0 1px, transparent 1px 5px) !important;
}

body.lx-world .card,
body.lx-world .panel,
body.lx-world .today-mission-panel {
    background-color: var(--lx-surface-alt) !important;
    border-color: var(--lx-line) !important;
}

body.lx-world .form-control,
body.lx-world .form-select,
body.lx-world textarea.form-control,
body.lx-world .modal-content,
body.lx-world .dropdown-menu,
body.lx-world .notification-panel {
    background-color: var(--lx-surface) !important;
    border-color: var(--lx-line) !important;
    color: var(--lx-ink) !important;
}

body.lx-world .sidebar,
body.lx-world .navbar,
body.lx-world .top-row,
body.lx-world .nav-scrollable {
    background-color: var(--lx-sidebar-bg) !important;
}

body.lx-world {
    accent-color: var(--lx-green);
    scrollbar-color: var(--lx-green) var(--lx-surface-alt);
}

body.lx-world ::-webkit-scrollbar-track {
    background: var(--lx-surface-alt) !important;
}

body.lx-world ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--wood-mid), var(--wood-dark)) !important;
    border: 2px solid var(--lx-surface-alt) !important;
}

body.lx-world input[type="checkbox"],
body.lx-world input[type="radio"],
body.lx-world input[type="range"] {
    accent-color: var(--lx-green) !important;
}

body.lx-world .form-check-input:checked,
body.lx-world .bg-primary,
body.lx-world .progress-bar {
    background-color: var(--lx-green) !important;
    border-color: var(--lx-green) !important;
}

body.lx-world .today-mission-progress {
    color: var(--lx-green-mid) !important;
    background: var(--lx-green-soft) !important;
    border-color: rgba(31, 58, 74, 0.24) !important;
}

body.lx-world .today-mission-item.is-done {
    background: linear-gradient(100deg, var(--lx-green-soft), rgba(255, 249, 239, 0.88)) !important;
    border-color: rgba(31, 58, 74, 0.32) !important;
}

body.lx-world .today-mission-state,
body.lx-world .today-mission-item.is-done .today-mission-state {
    color: var(--lx-green-mid) !important;
}

body.lx-world .today-mission-icon img,
body.lx-world .today-mission-item.is-done .today-mission-icon img,
body.lx-world .today-mission-state img {
    filter: invert(20%) sepia(24%) saturate(1091%) hue-rotate(155deg) brightness(91%) contrast(91%) !important;
}

body.lx-world .discovery-page .candidate-card.selected,
body.lx-world .diary-page .vocab-card.selected {
    border-color: rgba(31, 58, 74, 0.52) !important;
    box-shadow: 0 0 0 2px rgba(31, 58, 74, 0.14), 0 12px 28px rgba(46, 41, 35, 0.10) !important;
}

body.lx-world .diary-page .selection-badge,
body.lx-world .diary-page .card-chip,
body.lx-world .result-heading-primary {
    color: var(--lx-green-mid) !important;
    background: var(--lx-green-soft) !important;
}
