/* Neutral warm-grey parchment HUD, with no image stretching or mask.
   Local palette leaves the portal, native action buttons and dialogs intact. */
body[data-view=builder] :is(.build-meta,.arsenal-equipment,.workshop-scene,.sanctum-scene,.virtue-scene,.journal-scene,.stats-panel){
  --text:#27231f;--muted:#332e28;--gold:#3e2d14;--bright:#30291e;--line:#705f5042;
  color:var(--text);
  background:radial-gradient(ellipse at 45% 0%,#d0c5b944,transparent 80%),linear-gradient(135deg,#c1b5a8eb,#b2a597e6);
  box-shadow:inset 0 0 0 1px #88735d,inset 0 0 0 4px #ebe0d226,0 8px 26px #0004;
}
body[data-view=builder] :is(.build-meta,.arsenal-equipment,.workshop-scene,.sanctum-scene,.virtue-scene,.journal-scene,.stats-panel) :is(h1,h2,h3){color:var(--bright);text-shadow:none}
body[data-view=builder] :is(.scene-heading,.arsenal-heading) .eyebrow,
body[data-view=builder] .stats-panel>.eyebrow,
body[data-view=builder] .stat-life>span,
body[data-view=builder] .stats-panel summary{color:var(--muted)}
body[data-view=builder] .arsenal-slot[aria-pressed=true]{background:linear-gradient(90deg,#97743928,transparent);box-shadow:inset 2px 0 #87652f}
body[data-view=builder] .arsenal-controls{border-top-color:var(--line)}
body[data-view=builder] :is(.build-meta,.arsenal-equipment,.workshop-scene,.sanctum-scene,.virtue-scene,.journal-scene,.stats-panel) .button{background:linear-gradient(180deg,#4b402d,#29271e);color:#ecd4a0;border-color:#806239}
body[data-view=builder] :is(.build-meta,.arsenal-equipment,.workshop-scene,.sanctum-scene,.virtue-scene,.journal-scene,.stats-panel) .button:hover{background:#534632;border-color:#493a23;color:#fff0cf}
body[data-view=builder] .arsenal-change span{color:#ecd4a0}
body[data-view=builder] .arsenal-orbit{opacity:.22}
body[data-view=builder] .arsenal-showcase-image,
body[data-view=builder] .forge-weapon-art img{filter:drop-shadow(0 2px 4px #0005)}
body[data-view=builder] .arsenal-slot-image,
body[data-view=builder] .sanctum-scene .skill-token>.skill-icon{filter:drop-shadow(0 1px 2px #0004)}
body[data-view=builder] .sanctum-scene .locked-node .skill-icon{filter:grayscale(.6);opacity:.4}
body[data-view=builder] .arsenal-slot-token .empty-equipment-art{filter:brightness(.3) sepia(1);opacity:.55}
body[data-view=builder] .stats-panel :is(.stats-grid dd,.defence-details dd){color:var(--gold);text-shadow:none}
body[data-view=builder] .defence-details dt img{filter:brightness(.35) sepia(.4)}
body[data-view=builder] .stats-panel .defence-info{color:var(--gold)}
body[data-view=builder] .stats-panel .defence-info>span{border-color:#886b3a99}
body[data-view=builder] .stats-panel .defence-info:is(:hover,:focus-visible)>span{color:#493a23;border-color:#493a23;background:#fff5df80}
/* Numbers inside the original dark heart and shield retain their gold palette. */
body[data-view=builder] .stats-panel :is(.stat-life strong,.armour-emblem strong){color:#e5c782}
body[data-view=builder] :is(.build-meta,.workshop-scene,.sanctum-scene,.virtue-scene) :is(input,select){color:var(--text);background:#e2d8cb80;border-color:#74694a60;color-scheme:light}
body[data-view=builder] :is(.build-meta,.workshop-scene,.sanctum-scene,.virtue-scene) :is(input,select):is(:hover,:focus-visible){background:#e9ddce;border-color:#65502b;outline-color:#65502b}
body[data-view=builder] .virtue-scene .triangle-virtue input{background:transparent;color:var(--bright)}
body[data-view=builder] .virtue-scene .triangle-pool strong{color:var(--gold)}
body[data-view=builder] .virtue-scene .virtue-bonus{color:#1d3329}
body[data-view=builder] :is(.arsenal-equipment,.workshop-scene) :is(.item-requirements span,.item-stat-warning){color:#26301f}
body[data-view=builder] :is(.arsenal-equipment,.workshop-scene) :is(.item-requirements .is-unmet,.item-stat-warning){color:#50221b}
body[data-view=builder] .workshop-scene .forge-sections{align-items:stretch;gap:.55rem;padding:.35rem 0 .75rem}
body[data-view=builder] .workshop-scene .forge-sections button{min-height:52px;padding:.55rem .8rem;gap:.45rem;border:1px solid #857650;background:#cec2b4;color:#34301f;box-shadow:inset 0 0 0 2px #e9ddce33}
body[data-view=builder] .workshop-scene .forge-sections img{width:24px;height:24px;opacity:1;filter:none;flex:none}
body[data-view=builder] .workshop-scene .forge-sections button:hover{background:#ded1c0;border-color:#493a23}
body[data-view=builder] .workshop-scene .forge-sections button:focus-visible{outline:2px solid #68491f;outline-offset:-4px}
body[data-view=builder] .workshop-scene .forge-sections button[aria-pressed=true]{color:#f3dfb1;background:linear-gradient(180deg,#51432d,#302b20);border-color:#493a23;box-shadow:inset 0 0 0 2px #c9a35f33}
body[data-view=builder] .workshop-scene .forge-sections button[aria-pressed=true] img{filter:brightness(1.35)}
body[data-view=builder] .workshop-scene .forge-sections button[aria-pressed=true] img[src$='forge-rune-circle.webp']{filter:brightness(2.4)}
body[data-view=builder] .workshop-scene .forge-fitting{background:#80673a0c}
body[data-view=builder] .workshop-scene .forge-change{color:var(--gold)}
body[data-view=builder] .workshop-scene .totem-mismatch{color:#50221b}
body[data-view=builder] .workshop-scene .temper-number{color:var(--muted)}
body[data-view=builder] .sanctum-scene .skill-node[aria-pressed=true]>strong{color:var(--bright)}
body[data-view=builder] .sanctum-scene .skill-node:focus-visible{outline-color:var(--gold)}
body[data-view=builder] .sanctum-scene .skill-connectors path{stroke:#75644399}
body[data-view=builder] .sanctum-scene .skill-connectors path.learned-edge{stroke:var(--gold);filter:none}
body[data-view=builder] .sanctum-scene .rank-pips i{filter:brightness(.42) sepia(.6);opacity:.4}
body[data-view=builder] .sanctum-scene .rank-pips i.filled-pip{filter:brightness(.42) sepia(.6);opacity:1}
body[data-view=builder] .sanctum-scene .skill-inspection{background:#d0c5b966;border-image-slice:34}
body[data-view=builder] .journal-scene .notes-tabs button{color:var(--muted);background:#80673a0c;border-color:#80663d40}
body[data-view=builder] .journal-scene .notes-tabs button[aria-pressed=true]{color:var(--bright);background:#e2d8cb80;border-bottom-color:var(--gold)}
body[data-view=builder] .journal-scene .journal-page{background-color:#d5c8b9;background-blend-mode:multiply}
body[data-view=builder] .journal-scene :is(.journal-empty,.journal-page-footer small,.journal-page .markdown blockquote){color:var(--muted)}
body[data-view=builder] .journal-scene .journal-page textarea::placeholder{color:#4e4b36}
/* These native brown game strips are deliberately self-contained dark surfaces. */
body[data-view=builder] :is(.workshop-scene,.sanctum-scene) .scene-switch>button{
  --text:#ded5bd;--muted:#c9bea8;--bright:#ecd4a0;--gold:#c6a365;color:var(--muted)
}
body[data-view=builder] :is(.workshop-scene,.sanctum-scene) .scene-switch>button[aria-pressed=true]{color:var(--bright)}
body[data-view=builder] .workshop-scene .forge-rank-seal{color:var(--gold)}

/* Each upgrade has its own section and the supplied original icon. */
body[data-view=builder] .workshop-scene .forge-sections{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.55rem}
body[data-view=builder] .workshop-scene .forge-sections button{min-width:0;min-height:58px;padding:.45rem .6rem;background-clip:padding-box}
body[data-view=builder] .workshop-scene .forge-sections img{width:36px;height:36px;object-fit:contain;filter:none}
body[data-view=builder] .workshop-scene .forge-sections button[aria-pressed=true] img{filter:none}
body[data-view=builder] #builder-tab-skills>img{filter:none;opacity:1}
body[data-view=builder] .weapon-config[data-upgrade-mode=runes]{grid-template-areas:'hero setup'}
body[data-view=builder] .weapon-config[data-upgrade-mode=joinery]{grid-template-areas:'hero setup'}
body[data-view=builder] .weapon-config[data-upgrade-mode=joinery] .forge-weapon-art{height:180px}
body[data-view=builder] .weapon-config[data-upgrade-mode=totems]{grid-template-areas:'totems totems' 'hero hero'}
body[data-view=builder] .weapon-config[data-upgrade-mode=totems] .forge-weapon{width:min(100%,500px);justify-self:center}
@media(max-width:1250px){
  body[data-view=builder] .workshop-scene .forge-sections{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  body[data-view=builder] .workshop-scene .forge-sections{gap:.35rem}
  body[data-view=builder] .workshop-scene .forge-sections button{flex-direction:column;min-height:76px;gap:.2rem;padding:.4rem .2rem;font-size:.7rem}
  body[data-view=builder] .workshop-scene .forge-sections img{width:32px;height:32px}
  body[data-view=builder] .weapon-config[data-upgrade-mode=runes] .forge-setup{grid-template-columns:1fr}
  body[data-view=builder] .weapon-config[data-upgrade-mode=joinery] .forge-setup{grid-template-columns:1fr}
}
