/* Shared surface and action contracts for preparation and the standalone War Room. */
#profilesDrawer #warRoomCrowns { display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:8px; }
#profilesDrawer .war-room-balance { display:inline-block;padding:6px 10px;border-radius:6px;background:#203244;color:#f2cd6c;font:800 22px/1.2 'Barlow Condensed',sans-serif;font-variant-numeric:tabular-nums; }
#profilesDrawer .war-room-purchase-note { color:#5c4e3b;font-size:13px;line-height:1.4; }
#profilesDrawer:not(.preparation-war-room) .defense-surface .defense-action.back-to-slots { display:none; }
#profilesDrawer #battlePreparation { margin-bottom:20px; }
#profilesDrawer .defense-surface :is(.enemy-guide-heading h3,.enemy-guide-category > h4,.enemy-guide-empty strong) { color:var(--defense-text); }
#profilesDrawer .defense-surface :is(.enemy-guide-heading p,.enemy-guide-category > h4 span,.enemy-category-empty,.enemy-guide-empty,.enemy-rank-legend) { color:var(--defense-muted); }
#profilesDrawer {
  --defense-surface:#142334;
  --defense-raised:#203244;
  --defense-text:#fff0ce;
  --defense-muted:#cbd5d9;
  --defense-border:#647586;
  --defense-action:#f2cd6c;
  --defense-action-text:#201b10;
}
#profilesDrawer .inventory-pane.defense-surface {
  --paper-ink:var(--defense-text);
  --paper-muted:var(--defense-muted);
  background:var(--defense-surface);
  color:var(--defense-text);
  padding:16px;
}
#profilesDrawer .defense-surface :is(.inventory-section-heading,.player-attribute-heading,.run-upgrade-heading,.wall-armory,.loadout-panel) :is(h3,h4) {
  color:var(--defense-text);
}
#profilesDrawer .defense-surface :is(.inventory-section-heading,.player-attribute-heading,.run-upgrade-heading) p,
#profilesDrawer .defense-surface :is(.player-combat-traits,.inventory-empty,#mercenaryStatus) {
  color:var(--defense-muted);
}
#profilesDrawer .defense-surface :is(.player-attribute-heading,.run-upgrade-heading) > strong {
  color:var(--defense-action);
}
#profilesDrawer .defense-surface .equipment-stat-sheet {
  background:var(--defense-raised);
  border:1px solid var(--defense-border);
}
#profilesDrawer .defense-surface .equipment-stat-sheet > div {
  background:transparent;
  border-color:var(--defense-border);
}
#profilesDrawer .defense-surface .equipment-stat-sheet dd { color:var(--defense-text); }
#profilesDrawer .defense-surface .equipment-stat-sheet :is(dt,small) { color:var(--defense-muted); }
#profilesDrawer .defense-surface :is(.equipment-slot,.wall-equipment-slot) :is(small,em) { color:var(--defense-muted); }
#profilesDrawer .defense-surface :is(.equipment-slot,.wall-equipment-slot) strong { color:var(--defense-text); }
#profilesDrawer .defense-surface .equipment-item-copy > small { color:var(--defense-muted); }
#profilesDrawer .defense-surface .defense-action {
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:44px;padding:11px 16px;border:1px solid var(--defense-action);
  border-radius:6px;background:var(--defense-action);color:var(--defense-action-text);
  font:700 15px/1.3 'Barlow',sans-serif;text-align:center;cursor:pointer;
  box-shadow:none;
}
#profilesDrawer .defense-surface .defense-action:hover:not(:disabled) { background:#ffe29a;border-color:#ffe29a; }
#profilesDrawer .defense-surface .defense-action:active:not(:disabled) { background:#dfb651; }
#profilesDrawer .defense-surface .defense-action:focus-visible { outline:3px solid #fff7e5;outline-offset:3px; }
#profilesDrawer .defense-surface .defense-action:disabled { background:#3a4957;border-color:#647586;color:#cbd5d9;opacity:1;cursor:default; }
#profilesDrawer .defense-surface .defense-action.secondary { background:#d9dfdf;border-color:#d9dfdf;color:#172431; }
#profilesDrawer .defense-surface .slot-spell-picker > .defense-action { margin:4px 8px 4px 0; }
#profilesDrawer .defense-surface .defense-action.back-to-slots {
  flex:none;align-self:flex-start;min-height:44px;margin:0 0 8px;padding:8px 12px;
  background:transparent;border-color:var(--defense-border);color:var(--defense-action);
  font:700 15px/1.3 'Barlow Condensed',sans-serif;
}
#profilesDrawer .defense-surface .back-to-slots::before {
  content:'';width:8px;height:8px;margin-right:4px;
  border-left:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);
}
#profilesDrawer .defense-surface .defense-action.back-to-slots:hover:not(:disabled) {
  background:var(--defense-raised);border-color:var(--defense-action);
}
#profilesDrawer .defense-surface .defense-action.back-to-slots:active:not(:disabled) {
  background:var(--defense-raised);color:var(--defense-text);
}
#profilesDrawer .defense-surface .relic-vault { background:var(--defense-surface); }
#profilesDrawer .defense-surface .relic-copy small {color:var(--defense-muted);}
#profilesDrawer .defense-surface .relic-row:disabled {opacity:1;}
#profilesDrawer .defense-surface :is(#costumeName,#keepSkinName) {color:var(--defense-text);}
#profilesDrawer .defense-surface [data-gear-filter] {color:var(--defense-muted);border-color:var(--defense-border);}
#profilesDrawer .defense-surface [data-gear-filter][aria-pressed=true] {background:var(--defense-action);color:var(--defense-action-text);}
#profilesDrawer .defense-surface .wall-equipment-item small {color:var(--defense-muted);}
#profilesDrawer .defense-surface .familiar-progress :is(h3,h4) {color:var(--defense-text);}
#profilesDrawer .defense-surface .familiar-progress p {color:var(--defense-muted);}
#profilesDrawer .defense-surface .familiar-progress strong {color:var(--defense-action);}
#profilesDrawer .defense-surface .familiar-progress {color:var(--defense-text);border-color:var(--defense-border);}
#profilesDrawer .defense-surface .familiar-progress :is(span,small) {color:var(--defense-muted);}
#profilesDrawer .defense-surface .familiar-progress summary {color:var(--defense-action);}
#profilesDrawer .defense-surface .run-upgrade-heading { flex-wrap:wrap; }
#profilesDrawer .defense-surface .run-upgrade-heading > strong { white-space:normal;max-width:100%; }
@media(max-width:800px) {
  #profilesDrawer.preparation-war-room .inventory-tabs:not(.sections-open) {display:none;}
  #profilesDrawer.preparation-war-room .inventory-tabs.sections-open {display:flex;flex-direction:column;}
}
@media(max-width:700px) {
  #profilesDrawer .inventory-pane.defense-surface[data-inventory-pane=skills] {display:block;overflow:auto;padding:8px;}
  #profilesDrawer .inventory-pane.defense-surface[data-inventory-pane=skills][hidden] {display:none;}
  #profilesDrawer .defense-surface[data-inventory-pane=skills] #skillTreeGrid {height:540px;min-height:540px;flex:none;}
  #profilesDrawer .defense-surface .run-upgrade-heading {display:block;}
  #profilesDrawer .defense-surface .run-upgrade-heading > strong {display:block;margin-top:6px;}
}
/* Rounded spell frames share the skill tree's gold trim and inset artwork. */
#profilesDrawer .inventory-pane.preparation-loadout { flex:0 1 auto; }
/* Preparation scrolls with the camp panel, without a nested content surface. */
#profilesDrawer.preparation-war-room { height:auto;min-height:0;max-height:none;overflow:visible; }
#profilesDrawer.preparation-war-room .inventory-pane[data-inventory-pane],
#profilesDrawer.preparation-war-room .inventory-pane.defense-surface[data-inventory-pane] {
  flex:0 0 auto;overflow:visible;background:transparent;border-radius:0;
}
#profilesDrawer.preparation-war-room .inventory-pane .camp-pane { background:transparent; }
#profilesDrawer .spell-socket-bar {
  display:grid;grid-template-columns:repeat(3,minmax(0,104px));gap:12px;
  align-items:start;justify-content:start;margin:8px 0 12px;
  min-width:0;padding:8px 6px;background:transparent;border:0;
}
@media(min-width:801px) {
  #profilesDrawer .spell-socket-bar { grid-template-columns:repeat(auto-fill,minmax(0,104px)); }
}
#profilesDrawer .spell-socket-bar .spell-socket {
  position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;
  width:100%;min-width:0;min-height:64px;padding:0;gap:8px;
  background:transparent;border:0;border-radius:0;box-shadow:none;
}
#profilesDrawer .spell-socket-bar .spell-socket-well {
  position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;
  gap:4px;width:100%;height:108px;padding:6px 4px 22px;
  border:1px solid #c4a35e;border-radius:14px;background:#1c2b3c;
  outline:1px solid #746343;outline-offset:3px;
  box-shadow:inset 0 2px 8px #070d1570;
}
#profilesDrawer .spell-socket-well > :is(.spell-art,.command-art,svg,img) {display:block;width:44px;height:44px;flex:0 0 44px;object-fit:contain;}
#profilesDrawer .spell-socket-bar .spell-socket strong {font:800 14px/1.15 'Barlow Condensed',sans-serif;color:#fff0ce;overflow-wrap:anywhere;text-align:center;text-transform:uppercase;}
#profilesDrawer .spell-socket .socket-rank {position:absolute;left:50%;bottom:4px;transform:translateX(-50%);min-width:22px;padding:3px 5px;background:#10151e;color:#f2cd6c;font:700 11px/1 'Barlow',sans-serif;border-radius:4px;border:1px solid #746343;}
#profilesDrawer .spell-socket.is-vacant .spell-socket-well {border-color:#514b40;}
#profilesDrawer .spell-socket.is-vacant .spell-socket-well {justify-content:center;outline-color:#514b40;}
#profilesDrawer .socket-etch {width:16px;height:16px;border:1px solid #635946;transform:rotate(45deg);box-shadow:inset 0 2px 4px #0008;}
#profilesDrawer .spell-socket:hover .spell-socket-well {border-color:#d7b86f;}
#profilesDrawer .spell-socket[aria-pressed=true] .spell-socket-well {border-color:#f2cd6c;background:#283448;}
#profilesDrawer .spell-socket:focus-visible {outline:3px solid #fff0ce;outline-offset:4px;border-radius:4px;}
@media(max-width:500px) {
  #profilesDrawer .spell-socket-bar .spell-socket {min-height:44px;}
  #profilesDrawer .spell-socket-bar .spell-socket strong {font-size:13px;}
}

/* The embedded wall armory uses the preparation surface, including its heading. */
#profilesDrawer.preparation-war-room .wall-armory { background:transparent;color:var(--defense-text);border:0;box-shadow:none; }
