/* Shared reading surfaces: keep the existing purple identity across lists and details. */
body{color-scheme:dark}
body .workspace .card{background:#2c2239;color:#eee3f5;border-color:#624870}
body .workspace .card :is(h1,h2,h3,h4){color:#f4e9fc}
body .workspace .card :is(p,dt,label,small,.muted,.help){color:#c9b7d5}
body .workspace .card :is(a,summary){color:#dcbbf0}
body .workspace .card :is(strong,dd){color:#f1d29b}
body .workspace :is(input:not([type=checkbox]):not([type=radio]),select,textarea){background:#21182c;color:#f3e8fa;border-color:#76548a}
body .workspace :is(input,textarea)::placeholder{color:#af9bbc;opacity:1}
body .workspace :is(.chart,.result-item,.player-edit,.player-next,.ency-research){background:#241b30!important;color:#decde8;border-color:#644973}
body .workspace :is(.player-answer,.result-item strong,.chart-title){color:#f1d29b}
body .workspace :is(.home-search-field,.home-directory-card,.home-primary-entries>a,#home .home-bottom>.card){background:#30223e;border-color:#76518c;color:#f1e4fa}
body .workspace :is(.home-directory-card,.home-primary-entries>a):hover{background:#443050;border-color:#ba8dd1}
body .workspace :is(.home-directory-card h3,.home-primary-entries h3,#home .home-bottom h2){color:#f5eafa}
body .workspace :is(.home-directory-card p,.home-primary-entries p,#home .home-bottom p){color:#c9b5d5}
#brand :is(.service-entry,.service-entry-1,.service-offer,.service-addons,.service-matrix tbody th){background:#332440;color:#e9d9f4;border-color:#725280}
#brand :is(.service-entry h2,.service-entry a,.service-offer strong,.service-matrix td,.service-matrix th){color:#f3e5fc}
#brand :is(.service-entry p,.service-entry small,.service-offer span){color:#cfbadc}
#brand .service-price-notice{background:#392c43;color:#e1c9ef;border-color:#775589}
#brand .service-matrix thead th{background:#3b2a49;color:#ead7f5;border-color:#735282}
body .workspace :is(.card .toolbar button,.curve-actions button,#brand .button,#brand .contact-poster-action){background:#493257;color:#edddf7;border-color:#9873ad}
body .workspace .benefit-delta{background:#46304f;color:#f5d69e;border-color:#916ba2}
body .workspace .damage-track{background:#49384f}

/* The detail renderer used pale defaults while the directory already used dark cards. */
body[data-page=encyclopedia] #ency-detail .card{background:#2c2239;color:#e9ddf2;border-color:#634971}
body[data-page=encyclopedia] #ency-detail :is(h1,h2,h3,h4){color:#f4e9fc}
body[data-page=encyclopedia] #ency-detail :is(p,dt,label,small,.ency-compact-note,.ency-player-note,.ency-muted,.ency-detail-intro){color:#cbb7d7}
body[data-page=encyclopedia] #ency-detail :is(li,code){color:#d5c2e0}
body[data-page=encyclopedia] #ency-detail .boss-learning-grid article{background:#241b30;border-color:#76528a}
body[data-page=encyclopedia] #ency-detail :is(a,summary){color:#dfbff4}
body[data-page=encyclopedia] #ency-detail :is(strong,dd){color:#f1d29b}
body[data-page=encyclopedia] :is(.entry-picture,.detail-picture,.ency-preview-thumb,.ency-native-image:not(.region-base):not(.ency-merchant-avatar),.ency-image-unavailable){background:#211a2b;border-color:#5b426b}
body[data-page=encyclopedia] .ency-preview-thumb>small{background:#32253d;color:#cdb3dc}
body[data-page=encyclopedia] :is(.ency-item-quality,.ency-objective-kind,.ency-class-tags span,.ency-task-heading){background:#493154;color:#e0c5ef;border-color:#775487}
body[data-page=encyclopedia] #ency-detail :is(.ency-quest-start,.ency-known-gap,.ency-goal-method,.ency-effect-fields>div,.ency-state,.ency-region-point-info){background:#241b30;color:#dcc9e8;border-color:#75508a}
body[data-page=encyclopedia] #ency-detail .ency-state.warning{background:#3d3025;color:#f0d0a1;border-color:#b78c52}
body[data-page=encyclopedia] #ency-detail :is(.ency-player-table th,.ency-player-table td,.ency-stat-list>div,.ency-reward-list>div,.ency-link-row,.ency-goal-detail){border-color:#5d4369}
body[data-page=encyclopedia] #ency-detail .ency-player-table thead th{background:#392948;color:#ddc8ea}
body[data-page=encyclopedia] #ency-detail .ency-player-table tbody tr:nth-child(even){background:#30233b}
body[data-page=encyclopedia] #ency-detail .ency-player-table td{color:#ded0e8}
body[data-page=encyclopedia] #ency-detail .ency-quality-switch a[aria-current=page]{background:#70448a;color:#fff;border-color:#b583d3}
body[data-page=encyclopedia] #ency-detail .ency-region-point-list button{background:#2b2036;color:#eadcf3;border-color:#715280}
body[data-page=encyclopedia] #ency-detail .ency-goal-source-preview{border-color:#9468ae;color:#d6bfdf}

/* A quest's action is the main reading target; restrictions remain directly underneath. */
body[data-page=encyclopedia] .ency-quest-merchant{display:flex;align-items:center;gap:5px;flex-wrap:wrap;font-size:12px;line-height:1.6;color:#c5add4;margin:0 0 5px}
body[data-page=encyclopedia] .ency-quest-merchant a{display:inline-flex;align-items:center;gap:7px;font-weight:650;color:#e4c8f3;text-decoration:none}
body[data-page=encyclopedia] .ency-merchant-avatar{width:26px;height:26px;object-fit:cover;border-radius:6px;background:#241b30}
body[data-page=encyclopedia] #ency-detail .ency-quest-merchant{margin:10px 0 0;font-size:16px;color:#cbb6d8}
body[data-page=encyclopedia] #ency-detail .ency-quest-merchant .ency-merchant-avatar{width:38px;height:38px}
body[data-page=encyclopedia] .ency-completion-heading{margin:0 0 9px;color:#caa5df;font-size:12px;font-weight:650;letter-spacing:.08em}
body[data-page=encyclopedia] .ency-task-main{border-left:3px solid #b487cd;padding:4px 0 4px 16px}
body[data-page=encyclopedia] .ency-task-row .ency-objective-title .ency-completion-action{font-size:18px;line-height:1.6;color:#ffe0a5;font-weight:750}
body[data-page=encyclopedia] .ency-task-objective ul.ency-completion-rules{display:flex;flex-wrap:wrap;list-style:none;padding:0;margin:7px 0 0;gap:6px}
body[data-page=encyclopedia] .ency-task-objective ul.ency-completion-rules li{display:block;background:#3e302c;color:#f2d4a4;border:1px solid #806146;border-radius:6px;padding:5px 9px;margin:0;font-size:13px;line-height:1.65}
body[data-page=encyclopedia] .ency-task-objective ul.ency-completion-rules li:before{content:none}
body[data-page=encyclopedia] #ency-detail #quest-goals{border:1px solid #9870b1;border-left:4px solid #c095d9;background:linear-gradient(115deg,#392745,#2a2137)}
body[data-page=encyclopedia] #ency-detail #quest-goals>h2{font-size:20px;margin-bottom:18px;color:#e6c8f7}
body[data-page=encyclopedia] #quest-goals .ency-objective-title .ency-completion-action{font-size:25px;font-weight:750;line-height:1.55;color:#ffe1ab}
body[data-page=encyclopedia] #quest-goals .ency-goal-method{font-size:14px;line-height:1.9;margin:14px 0 8px}
body[data-page=encyclopedia] .ency-task-row .ency-task-reward-summary{opacity:.86}

/* Actual item series are grouped together; search applies to all rendered groups. */
.ency-series-nav{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0 22px}
.ency-series-nav a{display:inline-flex;gap:9px;align-items:center;min-height:38px;padding:7px 12px;border:1px solid #805b92;background:#392646;border-radius:7px;text-decoration:none;font-size:13px}
.ency-series-nav a span{color:#bca2ca;font-size:12px}
.ency-recipe-series{scroll-margin-top:85px;margin:24px 0 0;min-width:0}
.ency-recipe-series>h3{display:flex;align-items:center;gap:12px;margin:0;padding:12px 0;border-top:1px solid #886097;font-size:18px}
.ency-recipe-series>h3 small{font-size:12px;font-weight:400}
.ency-recipe-series .ency-player-table th:first-child{width:39%}
.ency-recipe-series .ency-player-table th:nth-child(2){width:12%}
.ency-craft-collection .ency-collection-tools{position:relative}
@media(max-width:700px){
 body[data-page=encyclopedia] .ency-task-main{padding-left:11px}
 body[data-page=encyclopedia] .ency-task-row .ency-objective-title .ency-completion-action{font-size:17px}
 body[data-page=encyclopedia] #quest-goals .ency-objective-title .ency-completion-action{font-size:21px}
 body[data-page=encyclopedia] #ency-detail .ency-quest-merchant{font-size:14px}
 body[data-page=encyclopedia] .ency-task-objective ul.ency-completion-rules li{font-size:12px}
 body[data-page=encyclopedia] .ency-task-row>header>div{display:block}
 .ency-series-nav{gap:6px}.ency-series-nav a{padding:6px 9px;font-size:12px}
 .ency-recipe-series .ency-player-table th:first-child{width:36%}
 .ency-recipe-series>h3{font-size:17px}
}
