/* Default Xeon palette. Lapis overrides follow. */
:root { --xepy-black:#000; --xepy-page:#000; --xepy-text:#cfd8ff; --xepy-muted:#a9bddb; --xepy-blue:#0066ff; --xepy-primary:#224ae5; --xepy-border:#14328a; --xepy-hover:#183da8; }
html[data-theme="lapis"] { --xepy-black:#101044; --xepy-page:#0d034b; --xepy-blue:#448aff; --xepy-primary:#244dff; --xepy-border:#273fb0; --xepy-hover:#192878; --settings-surface:#101044; background:#0d034b; }
html[data-theme="lapis"] body, html[data-theme="lapis"] #pageFrame { background:#0d034b; }
html[data-theme="lapis"] :is(.topbar,.bottombar,.discord-popover,.popover-fallback,.birthday-panel,.birthday-panel::after,#birthdayClose) { background:#101044; border-color:#244dff; }
html[data-theme="lapis"] :is(.info-box,.link-card,.saved-site-item,.card,.section,.panel,.profile-card) { background:#101044; border-color:#244dff; }
html[data-theme="lapis"] :is(.tab-button.active,.extra-language-link.active) { background:#192878; border-color:#244dff; }
html[data-theme="lapis"] #languageSearch { background:#0d0b35; border-color:#273fb0; }

html[data-theme="lapis"] :is(.bio-wrap,.fact-generator,.ai-notice) { background:#101044; border-color:#244dff; }
html[data-theme="lapis"] .birthday-panel::after { background:#101044; border-color:#244dff; }
html[data-theme="lapis"] :is(#quickAccessToggle,.email-button,.chat-toggle,.dni-panel,.dni-card) { background:#101044; }

/* Shared toolbar states come after both palettes so every control agrees. */
:root :is(#quickAccessToggle,#settingsToggle,#chatToggle,#emailButton) { background:transparent; color:var(--xepy-blue); border:0; border-radius:8px; box-shadow:none; }
:root :is(#quickAccessToggle,#settingsToggle,#chatToggle,#emailButton):is(:hover,:focus-visible,[aria-expanded="true"]) { background:var(--xepy-hover); color:#fff; }
:root :is(#quickAccessToggle,#settingsToggle,#chatToggle,#emailButton):focus-visible { outline:2px solid var(--xepy-blue); outline-offset:2px; }
.topbar-tabs .tab-button { display:inline-flex; align-items:center; justify-content:center; gap:6px; }
.topbar-tabs .tab-button svg { margin:0; }
.topbar-icon { transform:perspective(300px) rotateX(var(--logo-tilt-x,0deg)) rotateY(var(--logo-tilt-y,0deg)) rotateZ(var(--logo-tilt-roll,0deg)); transition:transform .18s ease-out; }
html[data-theme="lapis"] :is(.account-option,.account-directory,#anotherFact,.channel-entry,.like-hate-column) { background:#101044; border-color:#273fb0; }
html[data-theme="lapis"] :is(.account-option,#anotherFact):hover { background:#192878; border-color:#448aff; }
html[data-theme="lapis"], html[data-theme="lapis"] * { scrollbar-color:#244dff #101044; }
html[data-theme="lapis"] ::-webkit-scrollbar-track { background:#101044; }
html[data-theme="lapis"] ::-webkit-scrollbar-thumb { background:#244dff; border-color:#101044; }
html[data-theme="lapis"] ::-webkit-scrollbar-thumb:hover { background:#448aff; }
@media(prefers-reduced-motion:reduce) { .topbar-icon { transform:none; transition:none; } }

/* Compact dialog frame and stepped action buttons. */
.email-dialog { border-radius:3px; }
.email-dialog .email-dialog-header { background:color-mix(in srgb,var(--xepy-primary) 28%,var(--xepy-black)); border-bottom:1px solid var(--xepy-border); border-left:0; padding-left:18px; row-gap:15px; column-gap:10px; }
.email-dialog .email-dialog-header h2 { color:#fff; }
#emailVerification .email-dialog-header h2 { font-size:14px; line-height:1.4; }
.email-dialog :is(.email-dialog-cancel,.email-dialog-proceed,.email-dialog-continue) { position:relative; min-height:40px; border-radius:3px; border-width:1px 1px 3px; padding:0 18px; letter-spacing:.3px; }
.email-dialog :is(.email-dialog-proceed,.email-dialog-continue):not(:disabled)::after { content:''; width:5px; height:5px; margin-left:10px; border-top:1px solid currentColor; border-right:1px solid currentColor; transform:rotate(45deg); }
.email-dialog .email-dialog-cancel { border:1px solid var(--xepy-border); background:color-mix(in srgb,var(--xepy-primary) 12%,var(--xepy-black)); }
.email-dialog .email-dialog-cancel:hover { background:color-mix(in srgb,var(--xepy-primary) 24%,var(--xepy-black)); border-color:var(--xepy-primary); }
.email-dialog .email-dialog-cancel:focus-visible { outline:1px solid var(--xepy-blue); outline-offset:2px; }
@media(max-width:700px) { #emailVerification .email-dialog-header { padding:12px 10px; } }
.email-dialog :is(.email-dialog-cancel,.email-dialog-proceed,.email-dialog-continue):active:not(:disabled) { transform:translateY(1px); border-bottom-width:1px; }
.discord-popover,.quick-access-popover,.birthday-panel { border-radius:3px; }
.discord-popover iframe { border-radius:2px 2px 0 0; }
.popover-fallback { border-radius:0 0 2px 2px; }
.quick-access-header { border-radius:2px 2px 0 0; }
.ai-notice { opacity:1; }
.ai-notice > summary { background:var(--xepy-black); border-color:var(--xepy-border); border-radius:3px; color:var(--xepy-blue); }
.ai-disclaimer { color:#ddd; font-size:13px; }
.like-hate-column { background:var(--xepy-black); border-color:var(--xepy-border); box-shadow:none; }
.like-hate-column:hover { background:var(--xepy-black); border-color:var(--xepy-primary); box-shadow:none; }
.like-hate-column h3 { color:#cbd7ee; }
.like-hate-column li::marker { color:#90a5cd; }
html[data-theme="lapis"] .like-hate-column:hover { background:#101044; border-color:#448aff; }
html[data-theme="lapis"] .quick-access-popover, html[data-theme="lapis"] .quick-access-header, html[data-theme="lapis"] .quick-access-icon { background:var(--xepy-black); border-color:#225afb; }
.quick-access-entry { border-bottom:0; }

.quick-access-notice { margin:0; padding:8px 18px 12px; color:#a9d5ff; font-size:10px; line-height:1.4; text-align:left; }
