/* Seltenheit der Ausrüstung (game/rarity.js, Nutzer 28.10.2026): Selten blau, Episch lila, Legendär goldgelb.
   img.rarN = a rim along the icon's own outline (drop-shadow follows the alpha of the picture, never a box) with a
   glow around it, all kept faint (Nutzer 28.10.2026: the first version was far too strong). The rim stands still: an
   animated drop-shadow is drawn anew by the GPU every frame (03.11.2026, a full guild storage in SD2: 100 rare icons
   cost 10-20 ms of every frame, measured).
   .rar-shine (ui/dom.js rarityIcon) = a light running over the icon, masked by the same picture. It is hidden and only
   runs when the scheduler of ui/dom.js gives it the class sw, for the moment of its sweep. Ticket #133 (14.11.2026): the
   light is a still picture (--strip, drawn once by shineStrip in ui/dom.js: the frames of the band over the icon, already
   masked) that steps through the box by transform - nothing is painted, rastered or masked while it runs. Until then the
   band was a background-position sweep under a mask (painted and rastered anew every frame, so only 4 at once); a band
   moved by transform under a mask cost the compositor a pass per light and frame (tools/dev/uiperf.mjs). Never animate
   the light by background-position, left or under a mask again. Normal pieces stay as they were. */
:root { --rar1: #4fa8ff; --rar2: #c46bff; --rar3: #ffcd4f; --bon: #b0dfb4; /* BONUS_COLOR of game/rarity.js */ }
/* the 6th and 7th bonus of Seon-Hae (game/bonus67.js) in item tooltips: a colour of their own */
.tooltip .tt-b67, .itemtip .tt-b67 { color: #f29b52; }

img.rar1 { filter: drop-shadow(1px 0 0 rgba(79, 168, 255, .28)) drop-shadow(-1px 0 0 rgba(79, 168, 255, .28)) drop-shadow(0 1px 0 rgba(79, 168, 255, .28)) drop-shadow(0 -1px 0 rgba(79, 168, 255, .28)) drop-shadow(0 0 1px rgba(79, 168, 255, .4)); }
img.rar2 { filter: drop-shadow(1px 0 0 rgba(205, 128, 255, .38)) drop-shadow(-1px 0 0 rgba(205, 128, 255, .38)) drop-shadow(0 1px 0 rgba(205, 128, 255, .38)) drop-shadow(0 -1px 0 rgba(205, 128, 255, .38)) drop-shadow(0 0 1.2px rgba(196, 107, 255, .48)); }
img.rar3 { filter: drop-shadow(1px 0 0 rgba(255, 203, 90, .45)) drop-shadow(-1px 0 0 rgba(255, 203, 90, .45)) drop-shadow(0 1px 0 rgba(255, 203, 90, .45)) drop-shadow(0 -1px 0 rgba(255, 203, 90, .45)) drop-shadow(0 0 1.7px rgba(255, 205, 79, .55)); }

/* the light over the icon: a slanted band that crosses it once per sweep (slower for Selten). The strip holds 32 frames
   (STRIP_K) side by side; the box shows one, the strip steps 31 times by one box width - the light moves about one art
   pixel per step. --shine = the colour of the band (read by shineStrip). */
.rar-shine { position: absolute; left: 1px; top: 1px; width: 16px; height: 16px; pointer-events: none; z-index: 1; display: none; overflow: hidden; }
.rar-shine.sw { display: block; }
.rar-shine.sw::before { content: ''; position: absolute; left: 0; top: 0; width: 3200%; height: 100%; will-change: transform;
  background: var(--strip) 0 0 / 100% 100% no-repeat; image-rendering: auto;
  animation: rar-sweep 1.6s steps(32, jump-none) 1 both; }
.rar-shine.rar1 { --shine: rgba(200, 230, 255, .35); }
.rar-shine.rar2 { --shine: rgba(240, 210, 255, .45); }
.rar-shine.rar3 { --shine: rgba(255, 244, 200, .55); }
.rar-shine.rar1.sw::before { animation-duration: 2.05s; }
.rar-shine.rar3.sw::before { animation-duration: 1.14s; }
@keyframes rar-sweep { from { transform: translateX(0); } to { transform: translateX(-96.875%); } }   /* the last of 32 frames: 31 / 32 */
/* the equipment window centres its icons */
.eq-slot .rar-shine { left: 50%; top: 50%; transform: translate(-50%, -50%); }

/* names in the colour of the rarity: tooltip title and rarity line, lists, chat links */
.rar-t1, .ilink.rar-t1, #ui .tooltip .tt-name.rar-t1, .tooltip .tt-name.rar-t1, .itemtip .tt-name.rar-t1 { color: var(--rar1); }
.rar-t2, .ilink.rar-t2, #ui .tooltip .tt-name.rar-t2, .tooltip .tt-name.rar-t2, .itemtip .tt-name.rar-t2 { color: var(--rar2); }
.rar-t3, .ilink.rar-t3, #ui .tooltip .tt-name.rar-t3, .tooltip .tt-name.rar-t3, .itemtip .tt-name.rar-t3 { color: var(--rar3); }
.tt-rar { display: flex; justify-content: space-between; gap: 6px; }
.tt-rar .dim { white-space: nowrap; }

/* a corrupt piece (game/evolve.js corrupted, Nutzer 08.11.2026): its name in red instead of the rarity colour - tooltip
   title, chat links, auction house, Sura window, admin log; the ground tag takes CORRUPT_COLOR of game/rarity.js - and its
   tooltip gets a red frame (the rarity line inside keeps its colour). The frame stands still, never animate it (see above). */
:root { --cor: #ff4b3f; /* CORRUPT_COLOR of game/rarity.js */ }
.cor-t, .ilink.cor-t, .ah-rn.cor-t, #ui .tooltip .tt-name.cor-t, .tooltip .tt-name.cor-t, .itemtip .tt-name.cor-t { color: var(--cor); }
#ui .tooltip:has(> .tt-name.cor-t), .tooltip:has(> .tt-name.cor-t) {
  box-shadow: 0 0 0 1px #080706, inset 0 0 0 1px var(--cor), inset 0 0 0 2px #0c0b09, 0 0 0 2px rgba(255, 75, 63, .85), 0 0 8px rgba(255, 75, 63, .45), 0 3px 9px #0009;
}
/* the tooltips standing inside a window (Verzaubern, wiki) and the admin's item boxes: the frame inside, no glow over the window */
#ui .tooltip.sw-tt:has(> .tt-name.cor-t), #ui .tooltip.wk-tt:has(> .tt-name.cor-t) { box-shadow: inset 0 0 0 1px var(--cor); }
.itemtip:has(> .tt-name.cor-t) { box-shadow: 0 0 0 2px var(--edge), inset 0 0 0 2px var(--cor); }
/* The skull sits below the lock, opposite the count. Each frame occupies one square in the sprite. */
.cor-mark, #ui .cor-mark { position: absolute; left: 0; bottom: 0; width: 8px; height: 8px; z-index: 2; pointer-events: none;
  background: url(../assets/ui/corrupt_outcomes.png) var(--cor-frame) center / 300% 100% no-repeat; image-rendering: auto; }
.cor-bonus { --cor-frame: 0%; }
.cor-same { --cor-frame: 50%; }
.cor-loss { --cor-frame: 100%; }
