/* ============================================================================
   D2 GUN LOCKER  -  02-refinements-1.css  (part 1 of 3)
   ----------------------------------------------------------------------------
   Contiguous slice of the original stylesheet, cut only at rule boundaries and
   kept in EXACT cascade order (no rules reordered/removed). Load parts in order.
   Late style overrides; load after all 01-core parts.
   ============================================================================ */

/* ============================================================================
   D2 GUN LOCKER  -  02-refinements.css  (late overrides)
   ----------------------------------------------------------------------------
   Styling refinements layered on top of 01-core.css (segmented stat bars,
   stats-tab number/reload cleanup, etc). Loaded second so it wins.
   ============================================================================ */

/* D2 GUN LOCKER — consolidated stylesheet
   Consolidated from 53 source style blocks, in original cascade order.
   No rules reordered, merged, or removed — rendering is identical. */

  .armor-db-layout {
    --left-pane: 1fr;
    --right-pane: 1fr;
    display: grid !important;
    grid-template-columns: minmax(220px, var(--left-pane)) 9px minmax(300px, var(--right-pane)) !important;
    gap: 8px !important;
    align-items: start !important;
  }
  .armor-filter-panel.weapon-filter-panel,
  #armorFilterPanel .weapon-filter-panel {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-dim) !important;
    border-radius: 12px !important;
    margin-bottom: 10px !important;
    overflow: hidden !important;
  }
  #armorFilterPanel .weapon-filter-grid {
    padding: 10px 10px 12px !important;
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: calc((100% - 32px) / 5) !important;
    grid-template-columns: none !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-color: var(--border-bright) var(--bg-secondary) !important;
  }
  #armorFilterPanel .weapon-filter-group {
    min-width: 0 !important;
    width: 100% !important;
    background: var(--bg-perk) !important;
    border: 1px solid var(--border-dim) !important;
    border-radius: 8px !important;
    padding: 8px !important;
  }
  /* Match the weapon filter boxes to the (darker) armor filter box background.
     Background only — the weapon panel keeps its own grid sizing/border/radius. */
  #weaponFilterPanel .weapon-filter-group {
    background: var(--bg-perk) !important;
  }
  #armorFilterPanel .weapon-filter-group.has-active-filter {
    border-color: rgba(var(--accent-rgb),0.95) !important;
    box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb),0.23), 0 0 12px rgba(var(--accent-rgb),0.10) !important;
    background: rgba(var(--accent-rgb),0.035) !important;
  }
  .armor-card .armor-perk-preview { display: none !important; }
  .armor-detail-header-row { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
  .armor-detail-clear { flex-shrink:0; }
  .armor-detail-empty-perk { margin-top:12px; min-height:74px; border:1px dashed var(--border-dim); border-radius:8px; background:var(--bg-perk); color:var(--text-dim); display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; }

  .armor-card { transition: border-color .2s, box-shadow .2s !important; }
  .armor-card .armor-card-perks-expanded {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
    border-top: 0 solid transparent;
  }
  .armor-card.expanded {
    border-color: var(--border-bright) !important;
    box-shadow: 0 6px 24px rgba(0,0,0,.3) !important;
  }
  .armor-card.expanded .armor-card-perks-expanded {
    max-height: 600px;
    border-top: 1px solid var(--border-dim);
  }
  .armor-card-perks-inner {
    padding: 9px 12px 12px;
    display: grid;
    gap: 6px;
  }
  .armor-card-perk-row {
    display: grid;
    grid-template-columns: 28px minmax(0,1fr);
    gap: 8px;
    align-items: center;
    padding: 6px 7px;
    border: 1px solid var(--border-dim);
    border-radius: 7px;
    background: var(--bg-perk);
  }
  .armor-card-perk-row:hover {
    border-color: var(--tier-exotic);
    background: rgba(206,174,51,.08);
  }
  .armor-card-perk-icon {
    width: 28px; height: 28px; border-radius: 50%;
    border: 1px solid var(--border-dim); background: var(--bg-secondary);
    overflow: hidden; display: flex; align-items: center; justify-content: center;
    color: var(--text-dim); flex-shrink: 0;
  }
  .armor-card-perk-icon img { width: 100%; height: 100%; object-fit: cover; }
  .armor-card-perk-name { font-size: 12px; font-weight: 900; color: var(--text-primary); line-height: 1.15; }
  .armor-card-perk-desc { margin-top: 2px; font-size: 11px; color: var(--text-dim); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .armor-expand-arrow {
    margin-left: auto; color: var(--text-dim); transition: transform .3s; flex-shrink: 0;
  }
  .armor-card.expanded .armor-expand-arrow { transform: rotate(180deg); }
  .armor-card .armor-perk-preview { display: flex !important; }
  .armor-card.expanded .armor-perk-preview { display: none !important; }

  .armor-window-actions {
    display: flex; gap: 7px; padding: 10px;
    border-bottom: 1px solid var(--border-dim);
    background: var(--bg-secondary);
  }
  .armor-window-btn {
    padding: 7px 12px; border-radius: 7px;
    border: 1px solid var(--border-dim); background: var(--bg-perk);
    color: var(--text-secondary); font-family: 'Rajdhani', sans-serif;
    font-size: 12px; font-weight: 700; letter-spacing: .8px;
    text-transform: uppercase; cursor: pointer; transition: all .2s;
  }
  .armor-window-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-bright);
    background: var(--bg-card-hover);
  }
  .armor-window-btn.active {
    color: #fff;
    border-color: rgba(var(--accent-rgb),.72);
    background: var(--accent-fill-grad);
    box-shadow: inset 0 -2px 0 rgba(var(--accent-rgb),.75);
  }

  .armor-stats-panel { display: grid; gap: 12px; }
  .armor-stats-hero {
    position: relative; min-height: 90px; overflow: hidden;
    border: 1px solid var(--border-dim); border-radius: 10px;
    background: linear-gradient(90deg, rgba(15,18,26,0.96), rgba(15,18,26,0.72)), var(--bg-perk);
    padding: 12px;
  }
  .armor-stats-hero-left { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; }
  .armor-stats-hero-icon { width: 52px; height: 52px; border: 1px solid var(--border-bright); background: var(--bg-secondary); overflow: hidden; flex-shrink: 0; }
  .armor-stats-hero-icon img { width:100%; height:100%; object-fit:cover; }
  .armor-stats-hero-name { font-size: 18px; font-weight: 900; line-height: 1; text-transform: uppercase; color: var(--text-primary); }
  .armor-stats-hero-meta { margin-top: 4px; color: var(--text-secondary); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; }
  .armor-stats-hero-art { position: absolute; right: -10px; top: 6px; width: 40%; max-height: 100px; object-fit: contain; opacity: .45; filter: drop-shadow(0 8px 20px rgba(0,0,0,.45)); pointer-events: none; }
  .armor-stats-card { border: 1px solid var(--border-dim); border-radius: 10px; background: var(--bg-perk); padding: 11px; min-width: 0; }
  .armor-stats-card-title { margin-bottom: 9px; color: var(--text-dim); font-size: 10px; font-weight: 900; letter-spacing: 1.4px; text-transform: uppercase; }
  .armor-stats-bars { display: grid; gap: 6px; }
  .armor-stats-row { display: grid; grid-template-columns: 112px minmax(0,1fr) 76px; gap: 8px; align-items: center; }
  .armor-stats-row-score { display:block; margin-top:1px; color:var(--text-dim); font-size:9px; font-weight:800; letter-spacing:.3px; text-transform:uppercase; }
  .armor-stats-row-name { color: var(--text-secondary); font-size: 11px; font-weight: 800; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .armor-stats-row-bar { height: 10px; background: rgba(255,255,255,.1); position: relative; overflow: hidden; }
  .armor-stats-fill { height: 100%; transition: width .5s ease; }
  .armor-stats-fill.elite { background: #68e394; }
  .armor-stats-fill.strong { background: rgba(104,227,148,.85); }
  .armor-stats-fill.good { background: rgba(255,255,255,.82); }
  .armor-stats-fill.low { background: rgba(255,214,122,.85); }
  .armor-stats-fill.very-low { background: rgba(255,118,118,.8); }
  .armor-stats-row-value { color: var(--text-primary); font-size: 12px; font-weight: 900; text-align: right; font-variant-numeric: tabular-nums; }
  .armor-stats-row-scale { display:flex; justify-content:space-between; color:var(--text-dim); font-size:9px; font-weight:900; margin-top:3px; letter-spacing:.4px; }
  .armor-stats-row-note { margin-top:2px; color:var(--text-dim); font-size:10px; font-weight:700; line-height:1.15; }
  .armor-stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .armor-stats-number-card { background: var(--bg-secondary); border: 1px solid var(--border-dim); border-radius: 8px; padding: 9px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
  .armor-stats-number-label { color: var(--text-secondary); font-size: 11px; font-weight: 800; }
  .armor-stats-number-value { color: var(--text-primary); font-size: 14px; font-weight: 900; font-variant-numeric: tabular-nums; }
  .armor-stats-perk-detail { border: 1px solid var(--border-dim); border-radius: 10px; background: var(--bg-perk); padding: 11px; display: grid; gap: 10px; }
  .armor-stats-perk-header { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; }
  .armor-stats-perk-header-icon { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-dim); background: var(--bg-secondary); overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--text-dim); }
  .armor-stats-perk-header-icon img { width:100%; height:100%; object-fit:cover; }
  .armor-stats-perk-header-name { font-size: 14px; font-weight: 900; color: var(--text-primary); }
  .armor-stats-perk-header-type { font-size: 10px; font-weight: 800; color: var(--text-dim); text-transform: uppercase; letter-spacing: .8px; margin-top: 2px; }
  .armor-stats-perk-desc-full { color: var(--text-secondary); font-size: 13px; line-height: 1.5; padding: 0 2px; }
  .armor-stats-effect-row { display: grid; grid-template-columns: minmax(80px, auto) 1fr; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.035); }
  .armor-stats-effect-row:last-child { border-bottom: 0; }
  .armor-stats-effect-label { color: var(--text-dim); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
  .armor-stats-effect-value { color: var(--text-primary); font-size: 13px; font-weight: 700; }
  .armor-stats-note { color: var(--text-dim); font-size: 11px; line-height: 1.4; font-style: italic; padding: 8px; background: rgba(255,255,255,.02); border-radius: 7px; border: 1px solid var(--border-dim); }
  .armor-stats-empty { color: var(--text-dim); font-size: 13px; line-height: 1.5; padding: 20px 16px; text-align: center; }
  .armor-stats-effect-tag { display:inline-block; padding:4px 9px; border-radius:6px; font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.5px; }

  .bc-classitem-perk-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:0 6px 8px 44px;}
  .bc-classitem-perk-col{border:1px solid var(--border-dim);background:rgba(0,0,0,.16);border-radius:7px;overflow:hidden;min-width:0;}
  .bc-classitem-perk-col-title{padding:5px 7px;border-bottom:1px solid var(--border-dim);font-size:9px;font-weight:900;letter-spacing:1px;text-transform:uppercase;color:var(--text-dim);}
  .bc-classitem-perk-pick{width:100%;display:grid;grid-template-columns:20px minmax(0,1fr);gap:5px;align-items:center;padding:5px 6px;border:0;border-bottom:1px solid rgba(255,255,255,.035);background:transparent;color:var(--text-secondary);font-family:'Rajdhani',sans-serif;text-align:left;cursor:pointer;}
  .bc-classitem-perk-pick:last-child{border-bottom:0;}
  .bc-classitem-perk-pick:hover,.bc-classitem-perk-pick.selected{background:rgba(206,174,51,.11);color:var(--text-primary);}
  .bc-classitem-perk-pick.selected{box-shadow:inset 2px 0 0 rgba(206,174,51,.9);}
  .bc-classitem-perk-pick-icon{width:20px;height:20px;border-radius:50%;border:1px solid var(--border-dim);background:var(--bg-secondary);display:flex;align-items:center;justify-content:center;overflow:hidden;color:var(--text-dim);font-size:10px;}
  .bc-classitem-perk-pick-icon img{width:100%;height:100%;object-fit:cover;}
  .bc-classitem-perk-pick-name{font-size:10px;font-weight:800;line-height:1.05;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .bc-classitem-selected-panel{border:1px solid var(--border-dim);background:var(--bg-perk);border-radius:10px;padding:10px;display:grid;gap:8px;}
  .bc-classitem-selected-title{font-size:10px;font-weight:900;letter-spacing:1.3px;text-transform:uppercase;color:var(--text-dim);}
  .bc-classitem-selected-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
  .bc-classitem-selected-card{border:1px solid var(--border-dim);background:var(--bg-secondary);border-radius:8px;padding:8px;min-width:0;}
  .bc-classitem-selected-head{display:grid;grid-template-columns:26px minmax(0,1fr);gap:7px;align-items:center;}
  .bc-classitem-selected-icon{width:26px;height:26px;border-radius:50%;border:1px solid var(--border-dim);background:var(--bg-perk);overflow:hidden;display:flex;align-items:center;justify-content:center;color:var(--text-dim);}
  .bc-classitem-selected-icon img{width:100%;height:100%;object-fit:cover;}
  .bc-classitem-selected-name{font-size:12px;font-weight:900;color:var(--tier-exotic);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .bc-classitem-selected-desc{margin-top:6px;color:var(--text-secondary);font-size:11px;line-height:1.35;}
  .bc-classitem-selected-effects{margin-top:6px;display:flex;flex-wrap:wrap;gap:4px;}
  .bc-classitem-effect-pill{border:1px solid rgba(206,174,51,.24);background:rgba(206,174,51,.08);color:var(--accent);border-radius:999px;padding:2px 6px;font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.4px;}
  .armor-classitem-two-cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;}
  .armor-classitem-col{border:1px solid var(--border-dim);border-radius:8px;background:rgba(0,0,0,.14);overflow:hidden;min-width:0;}
  .armor-classitem-col-title{padding:6px 8px;border-bottom:1px solid var(--border-dim);font-size:10px;font-weight:900;letter-spacing:1.1px;text-transform:uppercase;color:var(--tier-exotic);}
  .armor-classitem-perk-row{display:grid;grid-template-columns:26px minmax(0,1fr);gap:7px;padding:7px 8px;border-bottom:1px solid rgba(255,255,255,.035);align-items:start;}
  .armor-classitem-perk-row:last-child{border-bottom:0;}
  .armor-classitem-perk-icon{width:26px;height:26px;border-radius:50%;background:var(--bg-secondary);border:1px solid var(--border-dim);overflow:hidden;display:flex;align-items:center;justify-content:center;color:var(--text-dim);}
  .armor-classitem-perk-icon img{width:100%;height:100%;object-fit:cover;}
  .armor-classitem-perk-name{font-size:12px;font-weight:900;color:var(--text-primary);line-height:1.1;}
  .armor-classitem-perk-desc{margin-top:3px;font-size:11px;line-height:1.3;color:var(--text-secondary);}

  .armor-card.expanded .armor-classitem-two-cols{
    max-height: 315px !important;
    overflow-y: auto !important;
    padding-right: 4px !important;
    align-items: start !important;
  }
  .armor-card.expanded .armor-classitem-two-cols::-webkit-scrollbar{width:7px;}
  .armor-card.expanded .armor-classitem-two-cols::-webkit-scrollbar-track{background:var(--bg-secondary);border-radius:6px;}
  .armor-card.expanded .armor-classitem-two-cols::-webkit-scrollbar-thumb{background:var(--border-bright);border-radius:6px;border:1px solid var(--bg-secondary);}
  .armor-card.expanded .armor-classitem-col{min-height:0 !important;}
  .armor-card.expanded .armor-classitem-perk-row{padding:6px 7px !important;}
  .armor-card.expanded .armor-classitem-perk-icon{width:23px !important;height:23px !important;}
  .armor-card.expanded .armor-classitem-perk-name{font-size:11px !important;}
  .armor-card.expanded .armor-classitem-perk-desc{font-size:10px !important;line-height:1.22 !important;}
  .bc-classitem-perk-col-title::after,
  .armor-classitem-col-title::after{content:'';}
  .bc-classitem-perk-col:first-child .bc-classitem-perk-col-title::after,
  .armor-classitem-col:first-child .armor-classitem-col-title::after{content:'  • STAT GROUP'; color:rgba(255,255,255,.35);}
  .bc-classitem-perk-col:nth-child(2) .bc-classitem-perk-col-title::after,
  .armor-classitem-col:nth-child(2) .armor-classitem-col-title::after{content:'  • TERTIARY'; color:rgba(255,255,255,.35);}

  body[data-current-page="build-crafter"] .bc-shell{
    align-items:start !important;
  }

  body[data-current-page="build-crafter"] .bc-left-panel{
    position:relative !important;
    overflow:visible !important;
    align-self:start !important;
    z-index:20 !important;
  }

  body[data-current-page="build-crafter"] .bc-right-panel{
    align-self:start !important;
    position:relative !important;
    z-index:5 !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-row{
    position:relative !important;
    z-index:80 !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-list{
    position:absolute !important;
    left:12px !important;
    right:12px !important;
    top:calc(100% - 4px) !important;
    margin-top:0 !important;
    z-index:9999 !important;
    max-height:min(430px, calc(100vh - 230px)) !important;
    overflow:auto !important;
    box-shadow:0 18px 44px rgba(0,0,0,.72) !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-grid{
    grid-template-columns:repeat(5, minmax(0, 1fr)) !important;
  }

  body[data-current-page="build-crafter"] .bc-classitem-perk-columns{
    max-height:260px !important;
    overflow:auto !important;
    padding:0 5px 7px 38px !important;
  }

  body[data-current-page="build-crafter"] .bc-classitem-perk-columns::-webkit-scrollbar{width:7px;}
  body[data-current-page="build-crafter"] .bc-classitem-perk-columns::-webkit-scrollbar-track{background:var(--bg-secondary);border-radius:6px;}
  body[data-current-page="build-crafter"] .bc-classitem-perk-columns::-webkit-scrollbar-thumb{background:var(--border-bright);border-radius:6px;border:1px solid var(--bg-secondary);}

  body[data-current-page="build-crafter"] .bc-exotic-item.expanded{
    max-height:none !important;
  }

  body[data-current-page="build-crafter"] .bc-armor-row{
    align-items:center !important;
    min-height:82px !important;
    max-height:82px !important;
    overflow:visible !important;
  }

  body[data-current-page="build-crafter"] .bc-mod-box{
    height:58px !important;
    min-height:58px !important;
    max-height:58px !important;
    width:100% !important;
    max-width:100% !important;
    overflow:hidden !important;
    flex:0 0 auto !important;
    align-self:center !important;
    padding:5px !important;
  }

  body[data-current-page="build-crafter"] .bc-mod-kicker{
    font-size:8px !important;
    line-height:1 !important;
    flex:0 0 auto !important;
  }

  body[data-current-page="build-crafter"] .bc-mod-name{
    font-size:10px !important;
    line-height:1.05 !important;
    max-height:22px !important;
    overflow:hidden !important;
    display:-webkit-box !important;
    -webkit-line-clamp:2 !important;
    -webkit-box-orient:vertical !important;
  }

  body[data-current-page="build-crafter"] .bc-mod-cost{
    font-size:8px !important;
    line-height:1 !important;
    flex:0 0 auto !important;
  }

  body[data-current-page="build-crafter"] .bc-stat-package{
    min-height:58px !important;
    height:58px !important;
    max-height:58px !important;
    align-self:center !important;
  }

  body[data-current-page="build-crafter"] .bc-package-box,
  body[data-current-page="build-crafter"] .bc-tier-box,
  body[data-current-page="build-crafter"] .bc-tertiary-box,
  body[data-current-page="build-crafter"] .bc-focus-box,
  body[data-current-page="build-crafter"] .bc-bonus-box,
  body[data-current-page="build-crafter"] .bc-masterwork-box{
    min-height:0 !important;
    max-height:100% !important;
    overflow:hidden !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-row{
    position:relative !important;
    z-index:10000 !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-list{
    position:fixed !important;
    left:var(--bc-exotic-left, 24px) !important;
    top:var(--bc-exotic-top, 190px) !important;
    right:auto !important;
    width:var(--bc-exotic-width, 760px) !important;
    max-width:calc(100vw - 32px) !important;
    margin:0 !important;
    z-index:2147483000 !important;
    max-height:min(430px, calc(100vh - var(--bc-exotic-top, 190px) - 18px)) !important;
    overflow:auto !important;
    contain:paint !important;
    box-shadow:0 22px 58px rgba(0,0,0,.82) !important;
  }

  body[data-current-page="build-crafter"] .bc-classitem-perk-columns{
    max-height:230px !important;
    overflow:auto !important;
    overscroll-behavior:contain !important;
  }

  body[data-current-page="build-crafter"] .bc-slot-stack{
    gap:10px !important;
  }

  body[data-current-page="build-crafter"] .bc-armor-row{

    min-height:114px !important;
    height:auto !important;
    max-height:none !important;
    align-items:center !important;
    overflow:visible !important;
    grid-auto-rows:auto !important;
  }

  body[data-current-page="build-crafter"] .bc-stat-package{
    height:92px !important;
    min-height:92px !important;
    max-height:92px !important;
    align-self:center !important;
    overflow:visible !important;
  }

  body[data-current-page="build-crafter"] .bc-package-box,
  body[data-current-page="build-crafter"] .bc-tier-box,
  body[data-current-page="build-crafter"] .bc-tertiary-box,
  body[data-current-page="build-crafter"] .bc-focus-box,
  body[data-current-page="build-crafter"] .bc-bonus-box,
  body[data-current-page="build-crafter"] .bc-masterwork-box{
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    box-sizing:border-box !important;
  }

  body[data-current-page="build-crafter"] .bc-mod-box{
    height:62px !important;
    min-height:62px !important;
    max-height:62px !important;
    align-self:center !important;
    box-sizing:border-box !important;
  }

  body[data-current-page="build-crafter"] .bc-row-clear-btn{
    align-self:center !important;
  }

  body[data-current-page="build-crafter"] .bc-mod-box{
    padding:6px !important;
    gap:4px !important;
    height:62px !important;
    min-height:62px !important;
    max-height:62px !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
  }

  body[data-current-page="build-crafter"] .bc-mod-kicker{
    font-size:8px !important;
    line-height:normal !important;
    font-weight:900 !important;
    letter-spacing:.8px !important;
    flex:0 0 auto !important;
  }

  body[data-current-page="build-crafter"] .bc-mod-name{
    font-size:11px !important;
    font-weight:900 !important;
    line-height:1.05 !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    display:block !important;
    max-height:none !important;
    -webkit-line-clamp:unset !important;
    -webkit-box-orient:unset !important;
  }

  body[data-current-page="build-crafter"] .bc-mod-cost{
    margin-top:2px !important;
    font-size:8px !important;
    line-height:normal !important;
    font-weight:900 !important;
    flex:0 0 auto !important;
  }

  body[data-current-page="build-crafter"] .bc-stat-package{
    grid-template-columns:repeat(6, 1fr) !important;
    grid-template-rows:62px 26px !important;
    gap:4px !important;
    width:226px !important;
    height:92px !important;
    min-height:92px !important;
    max-height:92px !important;
    align-items:stretch !important;
  }

  body[data-current-page="build-crafter"] .bc-package-box,
  body[data-current-page="build-crafter"] .bc-tier-box,
  body[data-current-page="build-crafter"] .bc-tertiary-box{
    padding:4px !important;
    align-items:center !important;
    justify-content:center !important;
  }

  body[data-current-page="build-crafter"] .bc-focus-box,
  body[data-current-page="build-crafter"] .bc-bonus-box,
  body[data-current-page="build-crafter"] .bc-masterwork-box{
    padding:2px 3px !important;
    align-items:center !important;
    justify-content:center !important;
  }

  body[data-current-page="build-crafter"] .bc-package-name{
    font-size:10px !important;
    line-height:1.05 !important;
  }

  body[data-current-page="build-crafter"] .bc-tertiary-name{
    font-size:9px !important;
    line-height:1.05 !important;
  }

  body[data-current-page="build-crafter"] .bc-focus-name,
  body[data-current-page="build-crafter"] .bc-bonus-name,
  body[data-current-page="build-crafter"] .bc-masterwork-name{
    font-size:8.5px !important;
    line-height:1.05 !important;
    font-weight:900 !important;
    letter-spacing:.35px !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  body[data-current-page="build-crafter"] .bc-slot-stack{
    gap:10px !important;
  }

  body[data-current-page="build-crafter"] .bc-armor-row{
    gap:9px !important;
    padding:10px !important;
    min-height:114px !important;
    height:auto !important;
    max-height:none !important;
    align-items:center !important;
    overflow:visible !important;
  }

  body[data-current-page="build-crafter"] .bc-left-panel,
  body[data-current-page="build-crafter"] .bc-shell,
  body[data-current-page="build-crafter"] .bc-slot-stack{
    overflow:visible !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-row{
    position:relative !important;
    z-index:500 !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-row:has(.bc-exotic-list){
    z-index:5000 !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-list{
    position:absolute !important;
    left:0 !important;
    right:0 !important;
    top:calc(100% + 6px) !important;
    width:auto !important;
    max-width:100% !important;
    height:auto !important;
    max-height:min(430px, calc(100vh - 310px)) !important;
    overflow:auto !important;
    margin-top:0 !important;
    z-index:99999 !important;
    box-sizing:border-box !important;
    box-shadow:0 18px 42px rgba(0,0,0,.78) !important;
    contain:layout paint !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-grid{
    display:grid !important;
    grid-template-columns:repeat(5, minmax(0, 1fr)) !important;
    gap:5px !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-slot-col{
    min-width:0 !important;
    max-width:100% !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-slot-items{
    max-height:340px !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    padding:4px !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-item-row{
    grid-template-columns:30px minmax(0,1fr) 16px !important;
    min-height:40px !important;
    padding:4px !important;
    gap:4px !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-item-icon{
    width:30px !important;
    height:30px !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-item-name{
    font-size:10px !important;
    line-height:1.05 !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-expand{
    width:16px !important;
    height:20px !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-perks{
    padding:0 5px 7px 38px !important;
    max-height:150px !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-list .bc-exotic-clear{
    margin-bottom:6px !important;
  }

  body[data-current-page="build-crafter"] .bc-left-panel,
  body[data-current-page="build-crafter"] .bc-shell,
  body[data-current-page="build-crafter"] .bc-slot-stack { overflow: visible !important; }

  body[data-current-page="build-crafter"] .bc-exotic-row { position: relative !important; z-index: 600 !important; }
  body[data-current-page="build-crafter"] .bc-exotic-row:has(.bc-exotic-list) { z-index: 6000 !important; }

  body[data-current-page="build-crafter"] .bc-exotic-list {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important;
    right: auto !important;
    width: min(860px, calc(100vw - 48px)) !important;
    max-width: calc(100vw - 32px) !important;
    margin: 0 !important;
    z-index: 100000 !important;
    max-height: min(74vh, calc(100vh - 210px)) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain !important;
    contain: layout paint !important;
    box-sizing: border-box !important;
    box-shadow: 0 22px 56px rgba(0,0,0,.82) !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)) !important;
    gap: 6px !important;
    align-items: start !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  body[data-current-page="build-crafter"] .bc-exotic-slot-col { min-width: 0 !important; align-self: start !important; }
  body[data-current-page="build-crafter"] .bc-exotic-slot-items {
    max-height: none !important;
    overflow: visible !important;
    padding: 5px !important;
    gap: 4px !important;
  }
  body[data-current-page="build-crafter"] .bc-exotic-item-row {
    grid-template-columns: 32px minmax(0,1fr) 18px !important;
    min-height: 44px !important;
    padding: 6px 5px !important;
    gap: 6px !important;
  }
  body[data-current-page="build-crafter"] .bc-exotic-clear .bc-exotic-item-row { grid-template-columns: 32px minmax(0,1fr) !important; }
  body[data-current-page="build-crafter"] .bc-exotic-item-icon { width: 32px !important; height: 32px !important; }
  body[data-current-page="build-crafter"] .bc-exotic-item-name { font-size: 11px !important; line-height: 1.18 !important; -webkit-line-clamp: 2 !important; }

  .bc-classitem-picker-panel { margin-top:8px; border:1px solid var(--border-bright); border-radius:10px; background:rgba(0,0,0,.24); overflow:hidden; }
  .bc-classitem-picker-head { padding:8px 10px; border-bottom:1px solid var(--border-dim); font-size:11px; font-weight:900; letter-spacing:.6px; text-transform:uppercase; color:var(--tier-exotic); background:linear-gradient(180deg, rgba(206,174,51,.10), rgba(206,174,51,.03)); }

  body[data-current-page="build-crafter"] .bc-classitem-perk-columns {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 4px 8px 8px 8px !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .bc-classitem-perk-col { border:1px solid var(--border-dim); background:rgba(0,0,0,.16); border-radius:8px; overflow:hidden; min-width:0; }
  .bc-classitem-perk-col-title { padding:6px 8px; border-bottom:1px solid var(--border-dim); font-size:10px; font-weight:900; letter-spacing:1px; text-transform:uppercase; color:var(--tier-exotic); }
  .bc-classitem-perk-list { display:flex; flex-direction:column; max-height:220px; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; }
  .bc-classitem-perk-list::-webkit-scrollbar { width:7px; }
  .bc-classitem-perk-list::-webkit-scrollbar-track { background:var(--bg-secondary); border-radius:6px; }
  .bc-classitem-perk-list::-webkit-scrollbar-thumb { background:var(--border-bright); border-radius:6px; border:1px solid var(--bg-secondary); }
  .bc-classitem-perk-pick { width:100%; display:grid; grid-template-columns:22px minmax(0,1fr); gap:7px; align-items:center; padding:7px 8px; border:0; border-bottom:1px solid rgba(255,255,255,.04); background:transparent; color:var(--text-secondary); font-family:'Rajdhani',sans-serif; text-align:left; cursor:pointer; }
  .bc-classitem-perk-pick:last-child { border-bottom:0; }
  .bc-classitem-perk-pick:hover { background:rgba(206,174,51,.08); color:var(--text-primary); }
  .bc-classitem-perk-pick.selected { background:rgba(206,174,51,.14); color:var(--text-primary); box-shadow:inset 2px 0 0 rgba(206,174,51,.95); }
  .bc-classitem-perk-pick-icon { width:22px; height:22px; border-radius:50%; border:1px solid var(--border-dim); background:var(--bg-secondary); display:flex; align-items:center; justify-content:center; overflow:hidden; color:var(--text-dim); font-size:11px; }
  .bc-classitem-perk-pick-icon img { width:100%; height:100%; object-fit:cover; }
  .bc-classitem-perk-pick-name { font-size:11px; font-weight:800; line-height:1.1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

  .bc-classitem-perk-desc-row { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:8px; padding:0 8px 10px 8px; }
  .bc-classitem-perk-desc-card { border:1px solid var(--border-dim); background:var(--bg-perk); border-radius:8px; padding:8px 9px; min-width:0; }
  .bc-classitem-perk-desc-label { font-size:9px; font-weight:900; letter-spacing:1px; text-transform:uppercase; color:var(--text-dim); }
  .bc-classitem-perk-desc-name { margin-top:3px; font-size:12px; font-weight:900; color:var(--tier-exotic); line-height:1.15; }
  .bc-classitem-perk-desc-name.empty { color:var(--text-dim); }
  .bc-classitem-perk-desc-text { margin-top:5px; font-size:11px; line-height:1.38; color:var(--text-secondary); }

  .bc-classitem-perk-col-title::after,
  .armor-classitem-col-title::after,
  .bc-classitem-perk-col:first-child .bc-classitem-perk-col-title::after,
  .bc-classitem-perk-col:nth-child(2) .bc-classitem-perk-col-title::after,
  .armor-classitem-col:first-child .armor-classitem-col-title::after,
  .armor-classitem-col:nth-child(2) .armor-classitem-col-title::after { content: '' !important; }

  body[data-current-page="build-crafter"] .bc-shell > .layout-resizer { align-self: stretch; }

  body[data-current-page="build-crafter"] .bc-shell.bc-compact-1 .bc-armor-row {
    grid-template-columns: 42px minmax(150px, 1.3fr) 52px repeat(3, minmax(48px, 1fr)) 32px !important;
    gap: 6px !important;
    padding: 8px !important;
  }
  body[data-current-page="build-crafter"] .bc-shell.bc-compact-1 .bc-stat-package {
    width: 100% !important;
    grid-template-columns: repeat(6, 1fr) !important;
    grid-template-rows: 52px 22px !important;
    height: 78px !important; min-height: 78px !important; max-height: 78px !important;
    gap: 3px !important;
  }
  body[data-current-page="build-crafter"] .bc-shell.bc-compact-1 .bc-mod-box {
    height: 52px !important; min-height: 52px !important; max-height: 52px !important; padding: 3px !important; gap: 2px !important;
  }
  body[data-current-page="build-crafter"] .bc-shell.bc-compact-1 .bc-mod-cost { display: none !important; }
  body[data-current-page="build-crafter"] .bc-shell.bc-compact-1 .bc-mod-box:not(.filled) .bc-mod-name { display: none !important; }
  body[data-current-page="build-crafter"] .bc-shell.bc-compact-1 .bc-mod-kicker { font-size: 10px !important; }
  body[data-current-page="build-crafter"] .bc-shell.bc-compact-1 .bc-mod-name { font-size: 9.5px !important; }
  body[data-current-page="build-crafter"] .bc-shell.bc-compact-1 .bc-tier-box { font-size: 11px !important; }
  body[data-current-page="build-crafter"] .bc-shell.bc-compact-1 .bc-tertiary-name,
  body[data-current-page="build-crafter"] .bc-shell.bc-compact-1 .bc-masterwork-name,
  body[data-current-page="build-crafter"] .bc-shell.bc-compact-1 .bc-focus-name,
  body[data-current-page="build-crafter"] .bc-shell.bc-compact-1 .bc-bonus-name { font-size: 11px !important; }
  body[data-current-page="build-crafter"] .bc-shell.bc-compact-1 .bc-package-symbol img,
  body[data-current-page="build-crafter"] .bc-shell.bc-compact-1 .bc-package-symbol svg,
  body[data-current-page="build-crafter"] .bc-shell.bc-compact-1 .bc-tertiary-icon img,
  body[data-current-page="build-crafter"] .bc-shell.bc-compact-1 .bc-tertiary-icon svg { width: 22px !important; height: 22px !important; }

  body[data-current-page="build-crafter"] .bc-shell.bc-compact-2 .bc-armor-row {
    grid-template-columns: 34px minmax(118px, 1.1fr) 44px repeat(3, minmax(40px, 1fr)) 26px !important;
    gap: 4px !important; padding: 6px !important;
  }
  body[data-current-page="build-crafter"] .bc-shell.bc-compact-2 .bc-stat-package {
    grid-template-rows: 44px 20px !important; height: 68px !important; min-height: 68px !important; max-height: 68px !important; gap: 2px !important;
  }
  body[data-current-page="build-crafter"] .bc-shell.bc-compact-2 .bc-mod-box { height: 46px !important; min-height: 46px !important; max-height: 46px !important; }
  body[data-current-page="build-crafter"] .bc-shell.bc-compact-2 .bc-slot-icon { width: 28px !important; height: 28px !important; }

  body[data-current-page="build-crafter"] .bc-shell {
    min-width: 0 !important;
    width: 100% !important;
    overflow: visible !important;
  }

  body[data-current-page="build-crafter"] .bc-shell > .bc-left-panel,
  body[data-current-page="build-crafter"] .bc-shell > .bc-right-panel {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body[data-current-page="build-crafter"] #bcClassItemSelectedPanel {
    display: none !important;
  }

  body[data-current-page="build-crafter"] .bc-left-panel {
    --bc-left-scale: 1;
    --bc-row-pad: calc(10px * var(--bc-left-scale));
    --bc-row-gap: calc(9px * var(--bc-left-scale));
    --bc-box-h: calc(58px * var(--bc-left-scale));
    --bc-icon: calc(34px * var(--bc-left-scale));
    --bc-font-main: calc(12px * var(--bc-left-scale));
    --bc-font-small: calc(10px * var(--bc-left-scale));
    --bc-font-tiny: calc(8px * var(--bc-left-scale));
  }

  body[data-current-page="build-crafter"] .bc-left-panel .bc-character-strip,
  body[data-current-page="build-crafter"] .bc-left-panel .bc-slot-stack {
    gap: calc(10px * var(--bc-left-scale)) !important;
  }

  body[data-current-page="build-crafter"] .bc-left-panel .bc-armor-row {
    grid-template-columns:
      calc(52px * var(--bc-left-scale))
      minmax(calc(130px * var(--bc-left-scale)), 1.55fr)
      calc(82px * var(--bc-left-scale))
      repeat(3, minmax(calc(56px * var(--bc-left-scale)), 1fr))
      calc(42px * var(--bc-left-scale)) !important;
    gap: var(--bc-row-gap) !important;
    padding: var(--bc-row-pad) !important;
    min-height: calc(82px * var(--bc-left-scale)) !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body[data-current-page="build-crafter"] .bc-left-panel .bc-slot-icon {
    width: var(--bc-icon) !important;
    height: var(--bc-icon) !important;
  }

  body[data-current-page="build-crafter"] .bc-left-panel .bc-slot-icon svg,
  body[data-current-page="build-crafter"] .bc-left-panel .bc-slot-icon img {
    width: calc(28px * var(--bc-left-scale)) !important;
    height: calc(28px * var(--bc-left-scale)) !important;
  }

  body[data-current-page="build-crafter"] .bc-left-panel .bc-mod-box {
    height: var(--bc-box-h) !important;
    min-height: var(--bc-box-h) !important;
    max-height: var(--bc-box-h) !important;
    padding: calc(6px * var(--bc-left-scale)) !important;
    gap: calc(4px * var(--bc-left-scale)) !important;
    font-size: var(--bc-font-main) !important;
  }

  body[data-current-page="build-crafter"] .bc-left-panel .bc-mod-kicker,
  body[data-current-page="build-crafter"] .bc-left-panel .bc-tier-box,
  body[data-current-page="build-crafter"] .bc-left-panel .bc-tertiary-name,
  body[data-current-page="build-crafter"] .bc-left-panel .bc-masterwork-name,
  body[data-current-page="build-crafter"] .bc-left-panel .bc-focus-name,
  body[data-current-page="build-crafter"] .bc-left-panel .bc-bonus-name {
    font-size: max(8px, var(--bc-font-small)) !important;
    line-height: 1.08 !important;
  }

  body[data-current-page="build-crafter"] .bc-left-panel .bc-mod-name,
  body[data-current-page="build-crafter"] .bc-left-panel .bc-mod-cost {
    font-size: max(7px, var(--bc-font-tiny)) !important;
    line-height: 1.05 !important;
  }

  body[data-current-page="build-crafter"] .bc-left-panel .bc-stat-package {
    height: calc(86px * var(--bc-left-scale)) !important;
    min-height: calc(86px * var(--bc-left-scale)) !important;
    max-height: calc(86px * var(--bc-left-scale)) !important;
    grid-template-rows: calc(58px * var(--bc-left-scale)) calc(22px * var(--bc-left-scale)) !important;
    gap: calc(4px * var(--bc-left-scale)) !important;
  }

  body[data-current-page="build-crafter"] .bc-left-panel .bc-package-symbol img,
  body[data-current-page="build-crafter"] .bc-left-panel .bc-package-symbol svg,
  body[data-current-page="build-crafter"] .bc-left-panel .bc-tertiary-icon img,
  body[data-current-page="build-crafter"] .bc-left-panel .bc-tertiary-icon svg {
    width: calc(24px * var(--bc-left-scale)) !important;
    height: calc(24px * var(--bc-left-scale)) !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-list,
  body[data-current-page="build-crafter"] .bc-dropdown-menu {
    max-width: min(760px, calc(100vw - 48px)) !important;
    overflow-x: hidden !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-item .bc-classitem-picker-panel {
    margin: 6px 6px 8px 44px !important;
    width: auto !important;
    max-width: none !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-item .bc-classitem-perk-columns {
    padding: 8px !important;
  }

  body[data-current-page="build-crafter"] .bc-shell {
    grid-template-columns: minmax(0, var(--bc-left-track, 54%)) 9px minmax(0, 1fr) !important;
    gap: 8px !important;
    align-items: start !important;
    overflow: visible !important;
  }

  body[data-current-page="build-crafter"] .bc-left-panel,
  body[data-current-page="build-crafter"] .bc-right-panel {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body[data-current-page="build-crafter"] .bc-left-panel {
    --bc-ui-scale: var(--bc-left-scale, 1);
    padding: calc(14px * var(--bc-ui-scale)) !important;
    gap: calc(12px * var(--bc-ui-scale)) !important;
    overflow: visible !important;
  }

  body[data-current-page="build-crafter"] .bc-character-strip,
  body[data-current-page="build-crafter"] .bc-exotic-row,
  body[data-current-page="build-crafter"] .bc-armor-row,
  body[data-current-page="build-crafter"] .bc-stat-package,
  body[data-current-page="build-crafter"] .bc-mod-box,
  body[data-current-page="build-crafter"] .bc-row-clear-btn,
  body[data-current-page="build-crafter"] .bc-class-pick,
  body[data-current-page="build-crafter"] .bc-exotic-box {
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  body[data-current-page="build-crafter"] .bc-character-strip {
    gap: calc(10px * var(--bc-ui-scale)) !important;
    padding: calc(11px * var(--bc-ui-scale)) !important;
  }

  body[data-current-page="build-crafter"] .bc-class-pick {
    min-height: calc(58px * var(--bc-ui-scale)) !important;
    padding: calc(6px * var(--bc-ui-scale)) !important;
    gap: calc(5px * var(--bc-ui-scale)) !important;
    font-size: max(7px, calc(12px * var(--bc-ui-scale))) !important;
    line-height: 1.05 !important;
  }

  body[data-current-page="build-crafter"] .bc-class-icon-box {
    width: calc(30px * var(--bc-ui-scale)) !important;
    height: calc(30px * var(--bc-ui-scale)) !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-row {
    padding: calc(10px * var(--bc-ui-scale)) calc(12px * var(--bc-ui-scale)) !important;
    gap: calc(6px * var(--bc-ui-scale)) !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-label {
    font-size: max(7px, calc(10px * var(--bc-ui-scale))) !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-box {
    min-height: calc(46px * var(--bc-ui-scale)) !important;
    padding: calc(8px * var(--bc-ui-scale)) calc(10px * var(--bc-ui-scale)) !important;
    gap: calc(9px * var(--bc-ui-scale)) !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-box-icon {
    width: calc(30px * var(--bc-ui-scale)) !important;
    height: calc(30px * var(--bc-ui-scale)) !important;
  }

  body[data-current-page="build-crafter"] .bc-exotic-box-name {
    font-size: max(8px, calc(14px * var(--bc-ui-scale))) !important;
  }

  body[data-current-page="build-crafter"] .bc-slot-stack {
    gap: calc(9px * var(--bc-ui-scale)) !important;
  }

  body[data-current-page="build-crafter"] .bc-armor-row {
    display: grid !important;
    grid-template-columns:
      minmax(0, calc(48px * var(--bc-ui-scale)))
      minmax(0, 1.25fr)
      minmax(0, 1.55fr)
      repeat(3, minmax(0, .78fr))
      minmax(0, calc(38px * var(--bc-ui-scale))) !important;
    gap: calc(8px * var(--bc-ui-scale)) !important;
    padding: calc(9px * var(--bc-ui-scale)) !important;
    min-height: calc(86px * var(--bc-ui-scale)) !important;
    height: auto !important;
    max-height: none !important;
    align-items: center !important;
    overflow: visible !important;
    width: 100% !important;
  }

  body[data-current-page="build-crafter"] .bc-slot-icon {
    width: calc(34px * var(--bc-ui-scale)) !important;
    height: calc(34px * var(--bc-ui-scale)) !important;
  }

  body[data-current-page="build-crafter"] .bc-slot-icon svg,
  body[data-current-page="build-crafter"] .bc-slot-icon img {
    width: calc(28px * var(--bc-ui-scale)) !important;
    height: calc(28px * var(--bc-ui-scale)) !important;
  }
