/* Active effects: left rail + center icons */
#hEnchant,#hHeat,#hRelic,#hBuff{display:none!important}
#buffRail,#buffIcons{pointer-events:none;user-select:none}
#buffRail[hidden],#buffIcons[hidden],#buffIcons:empty{display:none!important}
#buffRail{position:absolute;top:0;left:calc(var(--buff-x,0px) + 10px);width:236px;
  max-height:var(--buff-height,calc(100dvh - 140px));overflow:hidden;display:flex;flex-direction:column;gap:6px;z-index:2;text-align:left}
.buff-rail-title{margin:0;font-size:9px;font-weight:800;letter-spacing:.24em;text-transform:uppercase;color:var(--amber);
  text-shadow:1px 1px 0 #0d0a1a;padding-left:2px}
.buff-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;overflow:hidden}
.buff-card{--c:var(--amber);--cd:var(--amber-d);display:grid;grid-template-columns:auto 1fr;gap:8px;align-items:start;
  padding:7px 8px 7px 7px;background:rgba(23,18,42,.88);border:2px solid var(--c);border-left-width:5px;border-radius:20px;
  box-shadow:2px 2px 0 #0d0a1a,inset 0 -2px 0 rgba(0,0,0,.35);animation:buffIn .22s steps(3) both}
.buff-enchant{--c:#b777ff;--cd:#5b2a99;background:rgba(44,24,66,.92)}
.buff-split,.buff-width{--c:var(--azur);--cd:#2a5fa8}
.buff-shield{--c:var(--mala);--cd:var(--mala-d)}
.buff-gold{--c:var(--amber);--cd:var(--amber-d)}
.buff-heatseal{--c:#ffad6b;--cd:#b8442a}
.buff-corebreaker{--c:#b6adff;--cd:#6a5fd0}
.buff-lifeline{--c:#ee9bd0;--cd:#8d3973}
.buff-phase{--c:#baadff;--cd:#6551aa}
.buff-burn{--c:var(--rhodo);--cd:var(--rhodo-d);background:rgba(52,14,24,.9)}
.buff-ic{position:relative;width:34px;height:34px;padding:3px;background:#0d0a1a;border:2px solid var(--cd);border-radius:50%;flex:none}
.buff-ic svg,.buff-badge svg{display:block;width:100%;height:100%;image-rendering:pixelated}
.buff-n{position:absolute;right:-6px;bottom:-6px;min-width:15px;padding:0 2px;font-size:9px;line-height:13px;font-weight:800;
  text-align:center;color:#0d0a1a;background:var(--c);border:1px solid #0d0a1a;border-radius:999px}
.buff-n[hidden]{display:none}
.buff-body{min-width:0;display:flex;flex-direction:column;gap:3px}
.buff-head{display:flex;justify-content:space-between;align-items:baseline;gap:6px}
.buff-t{font-size:12px;font-weight:800;color:var(--c);line-height:1.2;overflow-wrap:anywhere}
.buff-time{flex:none;font-size:12px;font-weight:800;color:#fff8ec;font-variant-numeric:tabular-nums}
.buff-runlong{align-self:flex-start;font-size:8px;letter-spacing:.14em;text-transform:uppercase;color:#e3c2ff;border:1px solid #b777ff;border-radius:999px;padding:1px 4px}
.buff-bar{display:block;height:4px;background:#0d0a1a;border:1px solid var(--cd);border-radius:999px;overflow:hidden}
.buff-bar i{display:block;height:100%;background:var(--c);border-radius:inherit;transform-origin:left;transition:transform .12s linear}
.buff-card.is-ending .buff-time{animation:buffBlink .5s steps(2) infinite}
#buffIcons{flex:0 0 100%;display:flex;justify-content:center;flex-wrap:wrap;gap:4px;margin-top:1px}
.buff-badge{--c:var(--amber);position:relative;width:24px;height:24px;padding:2px;background:rgba(23,18,42,.85);
  border:2px solid var(--c);border-radius:50%;box-shadow:1px 1px 0 #0d0a1a}
.buff-badge.buff-enchant{--c:#b777ff}.buff-badge.buff-split,.buff-badge.buff-width{--c:var(--azur)}
.buff-badge.buff-shield{--c:var(--mala)}.buff-badge.buff-heatseal{--c:#ffad6b}
.buff-badge.buff-corebreaker{--c:#b6adff}.buff-badge.buff-burn{--c:var(--rhodo)}
.buff-badge.buff-lifeline{--c:#ee9bd0}.buff-badge.buff-phase{--c:#baadff}
.buff-badge .buff-n{right:-5px;bottom:-5px;min-width:12px;font-size:8px;line-height:10px}
@keyframes buffIn{from{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:none}}
@keyframes buffBlink{50%{opacity:.35}}
.is-crowded .buff-card{padding-top:5px;padding-bottom:5px}
.is-crowded .buff-runlong{display:none}
@media (min-width:1280px){#buffRail{width:clamp(176px,calc((100vw - 118.2dvh)/2 - 20px),236px);left:calc(var(--buff-x,0px) + 16px);top:10px}}
@media (max-width:1024px){#buffRail{width:210px}}
@media (max-width:620px){
  #buffRail{top:auto;width:min(168px,calc(100vw - 16px));left:calc(var(--buff-x,0px) + 6px);
    margin-top:6px;position:absolute;top:100%;max-height:var(--buff-height,calc(100dvh - 260px));overflow:hidden}
  .buff-rail-title{display:none}
  .buff-card{gap:6px;padding:5px 6px 5px 5px;border-left-width:3px}
  .buff-ic{width:26px;height:26px;padding:2px}
  .buff-t,.buff-time{font-size:10px}
  .buff-badge{width:20px;height:20px}
}
@media (max-width:360px){#buffRail{width:144px}}
@media (max-width:620px) and (max-height:700px){
  #buffRail{gap:3px;width:144px}
  .buff-list{gap:3px}
  .buff-card,.is-crowded .buff-card{padding:4px;gap:4px;min-height:36px}
  .buff-ic{width:20px;height:20px;padding:1px}
  .buff-head{gap:3px;align-items:center}
  .buff-t{font-size:9px;line-height:1.08}
  .buff-time{font-size:9px}
  .buff-body{gap:2px}
  .buff-runlong{display:none}
  .buff-bar{height:3px}
}
@media (prefers-reduced-motion:reduce){.buff-card,.buff-card.is-ending .buff-time{animation:none!important}.buff-bar i{transition:none}}
@media (max-width:620px) and (max-height:700px){
  #buffRail.is-overloaded .buff-list{gap:2px}
  #buffRail.is-overloaded .buff-card{padding:3px 4px;min-height:26px;gap:4px;border-radius:14px}
  #buffRail.is-overloaded .buff-ic{width:16px;height:16px;padding:0}
  #buffRail.is-overloaded .buff-t{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
  #buffRail.is-overloaded .buff-body{gap:1px}
  #buffRail.is-overloaded .buff-bar{height:2px}
}
