/* Explicit light preference; existing Matrix rules remain isolated. */
.rampage-theme-button {
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px;
    border: 1px solid currentColor; color: #00ff41; background: transparent;
    cursor: pointer;
}
.rampage-theme-button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
html.rampage-light { color-scheme: light; background: #f3f5f1; }
html.rampage-light body { background: #f3f5f1; color: #233b33; text-shadow: none; }
html.rampage-light .app-backdrop {
    background: radial-gradient(ellipse at top left, #e6eee5, transparent 60%), #f3f5f1;
}
html.rampage-light .app-backdrop-orb,
html.rampage-light .app-backdrop-grid { display: none; }
html.rampage-light body.ui-v2 {
    --h-bg: #fffef9; --h-border: #dce3d9; --h-text: #233b33;
    --h-link: #385046; --h-muted: #607267; --h-surface: #fffef9;
    --h-hover: #edf3eb; --h-icon: #35604a; --h-icon-bg: #e8f0e6;
    --h-tab: linear-gradient(180deg, #edf4e9, #e2eddd);
    --h-tab-edge: #cadac3; --h-focus: #27654c;
}
html.rampage-light .rampage-theme-button { color: #27654c; background: #e8f0e6; border-color: #bfd1bb; }
html.rampage-light .app-topbar { box-shadow: 0 4px 20px -12px #40574740; }
html.rampage-light .favoritos-page.fav-v2 {
    --u-ink: #233b33; --u-muted: #607267; --u-line: #dce3d9;
    --u-surface: #fffefb; --u-surface-2: #f2f5ef;
    --u-accent: #27654c; --u-accent-fill: linear-gradient(180deg, #37795c, #27654c);
    --u-accent-hover: #20553f; --u-accent-soft: #e8f0e6;
    --f-link: #265c48; --f-link-hover-bg: #eaf1e6; --f-dot: #477b59; --f-focus: #27654c;
}
html.rampage-light .favoritos-page .favorites-toolbar {
    background: #fffefb !important; border: 1px solid #dce3d9 !important;
    box-shadow: 0 8px 24px -18px #40574750; border-radius: 12px;
}
html.rampage-light .favoritos-page .favorites-toolbar > .favoritos-action-button {
    background: #edf3e9 !important; color: #29553e !important; border-color: #ccdac5 !important;
}
html.rampage-light .favoritos-page .favorites-toolbar > .favoritos-action-button:hover {
    background: #e0ebd9 !important;
}
html.rampage-light .favoritos-page .favorites-toolbar > .favoritos-action-create {
    background: #edf3e9 !important; color: #29553e !important;
}
html.rampage-light .favoritos-page .favorites-toolbar > .favoritos-action-create:hover { background: #e0ebd9 !important; }
html.rampage-light .favoritos-page .favorites-toolbar .favoritos-action-icon { color: inherit !important; }
html.rampage-light ::selection { background: #cce3c7; color: #173b29; }

/* One palette for navigation, folders, controls and dialogs. */
html.rampage-light {
    --light-bg: #f4f6f5;
    --light-surface: #ffffff;
    --light-line: #dce5e0;
    --light-ink: #243b32;
    --light-muted: #64776d;
    --light-accent: #226449;
    --light-soft: #edf4ef;
    background: var(--light-bg);
}
html.rampage-light body { background: var(--light-bg); color: var(--light-ink); }
html.rampage-light .app-backdrop { background: linear-gradient(155deg, #edf3ef, #f7f8f7 55%); }
html.rampage-light body.ui-v2 {
    --h-bg: #ffffff;
    --h-surface: #ffffff;
    --h-border: var(--light-line);
    --h-tab: #edf4ef;
    --h-tab-edge: #ccddd2;
}
html.rampage-light .favoritos-page.fav-v2 {
    --f-tab: #a5c4b2;
    --f-back: #b7d0c1;
    --f-front: linear-gradient(180deg, #eff6f1, #dcebe1);
    --f-front-hi: #ffffff;
    --f-edge: #b9cfc1;
    --f-title: #274b39;
    --f-meta: #5d7768;
    --f-shadow: 0 8px 16px -14px #284b3a55;
    --f-shadow-hover: 0 12px 20px -16px #284b3a66;
    --f-paper: #ffffff;
    --f-paper-2: #f6f9f7;
    --f-peek: #ffffff;
    --f-peek-2: #eaf1ed;
    --f-paper-edge: #dce5e0;
    --u-surface: #ffffff;
    --u-surface-2: #f4f7f5;
    --u-accent-fill: #226449;
}
html.rampage-light body.ui-v2 .app-brand-mark-v2 .rb-back { fill: #8caf9b; }
html.rampage-light body.ui-v2 .app-brand-mark-v2 .rb-paper { fill: #ffffff; }
html.rampage-light body.ui-v2 .app-brand-mark-v2 .rb-front path { fill: #c9dfd1; }
html.rampage-light body.ui-v2 .app-brand-mark-v2 .rb-front text { fill: #274b39; }
html.rampage-light .favoritos-page .favorites-toolbar {
    background: var(--light-surface) !important;
    border-color: var(--light-line) !important;
    box-shadow: 0 2px 8px #233b3305;
}
html.rampage-light .favoritos-page .favorites-toolbar > .favoritos-action-button {
    background: #f5f8f6 !important;
    border-color: var(--light-line) !important;
    color: var(--light-ink) !important;
    box-shadow: none !important;
}
html.rampage-light .favoritos-page .favorites-toolbar > .favoritos-action-button:hover {
    background: #e7f0e9 !important;
    border-color: #aac6b5 !important;
}
html.rampage-light .favoritos-page .favorites-toolbar > .favoritos-action-create {
    background: #f5f8f6 !important;
    color: var(--light-ink) !important;
}
html.rampage-light .favoritos-page .favorites-toolbar > .favoritos-action-create:hover { background: #e7f0e9 !important; }
html.rampage-light .favorites-toolbar .favoritos-mobile-icon-button-active,
html.rampage-light .favorites-toolbar .favoritos-action-button:focus-visible { outline-color: var(--light-accent) !important; }
html.rampage-light .fav-search {
    background: #ffffff;
    border: 1px solid var(--light-line);
    border-radius: 8px;
    padding: 6px 10px;
}
html.rampage-light .fav-search:focus-within { border-color: var(--light-accent); box-shadow: 0 0 0 3px #22644912; }
html.rampage-light .fav-search-input::placeholder { color: var(--light-muted); }
html.rampage-light .fav-search-prompt,
html.rampage-light .fav-search-count { color: var(--light-muted); }
html.rampage-light .fav-mode { background: #f3f6f4; border-color: var(--light-line); border-radius: 10px; }
html.rampage-light .fav-mode__btn.is-active { background: var(--light-accent); color: #ffffff; box-shadow: none; }
html.rampage-light .fav-mode__btn.is-active .fav-mode__check { color: var(--light-accent); }
html.rampage-light .app-main :is(button, a).bg-blue-600,
html.rampage-light .app-main :is(button, a).bg-indigo-600,
html.rampage-light .app-main :is(button, a).bg-green-600 {
    background: var(--light-accent) !important;
    color: #ffffff !important;
}
html.rampage-light .app-main :is(button, a).bg-blue-600:hover,
html.rampage-light .app-main :is(button, a).bg-indigo-600:hover,
html.rampage-light .app-main :is(button, a).bg-green-600:hover { background: #194d37 !important; }
html.rampage-light .app-main :is(input:not([type=checkbox]):not([type=radio]), textarea, select):focus {
    border-color: var(--light-accent);
    --tw-ring-color: #22644926;
}
