/* hotfix3: título + medalha VIP no header, brilho por raridade, Vila recolhida só com ícone */
@layer priority{
/* ---- Header: nome (+VIP) / título / nível+XP ---- */
html body .shell .main .game-header.hud-wood.hud-wood .hud-identity{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;grid-template-rows:auto auto auto!important;row-gap:2px!important;column-gap:5px!important;align-content:center!important;max-height:58px!important}
html body .shell .main .game-header.hud-wood.hud-wood .hud-name-line{grid-column:1/-1;grid-row:1;display:flex;align-items:center;gap:4px;min-width:0}
html body .shell .main .game-header.hud-wood.hud-wood .hud-name-line .hud-nick-open{grid-column:auto!important;grid-row:auto!important;flex:0 1 auto;min-width:0}
html body .shell .main .game-header.hud-wood.hud-wood .season-title{display:block!important;grid-column:1/-1!important;grid-row:2!important;position:static!important;margin:0!important;padding:0!important;font:800 11px/1.15 var(--kz-font)!important;color:#e9c98f!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;min-width:0;max-width:100%;inset:auto!important;transform:none!important}
html body .shell .main .game-header.hud-wood.hud-wood .hud-level-badge{grid-row:3!important}
html body .shell .main .game-header.hud-wood.hud-wood progress.hud-xp{grid-row:3!important}
html body .shell .main .game-header.hud-wood.hud-wood .hud-level-badge{padding:1px 5px!important;font-size:11px!important}
html body .shell .main .game-header.hud-wood.hud-wood .hud-nick-row :is(strong,.hud-nick){line-height:1.05!important}
html body .shell .main .game-header.hud-wood.hud-wood .hud-name-line .hud-nick{display:block!important;overflow:visible!important;text-overflow:clip!important;white-space:nowrap!important;font:900 var(--hud-nick-fs,var(--kz-fs-md))/1.1 var(--kz-font)!important;height:auto!important;max-width:none!important}
html body .shell .main .game-header.hud-wood.hud-wood .hud-name-line .hud-nick-open{height:auto!important;min-height:0!important;overflow:visible!important;max-width:100%!important}
/* medalha VIP: só com Clube ativo, à direita do nome */
html body .shell .main .game-header.hud-wood.hud-wood .hud-name-line .hud-club.is-inactive,html body .shell .main .game-header.hud-wood.hud-wood .hud-club.is-inactive{display:none!important}
html body .shell .main .game-header.hud-wood.hud-wood .hud-name-line .hud-club{position:static!important;flex:none;display:grid!important;place-items:center;width:20px!important;height:20px!important;min-width:20px!important;max-width:20px!important;min-height:20px!important;padding:0!important;margin:0!important;border:0!important;background:none!important;box-shadow:none!important;inset:auto!important;transform:none!important;filter:drop-shadow(0 0 3px #ffd34d99)}
html body .shell .main .game-header.hud-wood.hud-wood .hud-name-line .hud-club img{width:18px!important;height:20px!important;image-rendering:pixelated}
html body .shell .main .game-header.hud-wood.hud-wood .hud-name-line .hud-club::after{content:"";position:absolute;inset:-12px}

/* ---- Brilho por raridade (cores de rarities.js; 0 comum … 6 mítico) ---- */
.rarity-portrait.rarity-1,.rarity-portrait.rarity-2,.rarity-portrait.rarity-3{box-shadow:0 0 6px var(--rarity-color),0 0 0 1px color-mix(in srgb,var(--rarity-color) 50%,transparent)!important}
.rarity-portrait.rarity-4,.rarity-portrait.rarity-5,.rarity-portrait.rarity-6{box-shadow:0 0 10px var(--rarity-color),0 0 2px var(--rarity-color)!important}
.rarity-portrait.rarity-4::after,.rarity-portrait.rarity-5::after,.rarity-portrait.rarity-6::after{content:"";position:absolute;inset:0;border-radius:inherit;background:linear-gradient(110deg,transparent 40%,rgba(255,255,255,.45) 50%,transparent 60%) no-repeat;background-size:300% 100%;animation:kz-rar-shine 3.2s ease-in-out infinite;pointer-events:none;z-index:1}
.asc2 .asc2-mat .rarity-portrait{box-shadow:none!important}
.asc2 .asc2-mat .rarity-portrait::after{display:none}
@keyframes kz-rar-shine{0%,55%{background-position:150% 0}85%,100%{background-position:-50% 0}}
/* seleção de time */
.j3 .j3-tile[data-rar]{position:relative}
.j3 .j3-tile[data-rar]:not([data-rar="0"]){box-shadow:0 0 0 2px var(--rc),0 0 8px var(--rc)!important}
.j3 .j3-tile[data-rar]:not([data-rar="0"]) .j3-tile-art{filter:drop-shadow(0 0 4px var(--rc))}
.j3 .j3-tile[data-rar="4"]::after,.j3 .j3-tile[data-rar="5"]::after,.j3 .j3-tile[data-rar="6"]::after,.j3 .j3-slot[data-rar="4"]::after,.j3 .j3-slot[data-rar="5"]::after,.j3 .j3-slot[data-rar="6"]::after{content:"";position:absolute;inset:0;background:linear-gradient(110deg,transparent 35%,rgba(255,255,255,.4) 50%,transparent 65%) no-repeat;background-size:300% 100%;animation:kz-rar-shine 3.2s ease-in-out infinite;pointer-events:none;border-radius:inherit}
.j3 .j3-slot[data-rar]{position:relative}
.j3 .j3-slot[data-rar]:not([data-rar="0"]){box-shadow:0 0 0 2px var(--rc),0 0 6px var(--rc)!important}
/* Vila */
.vc-worker[data-rar]:not([data-rar="0"]) :is(.vc-awake,.vc-sleep){filter:drop-shadow(0 0 3px var(--rc)) drop-shadow(0 2px 0 rgba(0,0,0,.25))!important}
.vc-worker[data-rar]:is([data-rar="4"],[data-rar="5"],[data-rar="6"]) :is(.vc-awake,.vc-sleep){filter:drop-shadow(0 0 5px var(--rc)) drop-shadow(0 0 2px var(--rc))!important}
.vc-worker[data-rar] .vc-name{box-shadow:inset 0 -3px 0 var(--rc)}
.vc-mini[data-rar]:not([data-rar="0"]){border-color:var(--rc)!important;box-shadow:0 0 5px var(--rc),inset 0 2px 0 rgba(255,255,255,.18)!important}
/* ficha: sprite com brilho na cor da raridade */
dialog.pokemon-sheet .pk-hero .pk-stage :is(img,canvas):not(.ui-icon):not(.px-icon){filter:drop-shadow(0 0 6px var(--pk-rarity))}
@media (prefers-reduced-motion:reduce){.rarity-portrait::after,.j3 [data-rar]::after{animation:none!important;display:none}}
:root[data-reduced-motion=true] :is(.rarity-portrait,.j3 [data-rar])::after{animation:none!important;display:none}
}
/* Vila recolhida: só o ícone da profissão */
.vc-card.is-collapsed .vc-head .vc-title span{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.vc-card.is-collapsed .vc-head .vc-title{width:36px;height:36px;justify-content:center;border-radius:8px!important;background:rgba(255,240,200,.08)!important;border:2px solid rgba(255,240,200,.18)!important}
.vc-card.is-collapsed .vc-head .vc-title img{width:22px;height:22px}
.vc-card.is-collapsed .vc-peek{justify-content:flex-start}
@layer priority{
html body .shell .main .game-header.hud-wood.hud-wood .hud-identity{row-gap:2px!important;height:auto!important;max-height:56px!important;align-self:center!important}
html body .shell .main .game-header.hud-wood.hud-wood .hud-name-line .hud-nick{line-height:1!important}
html body .shell .main .game-header.hud-wood.hud-wood .season-title{font-size:10.5px!important;line-height:1.1!important}
html body .shell .main .game-header.hud-wood.hud-wood .hud-level-badge{height:15px!important;min-height:0!important;line-height:11px!important;padding:1px 5px!important;font-size:10.5px!important;box-sizing:border-box!important;border-width:1.5px!important}
html body .shell .main .game-header.hud-wood.hud-wood .hud-name-line .hud-club{height:18px!important;min-height:18px!important}
}
@layer priority{
html body .shell .main .game-header.hud-wood.hud-wood .hud-identity{grid-template-rows:18px 13px 15px!important;row-gap:3px!important;align-content:center!important;max-height:none!important;height:56px!important;padding:0!important;box-sizing:border-box!important}
html body .shell .main .game-header.hud-wood.hud-wood .season-title{height:13px!important;min-height:0!important;align-self:center}
}
