/* The item card uses the game's own emphasis tags and a separate strip for each stat group. */
#gear-detail {
  width: min(354px, calc(100vw - 12px));
  padding: 0 6px 5px;
  border: 1px solid #6d8690;
  border-radius: 0;
  border-top-color: #34505b;
  color: #c3ced0;
  background: linear-gradient(100deg, #0b1a21 0%, #10232b 40%, #0f2029 100%);
  box-shadow: inset 2px 0 #243e49, inset -2px 0 #243e49, 0 4px 14px #000a;
  font: 14px/1.23 'Arial Narrow', 'Liberation Sans', sans-serif;
  scrollbar-width: thin;
  scrollbar-color: #54707a #0c1d26;
}
.roll-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 25px;
  font: 600 15px/1.1 var(--display);
}
.roll-context > span {
  padding: 2px 6px;
  border-left: 2px solid var(--rar, #81cde5);
  color: var(--rar, #81cde5);
  background: #101c22;
}
#gear-detail .roll-context .back {float: none; margin: 2px 0; line-height: 1;}
.roll-head {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 2px 6px;
  padding: 7px 8px 6px;
  border-block: 1px solid color-mix(in srgb, var(--rar, #aabbc4) 76%, #19262d);
  background: linear-gradient(115deg, color-mix(in srgb, var(--rar, #8ea7af) 22%, #1d2022), #202a2c);
}
#gear-detail .roll-head h2, .roll-level {
  margin: 0;
  font: 600 19px/1.05 var(--display);
  color: #f0ede4;
}
.roll-head h2 {max-width: 235px; text-wrap: pretty; overflow-wrap: anywhere;}
.roll-type {display: flex; align-items: center; gap: 4px; width: fit-content; color: var(--rar, #bdd2d7); font-size: 14px;}
.roll-type img {width: 29px; height: 9px;}
.roll-head .roll-silhouette {position: absolute; right: 10px; bottom: 11px; z-index: -1; width: 31%; height: 36px; object-fit: contain; filter: grayscale(1) brightness(1.6); opacity: .72;}
.roll-dps {grid-column: 1; width: fit-content; background: #182125c4; color: #b4c0c1; padding: 0 4px; font: 500 15px/1.2 var(--display);}
.roll-dps b {font-size: 20px; color: #f5f0df;}
.roll-stats {
  display: grid;
  grid-template-columns: repeat(var(--columns,5), minmax(0, 1fr));
  gap: 1px;
  margin: 3px 0;
}
.roll-stats > div {min-width: 0; display: grid; align-content: center; justify-items: center; padding: 3px 1px; text-align: center; background: linear-gradient(#14242e,#173544); border-bottom: 1px solid #264253;}
.roll-stats dt {color: #adccd6; font: 12px/1.1 var(--display);}
.roll-stats dd {margin: 0; color: #e1e6e5; font: 600 16px/1.1 var(--display);}
.weapon-stats .roll-icon {height: 23px; width: 26px; object-fit: contain;}
.roll-band {display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 5px; min-height: 25px; margin: 5px 3px; font: 600 16px/1.13 var(--display); background: #14313c;}
.roll-band.element {color: var(--semantic); border-block: 1px solid currentColor; background: color-mix(in srgb, var(--semantic) 17%, #0c1921);}
.roll-band .roll-icon {width: 20px; height: 20px; object-fit: contain;}
.rich-primary {color: #f1a057;}
.rich-secondary {color: #76b9d3;}
.rich-rarity_legendary {color: #f6d35e;}
.rich-rarity_pearl {color: #95edd9;}
.rich-redtext, .rich-flavor {color: #f07884; font-style: italic;}
.rich-fire {--semantic: #ff9561; color: var(--semantic);}
.rich-shock {--semantic: #89aeff; color: var(--semantic);}
.rich-corrosive {--semantic: #8ddd64; color: var(--semantic);}
.rich-cryo {--semantic: #95e2f8; color: var(--semantic);}
.rich-radiation {--semantic: #e3e54b; color: var(--semantic);}
.rich-kinetic {--semantic: #d9e3e8; color: var(--semantic);}
.rich-rd_color {color: #d4addf;}
.roll-effects {margin: 5px 1px 3px;}
.roll-effect {display: grid; grid-template-columns: 31px minmax(0,1fr); gap: 7px; align-items: start; margin: 3px 0; min-height: 30px;}
.roll-effect > span:last-child {align-self: center; overflow-wrap: anywhere;}
.perk-badge {display: grid; place-items: center; width: 31px; height: 31px; color: #b3cad4; background: #14313e;}
.perk-badge .roll-icon {width: 100%; height: 100%; object-fit: contain;}
.roll-effect > span:last-child .roll-icon {width: 15px; height: 16px; vertical-align: text-bottom;}
.maker-symbol {color: #9bb0b6; font-size: .85em;}
.roll-flavor {margin: 7px 2px 0; border-top: 1px solid #355362; padding: 4px 0 2px; text-align: center;}
.roll-market {display: flex; justify-content: space-between; align-items: center; min-height: 24px; margin: 5px 1px 0; background: linear-gradient(90deg,#263b43,#12343f 55%,#13232b); border-block: 1px solid #324952; padding: 0 6px 0 0;}
.roll-market img {display: block; height: 21px; max-width: 112px; object-fit: contain;}
.wordmark {font: 700 italic 17px var(--display); padding-inline: 5px; text-transform: uppercase; letter-spacing: .035em;}
.roll-price {margin-left: auto; border-inline: 2px solid #80cd6a; padding: 0 5px; color: #b5eba9; font: 600 16px var(--display);}
.roll-tools, .roll-hint, #gear-detail .roll-note {padding: 5px 4px 2px;}
.roll-hint {font: 13px/1.3 var(--display); color: #a8ccd5;}
.roll-hint::before {content: '↵'; display: inline-block; color: #94deed; margin-right: 5px;}
#gear-detail:not(:modal) .roll-tools, #gear-detail:modal .roll-hint {display: none;}
.roll-more {margin: 3px 0; font-size: 13px; color: #b6ccd2;}
.roll-more summary {color: #b8d8e1;}
.roll-more p, #gear-detail .roll-note {margin: 4px 0; font-size: 13px;}
.roll-more code {display: block; overflow-wrap: anywhere; margin-block: 7px;}
.roll-tools .equip-btn, .roll-tools .favorite {margin: 2px 4px 5px 0; padding: 5px 9px; width: auto;}
#gear-detail[open]:not(:modal):not(.scrollable-preview) {pointer-events: none;}
#gear-detail .roll-head h2, .roll-level, .roll-dps, .roll-stats dd, .roll-band, .roll-price, .roll-context {
  font-family: 'Ubuntu Sans', 'Liberation Sans Narrow', sans-serif;
  font-stretch: semi-condensed;
}
#gear-detail .roll-head h2, .roll-level {font-size: 16px; font-weight: 600; line-height: 1.12;}
.roll-head h2 {max-width: 216px;}
.roll-dps b {font-size: 17px;}
.roll-stats dd, .roll-band, .roll-context {font-size: 14px;}

#gear-detail::backdrop { background: rgb(0 7 13 / 68%); }
#gear-detail .roll-context .back {
  width: 30px; height: 30px; padding: 0; margin: 2px;
  border: 1px solid #77a1af; border-radius: 50%;
  font: 22px/1 sans-serif; color: #e5f6fa;
}
.roll-destinations { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 2px 0 7px; }
.roll-destinations button { width: 100%; }
.roll-destinations small { display: block; margin-top: 3px; text-align: center; color: #b0c9d2; }

.roll-head .roll-silhouette[data-item-art] { filter: none; opacity: 1; }
