/* JW Quest V36.47 — 16 avatar-based themes, retains light/dark mode, calm readable typography. */
html[data-jwq-character-theme]{
 --jwq-theme-accent:var(--jwq-character-accent);
 --jwq-theme-pale:var(--jwq-character-soft);
 --accent:var(--jwq-character-accent);
 --blue:var(--jwq-character-accent);
 --primary:var(--jwq-character-accent);
 --blue2:var(--jwq-character-accent);
 --v35-accent:var(--jwq-character-accent);
 --accent-soft:var(--jwq-character-soft);
 --jwq-avatar-tone:var(--jwq-character-tone);
 accent-color:var(--jwq-character-accent);
}
/* Delicate palette influence beyond avatar circle: body backplate and main surfaces. */
html[data-jwq-character-theme]:not([data-jwq-theme='dark']) body:not(.dark):not([data-theme='dark']){
 background-image:radial-gradient(ellipse at 90% 2%,color-mix(in srgb,var(--jwq-character-tone) 9%,transparent),transparent 52%);
 background-attachment:fixed;
}
html[data-jwq-character-theme] .jwq-global-header{
 border-bottom-color:color-mix(in srgb,var(--jwq-character-tone) 29%,var(--border,var(--line,#e5ebf2)))!important;
}
html[data-jwq-character-theme] .jwq-global-header .jwq-global-brand strong,
html[data-jwq-character-theme] .jwq-global-header .jwq-global-stat{color:var(--jwq-character-accent)!important}
html[data-jwq-character-theme] .jwq-global-header .jwq-global-profile{
 border:1px solid color-mix(in srgb,var(--jwq-character-tone) 46%,#dce4e9)!important;
 background:color-mix(in srgb,var(--jwq-character-tone) 10%,var(--surface,var(--card,#fff)))!important;
 box-shadow:0 0 0 2px color-mix(in srgb,var(--jwq-character-tone) 8%,transparent)!important;
}
html[data-jwq-character-theme] .bottomnav.jwq-unified-bottomnav .navitem.active{
 color:var(--jwq-character-accent)!important;
}
html[data-jwq-character-theme] .bottomnav.jwq-unified-bottomnav{
 border-top-color:color-mix(in srgb,var(--jwq-character-tone) 30%,var(--line,#dce8fb))!important;
}
html[data-jwq-character-theme] .bottomnav.jwq-unified-bottomnav .jwq-nav-new{
 background:var(--jwq-character-accent)!important;
}
html[data-jwq-character-theme] .jwq-avatar-option[aria-pressed='true']{
 border-color:var(--jwq-character-accent)!important;
 background:color-mix(in srgb,var(--jwq-character-tone) 13%,transparent)!important;
}
html[data-jwq-character-theme] .jwq-avatar-section{
 border-color:color-mix(in srgb,var(--jwq-character-tone) 22%,var(--line,#e4e8eb))!important;
}
html[data-jwq-character-theme] .card.profile{
 background-image:url('assets/decor/mountain-line.svg'),radial-gradient(ellipse at 15% 5%,color-mix(in srgb,var(--jwq-character-tone) 27%,transparent),transparent 68%),linear-gradient(145deg,color-mix(in srgb,var(--jwq-character-tone) 16%,#fff),#fff 82%)!important;
 border-color:color-mix(in srgb,var(--jwq-character-tone) 35%,#d9e3ed)!important;
}
html[data-jwq-character-theme] .card.profile .pstat{
 border-color:color-mix(in srgb,var(--jwq-character-tone) 25%,#e5eafa)!important;
 background:color-mix(in srgb,var(--jwq-character-tone) 7%,#fff)!important;
}
html[data-jwq-character-theme] :is(.cm-button,.cm-moderation-filter button[aria-pressed='true'],.cm-admin-approval){
 --cm-accent:var(--jwq-character-accent);
}
html[data-jwq-character-theme] body.jwq-community-page{
 --cm-accent:var(--jwq-character-accent);
}
/* Legible actions: only affirmative buttons; never recolor correctness/error feedback. */
html[data-jwq-character-theme] :is(.v35-daily a:first-of-type,.jwq-v36-tool a.primary,.jwq-review-btn,.jwq-resume,.jwq-global-lang-menu button[aria-current='true']){
 border-color:color-mix(in srgb,var(--jwq-character-tone) 30%,transparent);
}
html[data-jwq-character-theme] :is(a,button,input,textarea,select):focus-visible{
 outline-color:var(--jwq-character-accent)!important;
}
/* Cropped portraits have their own illustrated scenery; no thick rings, shadows or artificial halos. */
html[data-jwq-character-theme] .jwq-avatar-section .jwq-avatar-option img,
html[data-jwq-character-theme] #profileAvatar img,
html[data-jwq-character-theme] .jwq-header-avatar,
html[data-jwq-character-theme] .cm-member-avatar img{
 width:100%!important;height:100%!important;display:block!important;
 object-fit:cover!important;object-position:center!important;
 aspect-ratio:1!important;border-radius:50%!important;
 border:0!important;box-shadow:none!important;filter:none!important;
}
html[data-jwq-character-theme] #profileAvatar{
 border:1px solid color-mix(in srgb,var(--jwq-character-tone) 58%,#e4e8ed)!important;
 box-shadow:none!important;padding:0!important;
}
html[data-jwq-character-theme] .jwq-avatar-section .jwq-avatar-option img{
 width:min(100%,82px)!important;height:auto!important;
 border:1px solid color-mix(in srgb,var(--avatar-color) 58%,#e3e6ea)!important;
 box-shadow:none!important;
}
html[data-jwq-character-theme] .cm-member-avatar{
 border-width:1px!important;
 border-color:color-mix(in srgb,var(--jwq-character-tone) 32%,var(--cm-border))!important;
}
/* Do not break dark-mode backgrounds, foreground or contrast. */
html[data-jwq-character-theme][data-jwq-theme='dark'] .card.profile,
html[data-jwq-character-theme] body.dark .card.profile{
 background-image:url('assets/decor/mountain-line.svg'),radial-gradient(ellipse at 15% 5%,color-mix(in srgb,var(--jwq-character-tone) 18%,transparent),transparent 68%),linear-gradient(145deg,color-mix(in srgb,var(--jwq-character-tone) 12%,#142235),#102035 82%)!important;
 border-color:color-mix(in srgb,var(--jwq-character-tone) 27%,#33475c)!important;
}
html[data-jwq-character-theme][data-jwq-theme='dark'] .card.profile .pstat{
 border-color:color-mix(in srgb,var(--jwq-character-tone) 17%,#42526b)!important;
 background:color-mix(in srgb,var(--jwq-character-tone) 7%,#142235)!important;
}
html[data-jwq-character-theme][data-jwq-theme='dark'] .jwq-global-header .jwq-global-profile,
html[data-jwq-character-theme] body.dark .jwq-global-header .jwq-global-profile{
 background:color-mix(in srgb,var(--jwq-character-tone) 15%,#19283b)!important;
 border-color:color-mix(in srgb,var(--jwq-character-tone) 27%,#435368)!important;
}
@media(prefers-color-scheme:dark){
 html[data-jwq-character-theme]:not([data-jwq-theme='light']) .card.profile{
 background-image:url('assets/decor/mountain-line.svg'),radial-gradient(ellipse at 15% 5%,color-mix(in srgb,var(--jwq-character-tone) 18%,transparent),transparent 68%),linear-gradient(145deg,color-mix(in srgb,var(--jwq-character-tone) 12%,#142235),#102035 82%)!important;
 }
 html[data-jwq-character-theme]:not([data-jwq-theme='light']) .card.profile .pstat{
 background:color-mix(in srgb,var(--jwq-character-tone) 7%,#142235)!important;
 }
}
@media(prefers-reduced-motion:reduce){html[data-jwq-character-theme] *{scroll-behavior:auto!important}}

/* Subtle palette cue under each avatar, not a ring around the portrait. */
html[data-jwq-character-theme] .jwq-avatar-section .jwq-avatar-option::after{content:'';display:block;width:32px;height:5px;border-radius:99px;background:linear-gradient(90deg,var(--avatar-color) 0 33%,color-mix(in srgb,var(--avatar-color) 65%,#fff) 33% 66%,color-mix(in srgb,var(--avatar-color) 25%,#fff) 66%);margin-top:1px;opacity:.82;flex-shrink:0}
html[data-jwq-character-theme][data-jwq-theme='dark'] .bottomnav.jwq-unified-bottomnav .navitem.active,html[data-jwq-character-theme][data-jwq-theme='dark'] .jwq-global-header .jwq-global-brand strong,html[data-jwq-character-theme][data-jwq-theme='dark'] .jwq-global-header .jwq-global-stat{color:color-mix(in srgb,var(--jwq-character-tone) 70%,white)!important}
@media(prefers-color-scheme:dark){html[data-jwq-character-theme]:not([data-jwq-theme='light']) .bottomnav.jwq-unified-bottomnav .navitem.active,html[data-jwq-character-theme]:not([data-jwq-theme='light']) .jwq-global-header .jwq-global-brand strong{color:color-mix(in srgb,var(--jwq-character-tone) 70%,white)!important}}
